* src/chage.c: expdays renamed to expdate. It is a date, even if
expressed in a number of days since Jan 1, 1970.
* src/chage.c: Likewise: lastday renamed to lstchgdate. Also fix
the --lastday documentation.
* src/useradd.c, src/usermod.c, libmisc/getgr_nam_gid.c,
libmisc/Makefile.am, lib/prototypes.h: Moved getgr_nam_gid() from
src/useradd.c and src/usermod.c to libmisc/getgr_nam_gid.c.
* src/useradd.c: Get rid of strtol.
* src/useradd.c: Provide better warning in case a default GROUP or
INACTIVE value is not valid in /etc/default/useradd.
* libmisc/setugid.c libmisc/age.c (setup_uid_gid): is_console is
never set ifndef USE_PAM. Change the prototype of setup_uid_gid()
when USE_PAM is not defined. This permits to remove add_groups
from PAM builds. setup_uid_gid is already subject to
HAVE_INITGROUPS.
* lib/prototypes.h, libmisc/addgrps.c: restrict add_groups() to
ifndef USE_PAM.
* lib/prototypes.h: Remove the declaration of add_cons_grps(). The
function does not exist.
* libmisc/age.c (setup_uid_gid): is_console is never set ifndef
USE_PAM. Change the prototype of setup_uid_gid() when USE_PAM is
not defined. This permits to remove add_groups from PAM builds.
setup_uid_gid is already subject to HAVE_INITGROUPS.
* libmisc/pwd2spwd.c (pwd_to_spwd): pwd_to_spwd() is not used in
PAM builds.
* libmisc/pwd2spwd.c, src/chpasswd.c, src/newusers.c,
src/passwd.c, src/pwck.c, src/pwconv.c, src/useradd.c,
src/usermod.c: On Jan 01, 1970, do not set the sp_lstchg field to
0 (which means that the password shall be changed during the next
login), but use -1 (password aging disabled).
* src/passwd.c: Do not check sp_min if sp_lstchg is null or -1.
* src/chage.c: When no shadow entry exist, thedefault sp_lstchg
value should be -1 (no aging) rather than 0 (password must be
changed).
* src/chage.c: For password expiration and inactivity, indicate
that the password must be changed when sp_lstchg is null rather
than indicating that expiration and inactivity are not enabled.
nekral-guest [Sat, 21 Mar 2009 20:24:37 +0000 (20:24 +0000)]
* libmisc/get_gid.c, libmisc/get_uid.c, libmisc/Makefile.am,
lib/get_gid.c, lib/get_uid.c, lib/Makefile.am: get_uid.c and
get_gid.c moved from libmisc/ to lib/.
nekral-guest [Sun, 15 Mar 2009 21:34:20 +0000 (21:34 +0000)]
* src/usermod.c: get_number() replaced by getlong().
* src/usermod.c: When the user is renamed, make sure we do not
override an user with the same name (in passwd or shadow).
nekral-guest [Sun, 15 Mar 2009 21:29:16 +0000 (21:29 +0000)]
* NEWS, src/userdel.c: Make sure the user exists in the shadow
database before calling spw_remove().
* NEWS, src/userdel.c: When the user's group is removed, make sure
the group is in the gshadow database before calling sgr_remove().
* src/userdel.c: Improve warning's wording.
nekral-guest [Sun, 15 Mar 2009 21:15:48 +0000 (21:15 +0000)]
* libmisc/cleanup.c: Fix del_cleanup. The arguments were not
desynchronized with the cleanup functions.
* libmisc/cleanup.c: cleanup_function_args is an array of void
pointer, not strings.
nekral-guest [Sat, 14 Mar 2009 16:18:06 +0000 (16:18 +0000)]
* man/po/Makefile.in.in: xml2po cannot exclude one entity for
expansion. Make sure config.xml does not exist when the POT file
is created in order to keep the configurations in the POT file
* man/generate_translations.mak: make sure config.xml does not
exist neither when the translated XML is generated. Add the
missing %config; (strip out by xml2po). and make sure config.xml
is present when the translated manpage is generated.
* man/generate_mans.mak: config.xml is needed for the generation
of manpages (already in the .deps for the English manpages, but
needed for the translations).
* man/Makefile.am: Added missing CREATE_HOME.xml.
nekral-guest [Fri, 13 Mar 2009 23:17:43 +0000 (23:17 +0000)]
* man/login.defs.5.xml: Indicate that sg uses the same variables
as newgrp.
* man/login.defs.5.xml: vipw does not use any variable.
* man/login.defs.5.xml: In PAM enabled configurations, login still
uses some login.defs variables.
nekral-guest [Fri, 13 Mar 2009 23:12:06 +0000 (23:12 +0000)]
* man/newusers.8.xml: Document the behavior of newusers for each
field.
* man/newusers.8.xml: Do not add the note on PAM on non-PAM
enabled configurations.
nekral-guest [Fri, 13 Mar 2009 22:49:20 +0000 (22:49 +0000)]
* src/faillog.c: Added support for the specification of a range of
users with -u.
* src/faillog.c: Do not call print_one() for users which do not
exist.
* src/faillog.c: Make sure the user's entry is not outside the
faillog file and initialize the faillog structure in that case.
* src/faillog.c: Move print_one() closer to print().
* src/faillog.c: reset(), setmax(), set_locktime() can also change
entries of user which do not exist.
* src/faillog.c: reset(), setmax() and set_locktime() shall not
create entries for users which have no entries if the value has to
be set to 0.
* src/faillog.c: reset(), setmax() and set_locktime(): better
handling of users whose entry is outside the faillog file.
* src/faillog.c: Improved option handling. Options can now be
specified in any order.
* src/faillog.c: Improved warnings when options are not
compatible or when the faillog cannot be open with the right mode.
* src/faillog.c: Only fstat the faillog file once.
* man/faillog.8.xml: Improved documentation.
nekral-guest [Fri, 13 Mar 2009 22:28:27 +0000 (22:28 +0000)]
* src/chpasswd.c: Make sure the SHA related variables is not
compiled when disabled at configuration time.
* src/chgpasswd.c: Make sure the SHA related variables is not
compiled when disabled at configuration time.
* src/chgpasswd.c: Fix the test for getlong() failure.
nekral-guest [Fri, 13 Mar 2009 22:20:20 +0000 (22:20 +0000)]
* src/lastlog.c: lastlog variable renamed to ll to avoid name
clash with the structure.
* src/lastlog.c: check the offset in print_one() so that it is
used for the display of one entry or a set of entries.
* src/lastlog.c: Do not loop over the whole user database when -u
is used with a single user.
* src/lastlog.c: Check the size of the lastlog file so that we
can identify failures to read.
nekral-guest [Sun, 22 Feb 2009 23:23:15 +0000 (23:23 +0000)]
* libmisc/find_new_gid.c, libmisc/find_new_uid.c: Avoid calling
getgrent()/getpwent() after they return NULL. This caused LDAP to
return at the beginning of the group/user entries.
nekral-guest [Mon, 26 Jan 2009 22:03:37 +0000 (22:03 +0000)]
* NEWS, src/gpasswd.c: Only report success to audit and syslog
when the changes are committed to the system. Do not log failure
for on-memory changes to audit or syslog. Make sure failures and
inconsistencies will be reported in case of unexpected failures
(e.g. malloc failures). Only specify an audit message if it is not
implicitly implied by the type argument. Removed fail_exit
(replaced by atexit(do_cleanups)). Log failures in case of
permission denied.
nekral-guest [Tue, 23 Dec 2008 00:44:29 +0000 (00:44 +0000)]
* src/Makefile.am: Only link with the needed library. When
compiled with PAM support, chfn, chsh, login, newgrp, passwd, and
su do not need the libcrypt library.