]> granicus.if.org Git - shadow/log
shadow
16 years ago* Try harder to get the GID equal to the UID.
nekral-guest [Wed, 21 Nov 2007 21:27:44 +0000 (21:27 +0000)]
* Try harder to get the GID equal to the UID.
  This was not the case when the GID is not specified, and a GID
  exist with an ID higher than the all the UIDs.
* Typo in comment: contrained -> constrained.

16 years agoCompile fix (related to last commit on src/chgpasswd.c).
nekral-guest [Wed, 21 Nov 2007 20:28:13 +0000 (20:28 +0000)]
Compile fix (related to last commit on src/chgpasswd.c).

16 years agoIf the shadow group file is not present, do not try to locate the group
nekral-guest [Tue, 20 Nov 2007 20:59:42 +0000 (20:59 +0000)]
If the shadow group file is not present, do not try to locate the group
entry from /etc/gshadow, and set the password in /etc/group.

16 years ago* libmisc/obscure.c, libmisc/salt.c, src/passwd.c: Match DES, MD5,
nekral-guest [Tue, 20 Nov 2007 20:00:16 +0000 (20:00 +0000)]
* libmisc/obscure.c, libmisc/salt.c, src/passwd.c: Match DES, MD5,
  SHA256, and SHA512 exactly (not only the first 3/6 chars).
* libmisc/salt.c (SHA_salt_rounds): Set rounds to the specified
  prefered_rounds value, if specified.
* src/gpasswd.c, libmisc/salt.c: Fix compilation warnings (use
  size_t for lengths).
* src/chpasswd.c, src/chgpasswd.c: Add missing parenthesis.

16 years agoIgnore the generated manpages. Add *.[1358] to the svn:ignore property.
nekral-guest [Tue, 20 Nov 2007 19:15:34 +0000 (19:15 +0000)]
Ignore the generated manpages. Add *.[1358] to the svn:ignore property.

16 years agoNew TODOs.
nekral-guest [Tue, 20 Nov 2007 13:42:18 +0000 (13:42 +0000)]
New TODOs.

16 years agoThe -c, -e, and -m options are exclusives.
nekral-guest [Tue, 20 Nov 2007 13:09:55 +0000 (13:09 +0000)]
The -c, -e, and -m options are exclusives.

16 years ago* man/chpasswd.8.xml, man/chgpasswd.8.xml: Document how the
nekral-guest [Tue, 20 Nov 2007 12:59:20 +0000 (12:59 +0000)]
* man/chpasswd.8.xml, man/chgpasswd.8.xml: Document how the
  encryption algorithm is chosen for the passwords. Document the new
  -c and -s options. Add a reference to login.defs(5).
* man/login.defs.5.xml: Document the ENCRYPT_METHOD,
  MD5_CRYPT_ENAB, SHA_CRYPT_MIN_ROUNDS, and SHA_CRYPT_MAX_ROUNDS
  variables.
* etc/login.defs: Indicate that MD5_CRYPT_ENAB is deprecated.
  Document the relationship with PAM for MD5_CRYPT_ENAB and
  ENCRYPT_METHOD.

16 years agoIncrease the size of crypt_passwd from 128 to 256 to avoid overflow in
nekral-guest [Tue, 20 Nov 2007 12:18:36 +0000 (12:18 +0000)]
Increase the size of crypt_passwd from 128 to 256 to avoid overflow in
case of SHA512 (161 should be sufficient).

16 years agoFix typo s/method/crypt_method/
nekral-guest [Tue, 20 Nov 2007 12:10:55 +0000 (12:10 +0000)]
Fix typo s/method/crypt_method/

16 years agopasswd also use crypt_make_salt().
nekral-guest [Tue, 20 Nov 2007 09:51:36 +0000 (09:51 +0000)]
passwd also use crypt_make_salt().

16 years ago* lib/prototypes.h, libmisc/salt.c: Add parameters to
nekral-guest [Tue, 20 Nov 2007 09:33:52 +0000 (09:33 +0000)]
* lib/prototypes.h, libmisc/salt.c: Add parameters to
  crypt_make_salt to force the crypt method and number of rounds.
* libmisc/salt.c: Add parameter to SHA_salt_rounds to force the
  number of rounds.
* libmisc/salt.c, lib/getdef.c: ENCRYPT_METHOD and MD5_CRYPT_ENAB
  are needed also when USE_PAM (e.g. for chpasswd).
* src/newusers.c, src/gpasswd.c: Use the new crypt_make_salt prototype.
* src/chpasswd.c, src/chgpasswd.c: Add option -c, --crypt-method
  and -s, --sha-rounds to specify the crypt method and number of
  rounds in case of one of the SHA methods. The new prototype of
  crypt_make_salt simplifies the handling of -m, --md5.

16 years agoHopefully, I review my commits in the morning...
nekral-guest [Tue, 20 Nov 2007 09:20:34 +0000 (09:20 +0000)]
Hopefully, I review my commits in the morning...

16 years ago* libmisc/salt.c: The salt has a random size (between 8 and 16
nekral-guest [Tue, 20 Nov 2007 00:05:54 +0000 (00:05 +0000)]
* libmisc/salt.c: The salt has a random size (between 8 and 16
  bytes).
* lib/getdef.c, etc/login.defs: Add definitions for
  SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS.
* libmisc/salt.c: Use SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS
  to add a random number of rounds if needed.

16 years ago* libmisc/salt.c (MAGNUM): Terminate the array with nul (the array
nekral-guest [Mon, 19 Nov 2007 22:34:48 +0000 (22:34 +0000)]
* libmisc/salt.c (MAGNUM): Terminate the array with nul (the array
  is then used with strcat).
* libmisc/salt.c (crypt_make_salt): Initialize result[0] to nul at
  the beginning (was not initialized when USE_PAM).
* libmisc/salt.c (crypt_make_salt): Check that ENCRYPT_METHOD is a
  valid crypt method.

16 years agoFix typo introduced while merging RedHat patch shadow-4.0.18.1-sha256.patch.
nekral-guest [Mon, 19 Nov 2007 22:16:50 +0000 (22:16 +0000)]
Fix typo introduced while merging RedHat patch shadow-4.0.18.1-sha256.patch.

16 years agoAdd support for SHA256 and SHA512 encrypt methods. Apply RedHat's patch
nekral-guest [Mon, 19 Nov 2007 22:14:19 +0000 (22:14 +0000)]
Add support for SHA256 and SHA512 encrypt methods. Apply RedHat's patch
shadow-4.0.18.1-sha256.patch. Thanks to Peter Vrabec. Hardly no changes
except re-indent and changes related to recent modifications (max_salt_len
in crypt_make_salt). Changes in lib/defines.h not applied (definition of
ENCRYPTMETHOD_SELECT). I will add a configure check or flag.

16 years agoAll the manpages in de, fr, it, pl are auto-generated.
nekral-guest [Mon, 19 Nov 2007 20:33:39 +0000 (20:33 +0000)]
All the manpages in de, fr, it, pl are auto-generated.

16 years agoFix some compilation warnings:
nekral-guest [Mon, 19 Nov 2007 20:25:36 +0000 (20:25 +0000)]
Fix some compilation warnings:
 * src/login.c: "dereferencing type-punned pointer will break
   strict-aliasing rules", add a variable indirection: ptr_pam_user.
 * lib/commonio.c: do not initialize the sb stat structure.
 * lib/pwio.c, lib/shadowio.c, lib/sgroupio.c, lib/groupio.c:
   initialize the security context if WITH_SELINUX.
 * lib/nscd.c: The service argument is not const (used in the exec*
   parameters). This matches with the prototype definition.
 * src/groupmems.c: Avoid ++i when i is also used in the same line.
 * src/newusers.c: i is positive every time it is compared. Add
   cast to unsigned int.
 * src/nologin.c: Use a main() prototype with no arguments.
 * libmisc/getdate.y: Initialize the type and value fields of the
   terminating entry for each TABLE.
 * libmisc/tz.c: Use "TZ=CST6CDT" as the default timezone.

16 years agoAdd a NEWS entry to indicate the review of the usage of getpwnam(),
nekral-guest [Mon, 19 Nov 2007 01:19:45 +0000 (01:19 +0000)]
Add a NEWS entry to indicate the review of the usage of getpwnam(),
getpwuid(), getgrnam(), getgrgid(), and getspnam().

16 years ago* man/pl/Makefile.am: Add getspnam.3 to EXTRA_DIST since it is
nekral-guest [Mon, 19 Nov 2007 01:16:42 +0000 (01:16 +0000)]
* man/pl/Makefile.am: Add getspnam.3 to EXTRA_DIST since it is
  generated with shadow.3.
* man/generate_translations.mak: Clean all the manpages, based on
  $(EXTRA_DIST), not $(man_MANS).

16 years agoAdditional removed translated manpages: man/pl/shadow.3 man/pl/sulogin.8 man/pl/id...
nekral-guest [Mon, 19 Nov 2007 01:13:44 +0000 (01:13 +0000)]
Additional removed translated manpages: man/pl/shadow.3 man/pl/sulogin.8 man/pl/id.1 man/ru/sulogin.8 man/ru/id.1 man/it/id.1

16 years agoRemove generated translated manpages. They are still distributed with the shadow...
nekral-guest [Sun, 18 Nov 2007 23:58:27 +0000 (23:58 +0000)]
Remove generated translated manpages. They are still distributed with the shadow tarballs.

16 years agoRemove chgpassw.8 since the real manpage should be named chgpasswd.8.
nekral-guest [Sun, 18 Nov 2007 23:43:58 +0000 (23:43 +0000)]
Remove chgpassw.8 since the real manpage should be named chgpasswd.8.

16 years agoWhy does chgpasswd uses chpasswd's pam config file?
nekral-guest [Sun, 18 Nov 2007 23:24:44 +0000 (23:24 +0000)]
Why does chgpasswd uses chpasswd's pam config file?

16 years agoReally delete man/vigr.8.xml.
nekral-guest [Sun, 18 Nov 2007 23:22:28 +0000 (23:22 +0000)]
Really delete man/vigr.8.xml.

16 years agoRemove file. The vigr man page is generated from the vipw XML file.
nekral-guest [Sun, 18 Nov 2007 23:21:49 +0000 (23:21 +0000)]
Remove file. The vigr man page is generated from the vipw XML file.

16 years agoAdd forgotten files in the previous ChangeLog entry.
nekral-guest [Sun, 18 Nov 2007 23:20:02 +0000 (23:20 +0000)]
Add forgotten files in the previous ChangeLog entry.

16 years ago* lib/prototypes.h, configure.in, libmisc/Makefile.am,
nekral-guest [Sun, 18 Nov 2007 23:15:26 +0000 (23:15 +0000)]
* lib/prototypes.h, configure.in, libmisc/Makefile.am,
  libmisc/xgetXXbyYY.c, libmisc/xgetpwnam.c, libmisc/xgetpwuid.c,
  libmisc/xgetgrnam.c, libmisc/xgetgrgid.c, libmisc/xgetspnam.c:
  Added functions xgetpwnam(), xgetpwuid(), xgetgrnam(),
  xgetgrgid(), and xgetspnam(). They allocate memory for the
  returned structure and are more robust to successive calls. They
  are implemented with the libc's getxxyyy_r() functions if
  available.
* libmisc/limits.c, libmisc/entry.c, libmisc/chowntty.c,
  libmisc/addgrps.c, libmisc/myname.c, libmisc/rlogin.c,
  libmisc/pwdcheck.c, src/newgrp.c, src/login_nopam.c,
  src/userdel.c, src/lastlog.c, src/grpck.c, src/gpasswd.c,
  src/newusers.c, src/chpasswd.c, src/chfn.c, src/groupmems.c,
  src/usermod.c, src/expiry.c, src/groupdel.c, src/chgpasswd.c,
  src/su.c, src/useradd.c, src/groupmod.c, src/passwd.c, src/pwck.c,
  src/groupadd.c, src/chage.c, src/login.c, src/suauth.c,
  src/faillog.c, src/groups.c, src/chsh.c, src/id.c: Review all the
  usage of one of the getpwnam(), getpwuid(), getgrnam(),
  getgrgid(), and getspnam() functions. It was noticed on
  http://bugs.debian.org/341230 that chfn and chsh use a passwd
  structure after calling a pam function, which result in using
  information from the passwd structure requested by pam, not the
  original one. It is much easier to use the new xget... functions
  to avoid these issues. I've checked which call to the original
  get... functions could be left (reducing the scope of the
  structure if possible), and I've left comments to ease future
  reviews (e.g. /* local, no need for xgetpwnam */).
  Note: the getpwent/getgrent calls should probably be checked also.
* src/groupdel.c, src/expiry.c: Fix typos in comments.
* src/groupmod.c: Re-indent.
* libmisc/Makefile.am, lib/groupmem.c, lib/groupio.c, lib/pwmem.c,
  lib/pwio.c, lib/shadowmem.c, lib/shadowio.c: Move the __<xx>_dup
  functions (used by the xget... functions) from the <xx>io.c files
  to the new <xx>mem.c files. This avoid linking some utils against
  the SELinux library.

16 years agoSome fixes for the manpages:
nekral-guest [Sun, 18 Nov 2007 22:58:31 +0000 (22:58 +0000)]
Some fixes for the manpages:
 * man/pl/pl.po: Fix typo: chgpassw -> chgpasswd.
 * man/pl/Makefile.am: Fix typo: chgpassw -> chgpasswd.
 * man/de/de.po: groups shall not be translated (for command,
   refname, or refentrytitle).

16 years agoFix typo introduced while fixing http://bugs.debian.org/451521 (compile fix).
nekral-guest [Sun, 18 Nov 2007 22:52:56 +0000 (22:52 +0000)]
Fix typo introduced while fixing http://bugs.debian.org/451521 (compile fix).

16 years ago* Why isgroup always return TRUE in groupmems?
nekral-guest [Sun, 18 Nov 2007 17:08:42 +0000 (17:08 +0000)]
* Why isgroup always return TRUE in groupmems?
* why is there a USE_PAM section?

16 years agoFix typo: EXTRA_DOST -> EXTRA_DIST.
nekral-guest [Sun, 18 Nov 2007 01:21:43 +0000 (01:21 +0000)]
Fix typo: EXTRA_DOST -> EXTRA_DIST.

16 years agoFix a typo in a comment.
nekral-guest [Sun, 18 Nov 2007 01:20:10 +0000 (01:20 +0000)]
Fix a typo in a comment.

16 years agoDo not document the behavior compared to old versions.
nekral-guest [Sat, 17 Nov 2007 23:11:02 +0000 (23:11 +0000)]
Do not document the behavior compared to old versions.

16 years agoDo not mention the patch names in the NEWS entries. They are mentioned in
nekral-guest [Sat, 17 Nov 2007 22:21:50 +0000 (22:21 +0000)]
Do not mention the patch names in the NEWS entries. They are mentioned in
the ChangeLog.

16 years agoAdd NEWS entries for the previous changes.
nekral-guest [Sat, 17 Nov 2007 22:17:42 +0000 (22:17 +0000)]
Add NEWS entries for the previous changes.

16 years agoDocument the differences between locking an account and locking a password.
nekral-guest [Sat, 17 Nov 2007 22:07:47 +0000 (22:07 +0000)]
Document the differences between locking an account and locking a password.

16 years agoSame fixes as applied to usermod: refuse to unlock an account when it
nekral-guest [Sat, 17 Nov 2007 22:05:31 +0000 (22:05 +0000)]
Same fixes as applied to usermod: refuse to unlock an account when it
would result in a passwordless account.

16 years agoRefuse to unlock an account when it would result in a passwordless
nekral-guest [Sat, 17 Nov 2007 22:02:22 +0000 (22:02 +0000)]
Refuse to unlock an account when it would result in a passwordless
account.  Based on Openwall's patch shadow-4.0.4.1-owl-usermod-unlock.diff

16 years agoMake sure that the prefix is the name of a directory (not only the
nekral-guest [Sat, 17 Nov 2007 21:24:06 +0000 (21:24 +0000)]
Make sure that the prefix is the name of a directory (not only the
beginning of a directory).
Openwall patch shadow-4.0.4.1-owl-userdel-path_prefix.diff.

16 years ago* src/newgrp.c: Do not give an indication that the group has no
nekral-guest [Sat, 17 Nov 2007 21:03:33 +0000 (21:03 +0000)]
* src/newgrp.c: Do not give an indication that the group has no
  password.
* src/newgrp.c: Do not only bail on syslog if the password is not
  valid. Also give an indication to the user on stderr.

16 years agoRemove a comment which states that an user shall provide a password to
nekral-guest [Sat, 17 Nov 2007 20:41:49 +0000 (20:41 +0000)]
Remove a comment which states that an user shall provide a password to
switch to her group.

16 years agoLast parts of the Openwall patch shadow-4.0.4.1-owl-chage-drop-priv.diff:
nekral-guest [Sat, 17 Nov 2007 20:28:32 +0000 (20:28 +0000)]
Last parts of the Openwall patch shadow-4.0.4.1-owl-chage-drop-priv.diff:
 * src/chage.c: Make chage -l also drop the saved GID.
 * src/chage.c: Prefer setregid/setreuid to setgid/setuid.

16 years ago* src/chage.c: Remove cleanup(). pw_lock is never called. Replace
nekral-guest [Sat, 17 Nov 2007 20:09:54 +0000 (20:09 +0000)]
* src/chage.c: Remove cleanup(). pw_lock is never called. Replace
  cleanup(2) by spw_unlock and remove the calls to cleanup(1).
* src/chage.c: Remove variable pwrw. It is always set to 0. The
  password database is always read only.

16 years ago* man/generate_translations.mak: Generic rules for all the
nekral-guest [Sat, 17 Nov 2007 18:45:22 +0000 (18:45 +0000)]
* man/generate_translations.mak: Generic rules for all the
  generated translated manpages (if ENABLE_REGENERATE_MAN).
* man/Makefile.am: Removed rules for all the generated translated
  manpages.
* man/sv/Makefile.am, man/de/Makefile.am, man/fr/Makefile.am,
  man/pl/Makefile.am, man/ru/Makefile.am, man/it/Makefile.am:
  Include generate_translations.mak to handle the generated
  translations (XML and roff files).
* man/Makefile.am: Translated XML files moved from the CLEANFILES
  variable of man/Makefile.am to the various languages Makefiles.

16 years agoFixes from Openwall patch shadow-4.0.4.1-alt-man.diff:
nekral-guest [Sat, 17 Nov 2007 18:13:17 +0000 (18:13 +0000)]
Fixes from Openwall patch shadow-4.0.4.1-alt-man.diff:
 * man/useradd.8.xml: Indicate that the NIS caveats is also valid
   for any external database as LDAP.
 * man/groupadd.8.xml: Likewise.
 * man/groupadd.8.xml: Reorder and reformat the caveats bullets.

16 years agoStart applying Debian patch 409_man_generate_from_PO:
nekral-guest [Sat, 17 Nov 2007 17:47:02 +0000 (17:47 +0000)]
Start applying Debian patch 409_man_generate_from_PO:
 * NEWS: Applied Debian patch 409_man_generate_from_PO to
   automatically generate the translated manpages from the POs.
 * man/Makefile.am: Replace the individual rules for the generation
   of the manpages (from XML) by a generic Makefile rule an
   dependencies for the linked manpages.

16 years agoDocument that chpasswd does not use PAM to update the passwords. This fixes
nekral-guest [Sat, 17 Nov 2007 17:31:54 +0000 (17:31 +0000)]
Document that chpasswd does not use PAM to update the passwords. This fixes
http://bugs.debian.org/396726.  Debian patch 411_chpasswd_document_no_pam.

16 years agoProvide URLs for the Debian bugs.
nekral-guest [Sat, 17 Nov 2007 17:24:23 +0000 (17:24 +0000)]
Provide URLs for the Debian bugs.

16 years agoAvoid terminating the PAM library in the forked child. This is done later
nekral-guest [Sat, 17 Nov 2007 17:19:44 +0000 (17:19 +0000)]
Avoid terminating the PAM library in the forked child.  This is done later
in the parent after closing the PAM session.
This fixes http://bugs.debian.org/412061.
Debian patch 405_su_no_pam_end_before_exec.

16 years agoMention sg in the newgrp manpage. Debian patch 410_newgrp_man_mention_sg.
nekral-guest [Sat, 17 Nov 2007 17:03:01 +0000 (17:03 +0000)]
Mention sg in the newgrp manpage. Debian patch 410_newgrp_man_mention_sg.

16 years agoFix typo: the warndays option was called warning. This is now warndays,
nekral-guest [Sat, 17 Nov 2007 16:57:37 +0000 (16:57 +0000)]
Fix typo: the warndays option was called warning.  This is now warndays,
as documented in the manpage and usage.  Debian patch 417_passwd_warndays.

16 years agoRemove the preprocessor check SHADOWPWD. The variable is no more defined
nekral-guest [Sat, 17 Nov 2007 16:50:26 +0000 (16:50 +0000)]
Remove the preprocessor check SHADOWPWD. The variable is no more defined
(and always assumed).  Debian patch 493_pwck_no_SHADOWPWD.

16 years agoAdd NEWS entries for the last 2 changes.
nekral-guest [Sat, 17 Nov 2007 16:43:00 +0000 (16:43 +0000)]
Add NEWS entries for the last 2 changes.

16 years ago-l/-u options: edit the shadow account expiry field *in addition* to
nekral-guest [Sat, 17 Nov 2007 16:40:39 +0000 (16:40 +0000)]
-l/-u options: edit the shadow account expiry field *in addition* to
editing the password field.  Debian patch 494_passwd_lock.

16 years agoFix typos.
nekral-guest [Sat, 17 Nov 2007 16:33:33 +0000 (16:33 +0000)]
Fix typos.

16 years agoNew TODO for later.
nekral-guest [Sat, 17 Nov 2007 16:27:30 +0000 (16:27 +0000)]
New TODO for later.

16 years agoDo not request a password when a user uses newgrp to switch to her primary
nekral-guest [Sat, 17 Nov 2007 16:19:00 +0000 (16:19 +0000)]
Do not request a password when a user uses newgrp to switch to her primary
group.  Debian patch 497_newgrp_primary_group.

16 years agoLog an error if the password entry could not be
nekral-guest [Sat, 17 Nov 2007 16:05:54 +0000 (16:05 +0000)]
Log an error if the password entry could not be
found (respect LOG_UNKFAIL_ENAB to avoid logging a password). This
fixes the Debian bug http://bugs.debian.org/451521

16 years ago-b documenation: Use the same notation for the -d argument as in the -d documentation.
nekral-guest [Sat, 17 Nov 2007 15:27:12 +0000 (15:27 +0000)]
-b documenation: Use the same notation for the -d argument as in the -d documentation.

16 years agoAllow the -b option even without the -D option.
nekral-guest [Sat, 17 Nov 2007 15:07:59 +0000 (15:07 +0000)]
Allow the -b option even without the -D option.

16 years agoUse the same error message for the below errors.
nekral-guest [Sat, 17 Nov 2007 14:49:39 +0000 (14:49 +0000)]
Use the same error message for the below errors.
(option working ONLY if another is specified).

16 years agoMake usermod -o and -u work independently of the argument order.
nekral-guest [Sat, 17 Nov 2007 14:40:54 +0000 (14:40 +0000)]
Make usermod -o and -u work independently of the argument order.

16 years agoValidate that two of the -L, -p, and -U options are not used at the same
nekral-guest [Sat, 17 Nov 2007 14:33:26 +0000 (14:33 +0000)]
Validate that two of the -L, -p, and -U options are not used at the same
time after the parsing of options. -U used to be allowed after -p or -L,
but not before.

16 years agoMake usermod -d and -m work independant of the argument order. Thanks to
nekral-guest [Sat, 17 Nov 2007 14:21:05 +0000 (14:21 +0000)]
Make usermod -d and -m work independant of the argument order. Thanks to
Justin Pryzby <jpryzby+d@quoininc.com> for the patch. This fixes Debian's
bug #451518.

16 years ago* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
nekral-guest [Sat, 17 Nov 2007 14:04:05 +0000 (14:04 +0000)]
* NEWS, lib/nscd.c: Execute nscd -i instead of using the private
  glibc socket to flush the nscd tables. This comes from the RedHat
  patch shadow-4.0.16-nscd.c.
* lib/commonio.c: Forbid inheritance of the passwd and group files
  to the spawed processes (like nscd). This comes from the RedHat
  patch shadow-4.0.17-notInheritFd.patch.
* lib/nscd.h: Update header.

16 years agoRemove remaining return value in update_group.
nekral-guest [Sat, 17 Nov 2007 13:48:56 +0000 (13:48 +0000)]
Remove remaining return value in update_group.

16 years ago* src/usermod.c (fail_exit): Add static variables pw_locked,
nekral-guest [Sat, 17 Nov 2007 11:42:47 +0000 (11:42 +0000)]
* src/usermod.c (fail_exit): Add static variables pw_locked,
  spw_locked, gr_locked, and sgr_locked to indicate which files must
  be unlocked.
* src/usermod.c (open_files, close_files): Open and close the
  group files as well as the passwd files. This permit to check if
  the group files modification are allowed before writing the passwd
  files.
* src/usermod.c (grp_update, update_gshadow, update_group): Do not
  return a status code, but call fail_exit() in case of error. The
  group files are no more opened and closed in update_gshadow() and
  update_group().
* src/usermod.c (main): move the call to grp_update between
  open_files and close_files.
* src/usermod.c: Differentiate failure to add a group entry and
  failure to add a shadow group entry.

16 years agoDifferentiate failure to update a group entry and failure to update a shadow group...
nekral-guest [Sat, 17 Nov 2007 11:31:06 +0000 (11:31 +0000)]
Differentiate failure to update a group entry and failure to update a shadow group entry.

16 years agoInform the user if out of memory while updating a group database.
nekral-guest [Fri, 16 Nov 2007 23:39:42 +0000 (23:39 +0000)]
Inform the user if out of memory while updating a group database.

16 years agoUpdate the group database before flushing the nscd caches.
nekral-guest [Fri, 16 Nov 2007 23:29:41 +0000 (23:29 +0000)]
Update the group database before flushing the nscd caches.

16 years agoAbort if an error is found while updating the user or group database. No
nekral-guest [Fri, 16 Nov 2007 23:26:56 +0000 (23:26 +0000)]
Abort if an error is found while updating the user or group database. No
changes will be written in the databases.

16 years agoIt is no more needed to check that the user's groups are specified only
nekral-guest [Fri, 16 Nov 2007 23:05:24 +0000 (23:05 +0000)]
It is no more needed to check that the user's groups are specified only
once in the group file. This is checked by gr_update().

16 years ago * lib/commonio.c (next_entry_by_name): New function.
nekral-guest [Fri, 16 Nov 2007 22:59:14 +0000 (22:59 +0000)]
 * lib/commonio.c (next_entry_by_name): New function.
 * NEWS, lib/commonio.c (commonio_update): When an entry is updated, make
   sure that there are no other entry with the same name. This fixes
   an infinite loop in userdel and usermod when an (erroneous) group
   file contains two entries with the same name.
   (https://bugzilla.redhat.com/show_bug.cgi?id=240915)

16 years agoFix date entry.
nekral-guest [Fri, 16 Nov 2007 22:33:59 +0000 (22:33 +0000)]
Fix date entry.

16 years ago * libmisc/salt.c: Make sure the salt string is terminated at the
nekral-guest [Fri, 16 Nov 2007 19:02:00 +0000 (19:02 +0000)]
 * libmisc/salt.c: Make sure the salt string is terminated at the
   right place (either 8th, or 11th position).
 * NEWS, src/chgpasswd.c, src/chpasswd.c: The protocol + salt does
   not need 15 chars. No need for a temporary buffer.
   This change the fix committed on 2007-11-10. The salt provided to
   pw_encrypt could have been too long.

16 years agoFix typo: missing / in <placeholder-1/>. This caused the gpasswd title to be incomple...
nekral-guest [Fri, 16 Nov 2007 14:10:29 +0000 (14:10 +0000)]
Fix typo: missing / in <placeholder-1/>. This caused the gpasswd title to be incomplete in the French manpage.

16 years agoAdd support for uClibc with no l64a().
nekral-guest [Fri, 16 Nov 2007 12:36:21 +0000 (12:36 +0000)]
Add support for uClibc with no l64a().

16 years agoAdd support for systems with no innetgr(). On those systems, username
nekral-guest [Fri, 16 Nov 2007 11:32:42 +0000 (11:32 +0000)]
Add support for systems with no innetgr().  On those systems, username
with an @ will be treated like any other username (i.e. lookup in the
local database for an user with an @). Thanks to Mike Frysinger for the
patch.

16 years agoIndentation fix.
nekral-guest [Fri, 16 Nov 2007 10:50:38 +0000 (10:50 +0000)]
Indentation fix.

16 years agoDeclare the child and pid variable at the beginning of a block. This
nekral-guest [Wed, 14 Nov 2007 13:46:15 +0000 (13:46 +0000)]
Declare the child and pid variable at the beginning of a block.  This
fixes a compilation issue with gcc 2.95. The intent is the same as
Gentoo's patch shadow-4.0.12-gcc2.patch.

16 years agoAdd a variable to set the suid permissions. This should simplify Gentoo's
nekral-guest [Wed, 14 Nov 2007 13:32:25 +0000 (13:32 +0000)]
Add a variable to set the suid permissions. This should simplify Gentoo's
patch shadow-4.0.11.1-perms.patch.

17 years agoAdded the subversion svn:keywords property (Id) for proper identification.
nekral-guest [Sat, 10 Nov 2007 23:46:11 +0000 (23:46 +0000)]
Added the subversion svn:keywords property (Id) for proper identification.

17 years agoRestore the ignore patterns from the previous repository.
nekral-guest [Sat, 10 Nov 2007 23:34:37 +0000 (23:34 +0000)]
Restore the ignore patterns from the previous repository.

17 years agoUpdate the PO files.
nekral-guest [Sat, 10 Nov 2007 22:36:37 +0000 (22:36 +0000)]
Update the PO files.

17 years agoDon't ask for a password if there are no group passwords. Just directly
nekral-guest [Sat, 10 Nov 2007 18:54:40 +0000 (18:54 +0000)]
Don't ask for a password if there are no group passwords. Just directly
give up. This comes from the Fedora's patch shadow-4.0.13-newgrpPwd.patch,
and seems to be the only part with an effect.

17 years agoFix chpasswd and chgpasswd stack overflow. Based on Fedora's shadow-4.0.18.1-overflow...
nekral-guest [Sat, 10 Nov 2007 18:48:23 +0000 (18:48 +0000)]
Fix chpasswd and chgpasswd stack overflow. Based on Fedora's shadow-4.0.18.1-overflow.patch.

17 years agoAllow non numerical group identifier to be specified with useradd's -g
nekral-guest [Sat, 10 Nov 2007 15:51:38 +0000 (15:51 +0000)]
Allow non numerical group identifier to be specified with useradd's -g
option. Applied Debian patch 397_non_numerical_identifier. Thanks also to
Greg Schafer <gschafer@zip.com.au>.

17 years agoUpdate the release date.
nekral-guest [Sun, 28 Oct 2007 15:36:14 +0000 (15:36 +0000)]
Update the release date.

17 years agoUpdate the version number to 4.0.18.2 and the gettext version to 0.16.
nekral-guest [Sat, 27 Oct 2007 23:22:11 +0000 (23:22 +0000)]
Update the version number to 4.0.18.2 and the gettext version to 0.16.

17 years agoRemove the generate_translations.mak inclusion. This file does not exist
nekral-guest [Sat, 27 Oct 2007 23:19:32 +0000 (23:19 +0000)]
Remove the generate_translations.mak inclusion. This file does not exist
and will be introduced later when the Debian patch
409_man_generate_from_PO will be included.

17 years agoRemove a plural form. nplurals=1 for japanese. Moreover, msgstr[0] was identical...
nekral-guest [Sat, 27 Oct 2007 23:18:08 +0000 (23:18 +0000)]
Remove a plural form. nplurals=1 for japanese. Moreover, msgstr[0] was identical to msgstr[1].

17 years agoMake autogen.sh executable.
nekral-guest [Sat, 27 Oct 2007 23:15:42 +0000 (23:15 +0000)]
Make autogen.sh executable.

17 years agoAdd support for 2 new resource limits. Thanks to Justin Bronder for the
nekral-guest [Sat, 27 Oct 2007 19:45:21 +0000 (19:45 +0000)]
Add support for 2 new resource limits. Thanks to Justin Bronder for the
patch. This was reported in the Debian bug #442334.
This only impact shadow when it is not compiled with PAM support.

17 years agoDocument all gpasswd.1 options separately. This clarify the gpasswd.1
nekral-guest [Sat, 27 Oct 2007 14:00:31 +0000 (14:00 +0000)]
Document all gpasswd.1 options separately. This clarify the gpasswd.1
manpages (reported in debian bug #445480).

17 years agoMention the GNU origin of some parts from su. Debian patch 438
bubulle [Sat, 27 Oct 2007 13:50:40 +0000 (13:50 +0000)]
Mention the GNU origin of some parts from su. Debian patch 438

17 years agoFix spelling error. Debian patch 433
bubulle [Sat, 27 Oct 2007 13:45:14 +0000 (13:45 +0000)]
Fix spelling error. Debian patch 433

17 years agoMerge Debian patch 416_man-fr_newgrp (yet another French fry^W fix)
bubulle [Sat, 27 Oct 2007 13:13:24 +0000 (13:13 +0000)]
Merge Debian patch 416_man-fr_newgrp (yet another French fry^W fix)

17 years agoUpdate contact information.
nekral-guest [Sat, 27 Oct 2007 13:11:28 +0000 (13:11 +0000)]
Update contact information.