Commit Graph

201 Commits

Author SHA1 Message Date
reed a87ec1e425 Remove the -v verbose switch from userinfo. It was not used.
Also remove reference to usermgmt.conf from userinfo manpage.

Discussed on tech-userlevel.
2008-02-27 19:12:56 +00:00
hubertf f81f738d09 disclaim copyright 2008-02-04 01:28:20 +00:00
rillig a5acac5748 Added a reference to passwd(1), which is useful to later change a
password.
2006-12-06 21:49:17 +00:00
pavel e98941caa4 Change the default shell to /bin/sh. It has most of the usability
advantages of our ksh (emacs line editing). There were objections against
using ksh, because our (pd)ksh is not the real ksh. See also the
discussion on tech-userlevel.

Motivation for changing the default from csh is better interactive
usability and desire to use a standard shell, which is already used for
all the system shell scripts.

Approved by core.
2006-11-02 21:42:08 +00:00
christos f6a7372b60 use c99 initializers 2006-10-22 21:09:47 +00:00
wiz b7a8d82a23 Sort options in usage. 2006-10-13 20:43:31 +00:00
wiz 1bce9c8b5d Remove empty line. 2006-10-13 20:35:38 +00:00
elad 5e188d0b70 PR/30351: Hubert Feyrer: useradd(8) doesn't allow setting permissions of
new home [patch]

Adapted to current code and some nits from myself. Thanks for the patch!
2006-10-07 09:20:07 +00:00
pavel 338033d1c7 revert change of default shell, reguested by agc@. 2006-09-30 11:47:00 +00:00
pavel 4d8dbf3bf0 Change the default shell to /bin/ksh, which is our best interactive
shell at the moment. Proposed on tech-userlevel and approved by hubertf@.
2006-09-30 10:50:32 +00:00
pavel 3b850c18c8 in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
2006-09-30 10:44:55 +00:00
christos 5efc77fb1e use realloc instead of free+calloc 2006-06-27 12:39:23 +00:00
jnemeth b7899a65bc try again with the Coverity annotation 2006-06-02 21:44:37 +00:00
hubertf 5fdc69efae Xref a few more manpages: user(8), group(8), ... 2006-05-29 01:38:33 +00:00
jnemeth d9a7dcfba5 Coverity annotation -- although memsave free()s its first argument, it
will allocate memory and assign it to its first argument, so it is neutral
Coverity CID 3229:  memory leak -- failed to fclose() master in moduser()
Coverity CID 3228:  memory leak -- failed to free() newname in groupmod()
2006-05-27 03:41:48 +00:00
joerg 368cb1b951 Garbage collect cc in moduser, it is only set once, but never read as
noticed by lint.
2006-03-22 18:02:46 +00:00
joerg 5dc48904d3 Don't leak FILEs when flock fails. Found by Coverity (CID 1776, 1777 and
1778). Patch by Liam J. Foy, which handles one more case.
2006-03-22 18:01:11 +00:00
dmcmahill de309be996 put the array bounds check _before_ accessing the array.
Coverity  CID: 1479
2006-03-17 14:20:10 +00:00
dmcmahill ee00225705 put the array bounds check _before_ accessing the array.
Coverity  CID: 1480
2006-03-17 14:14:45 +00:00
christos aa3a9e822d By popular demand don't bail out if a user's shell is not in /etc/shells.
Issue a warning instead.
2006-02-23 22:45:25 +00:00
jmmv 1cd43a0b52 Add a missing space in the usage message. 2006-01-26 17:24:52 +00:00
wiz 771b656bd0 Add missing .El. From Nicolas Joly in PR 32546. 2006-01-20 21:50:54 +00:00
agc 9823410edb Use a CPP definition for "/sbin/nologin" - it's at the top of the
file.

Modify the logic in the previous but one commit - /sbin/nologin should
be considered a valid user shell, since otherwise, with the addition
of the checks for a valid user shell, useradd with a shell of
/sbin/nologin will fail.

Modify some of the code here to conform to the standards in the rest
of this file.
2006-01-14 22:00:52 +00:00
elad 87a445663d Add forgotten ')'. 2006-01-13 16:36:33 +00:00
christos efe8347be7 treat /sbin/nologin specially. 2006-01-13 13:43:23 +00:00
christos ca0029edd3 Add checks for valid shell. From Liam Foy. 2006-01-06 18:11:00 +00:00
agc 40a712f2d4 Be pragmatic - move user(8) to a 3-clause BSD licence. 2005-11-25 08:00:18 +00:00
wiz b141897d50 Punctuation fixes. 2005-11-16 20:24:17 +00:00
christos 77bea244d5 user portion of the EXTENSIONS documentation. From Liam Foy. 2005-11-16 18:44:37 +00:00
wiz c6257ebac1 Mark up EXTENSIONS. 2005-11-09 23:50:16 +00:00
wiz 36470a753d Drop trailing whitespace. 2005-11-09 23:48:51 +00:00
christos df29ab0769 Mention which options are only available with EXTENSIONS. From Liam Foy. 2005-11-07 23:07:45 +00:00
christos 6b3d6b9d93 remove asprintf and strlcpy. We don't support NetBSD1.3 and NetBSD1.4.
GC Todd's copyright, since it is not needed anymore.
2005-11-07 21:58:12 +00:00
christos 9b674959c3 More cleanups from Liam Foy:
- Fix error messages, some are completely incorrect
    - Asystem prints the error message so don't bother saving errno
    - Don't continue if a lock can't be obtained on /etc/group
    - Just pass struct passwd * to removehomedir, not its members
Some copyright maintenance:
    - Add Liam Foy.
    - Move Todd's copyright higher up.
    XXX: We should remove clause 3 and merge the two copyright groups.
2005-11-07 21:46:50 +00:00
christos c81227bb08 call pw_abort() on failure (from Liam Foy) 2005-10-05 21:17:53 +00:00
rpaulo ece51eabd5 PR 22469: user.c should use "pwd.h" include file for
_PATH_USERMGMT_CONF. By rpixley@vm-netbsd-161.nominum.com.
2005-09-19 00:43:17 +00:00
agc c73a10fe94 Ensure that a consistent coding style is used.
s/1/EXIT_FAILURE/
2005-09-18 21:41:26 +00:00
christos 4471e7c6f5 From Liam Foy:
- Correct lenght for the username
- First character in the login name cannot be '-' (OpenBSD)
- Remove some #ifdef EXTENSIONS. find_group_info is always needed
- When printing change, if it's -1, place a correct string.
2005-09-18 14:15:53 +00:00
christos c9d876ed6c Warn if the group being removed is still the primary group of an existing
user. From Liam Foy.
2005-09-12 15:45:03 +00:00
wiz edd2c20bae Comment out /usr/share/examples/usermgmt -- dir does not exist. Fix macro typo.
From YOMURA Masanori in private mail.
2005-09-11 23:49:20 +00:00
wiz ba3a0dadf1 Sync group* usages with man pages. 2005-09-09 22:04:09 +00:00
wiz ac4e0a8127 Reformulate slightly to match other man pages. Use standard
EXIT STATUS section. Bump date.
2005-09-09 22:02:12 +00:00
wiz a2bc89c87d Do not list all options for group* -- they are bound to get out of sync here.
Use standard EXIT STATUS section. Bump date.
2005-09-09 22:01:20 +00:00
wiz f629e1e94e Sync user* usage with man pages. Bonus grammar fix in comment. 2005-09-09 21:48:10 +00:00
wiz 31e0e03316 Improve -p description in second case. 2005-09-09 21:43:42 +00:00
wiz d0260f31e6 Reformulate slightly to match other man pages. 2005-09-09 21:31:25 +00:00
wiz 32587324af Use standard EXIT STATUS section.
Reformulate slightly to match other man pages. Bump date.
2005-09-09 21:31:00 +00:00
wiz d48b71a0a8 Sort options and option descriptions. Use standard EXIT STATUS section.
Reformulate slightly to match other man pages. Bump date.
2005-09-09 21:30:31 +00:00
wiz a431cb6155 Reformulate slightly to match other man pages. 2005-09-09 21:29:08 +00:00
wiz 42fd4ae9cd Do not list all options for user* -- they are bound
to get out of sync (as they currently are, for example). Use standard EXIT STATUS
section. End sentences with dots. Bump date.
2005-09-09 21:26:09 +00:00