+ remove some unused code in a comment.
+ add F_SHELL flag in userdel
+ use a separate local declaration for a temporary variable, rather
than overloading a variable that's used for something else.
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
instead of err()), as all error cases in creategid() are already commented
properly from inside creategid().
This prevents funny errors like:
miyu# groupadd test2
miyu# groupadd test2
groupadd: group `test2' already exists
groupadd: can't add group: problems with /etc/group file: Inappropriate ioctl for device
directory already exists. Previously new skel files from /etc/skel were
copied and permissions/ownerships changed even if the directory already
existed.
Before removing the home directory of a user check that
+ the user does not have uid 0
+ the user is the owner of the directory.
and remove the files using the effective user-id of the user. Show
a warning if the directory is not removed.
Use asprintf and fgetln for some string work to remove arbitary string
length limitations.
Fixes for PRs bin/11100 and bin/11103.
Options without arguments go first in a bunch (see /usr/share/misc/style)
"add", "del", "info", "mod" arguments to user(8) and group(8) are command
modifiers, not normal text.
-D is not optional when setting the defaults for useradd(8)
Also add a missing .Ar to groupinfo.8
There's a glitch in the display describing the "group" option in
usermgmt.conf. I can't get rid of the blank line above it without it
losing the line break after the colon as well. Anyone?
+ Use _PATH_GROUP and _PATH_MASTERPASSWD (from OpenBSD)
+ Use -G group1,group2,group3 for multiple groups in useradd and usermod
(pointed out by Matt Green, and also changed in OpenBSD, but done more
efficiently here)
+ is_number should not be inside #ifdef EXTENSIONS (from OpenBSD)
+ clear up yet another usage message (for user(8) and group(8)) - noticed
in passing, unknown if fixed anywhere else