]> granicus.if.org Git - shadow/log
shadow
16 years agogpasswd cleanup
nekral-guest [Thu, 27 Dec 2007 17:36:08 +0000 (17:36 +0000)]
gpasswd cleanup
* src/gpasswd.c: Add argument name to the internal function
prototypes.
* src/gpasswd.c: Document global variables.

16 years agoRecommend editing the shadowed (resp. regular) file if the regular (resp.
nekral-guest [Wed, 26 Dec 2007 23:43:55 +0000 (23:43 +0000)]
Recommend editing the shadowed (resp. regular) file if the regular (resp.
shadowed) file was edited.

16 years agoEnd of the previous changelog entry...
nekral-guest [Wed, 26 Dec 2007 23:17:27 +0000 (23:17 +0000)]
End of the previous changelog entry...

16 years agoMerge Debian's patch 451_login_PATH
nekral-guest [Wed, 26 Dec 2007 23:15:43 +0000 (23:15 +0000)]
Merge Debian's patch 451_login_PATH
* NEWS, libmisc/setupenv.c: Export PATH according to ENV_PATH and
ENV_SUPATH, as for su. This impacts login.
* man/login.1.xml: PATH and SUPATH are now used both when PAM support
is disabled and enabled.

16 years agoIf started as init, login and sulogin need to start a new session.
nekral-guest [Wed, 26 Dec 2007 22:36:54 +0000 (22:36 +0000)]
If started as init, login and sulogin need to start a new session.

16 years agoMerge Debian's patch 408_passwd_check_arguments
nekral-guest [Wed, 26 Dec 2007 22:17:13 +0000 (22:17 +0000)]
Merge Debian's patch 408_passwd_check_arguments
* NEWS, src/passwd.c: Make sure that no more than one username
argument was provided.

16 years agoRe-indent.
nekral-guest [Wed, 26 Dec 2007 21:56:47 +0000 (21:56 +0000)]
Re-indent.

16 years agoMerge Debian's patch 412_lastlog_-u_numerical_range
nekral-guest [Wed, 26 Dec 2007 21:54:04 +0000 (21:54 +0000)]
Merge Debian's patch 412_lastlog_-u_numerical_range
* NEWS, src/lastlog.c, man/lastlog.8.xml: Accept numerical user, or
  ranges with the -u option.
* TODO: The same change should be done on faillog.

16 years agoMerge Debian's patch 466_fflush-prompt
nekral-guest [Wed, 26 Dec 2007 16:50:38 +0000 (16:50 +0000)]
Merge Debian's patch 466_fflush-prompt
* libmisc/Makefile.am, lib/prototypes.h, libmisc/yesno.c, src/grpck.c,
src/pwck.c: move yes_or_no() from grpck/pwck to a separate
libmisc/yesno.c (with a read_only argument).
* libmisc/fields.c, libmisc/yesno.c: Make sure stdout is flushed before
reading the user's answer.

16 years agosu's arguments are now reordered. If needed, use -- to separate su's
nekral-guest [Wed, 26 Dec 2007 15:10:48 +0000 (15:10 +0000)]
su's arguments are now reordered. If needed, use -- to separate su's
options from the shell's options.

16 years agoMerge RedHat's patch shadow-4.0.18.1-mtime.patch:
nekral-guest [Wed, 26 Dec 2007 13:54:23 +0000 (13:54 +0000)]
Merge RedHat's patch shadow-4.0.18.1-mtime.patch:
    * NEWS: Document that usermod will now preserve user's file modification
    and access time.
    * libmisc/copydir.c: Preserve the access and modification time of copied
    files. This is important for usermod. This will also impact useradd, for
    the skeleton files, but this is not important.
    * libmisc/copydir.c: Stop and return an error if a file could not be
    closed after during a copy.

16 years agoMention RedHat's patches for previous commits.
nekral-guest [Wed, 26 Dec 2007 13:18:27 +0000 (13:18 +0000)]
Mention RedHat's patches for previous commits.

Merge RedHat's patch shadow-4.0.18.1-findNewUidOnce.patch:
* src/useradd.c (usr_update): Do not call find_new_uid(). The UID was
already either specified or found by another call to find_new_uid().
* src/useradd.c (find_new_uid): Always start with uid_min (find_new_uid()
is never called when user_id was already specified).
* src/useradd.c (find_new_uid): Fix the comments (find_new_uid() is not
called when the UID is specified (uflg)).
* src/useradd.c (main): Only call find_new_uid() if (!oflg) and (!uflg).
If uflg is set (but not oflg), check the UID uniqueness.
* src/useradd.c (find_new_uid): Don't check the uid and user name
uniqueness in find_new_uid(). The user name uniqueness is already checked
during the parameter validation. UID uniqueness is also checked (see
above).
* src/useradd.c (find_new_uid): Don't check uflg in find_new_uid().
* src/useradd.c (find_new_uid): Make sure that find_new_uid() is not
called when uflg is set (assert).

Cleanups in find_new_gid:
* src/useradd.c (find_new_gid): Check that gflg is not set (assert).
* src/useradd.c (find_new_gid): Do not check the group name uniqueness
(already checked in main).
* src/useradd.c (find_new_gid): Avoid a "continue" in the loop.
* src/useradd.c (find_new_gid): Remove irrelevant comments.
* src/useradd.c (find_new_gid): Fix the function definition's comment.

16 years agoAdd option -l to avoid adding the user to the lastlog and faillog databases
nekral-guest [Wed, 26 Dec 2007 10:15:20 +0000 (10:15 +0000)]
Add option -l to avoid adding the user to the lastlog and faillog databases

Fix the release numbers for the current NEWS entries.

16 years agoThe manpages should indicate how common options are.
nekral-guest [Wed, 26 Dec 2007 10:13:57 +0000 (10:13 +0000)]
The manpages should indicate how common options are.

16 years agoNO_GETPWENT is no more supported. Remove associated chunks of code.
nekral-guest [Wed, 26 Dec 2007 09:28:02 +0000 (09:28 +0000)]
NO_GETPWENT is no more supported. Remove associated chunks of code.

16 years agoDocument the long options (--force, --gid, --key, --non-unique).
nekral-guest [Wed, 26 Dec 2007 09:22:49 +0000 (09:22 +0000)]
Document the long options (--force, --gid, --key, --non-unique).

16 years agoDo not install the shadow library per default.
nekral-guest [Wed, 26 Dec 2007 09:18:45 +0000 (09:18 +0000)]
Do not install the shadow library per default.
lib_LTLIBRARIES changed to noinst_LTLIBRARIES.

16 years ago* NEWS, configure.in: Prepare the 4.1.0 release.
nekral-guest [Sun, 9 Dec 2007 22:54:53 +0000 (22:54 +0000)]
* NEWS, configure.in: Prepare the 4.1.0 release.
* NEWS, src/chgpasswd.c: Use chgpasswd PAM policy file instead of
  chpasswd's one.
* NEWS: The login.defs variables are documented.

16 years agoUpdated TODO list.
nekral-guest [Sun, 9 Dec 2007 22:51:47 +0000 (22:51 +0000)]
Updated TODO list.

16 years agoNew TODO.
nekral-guest [Sun, 9 Dec 2007 14:51:42 +0000 (14:51 +0000)]
New TODO.

16 years ago* man/pwconv.8.xml: Fix typos.
nekral-guest [Sun, 9 Dec 2007 14:50:14 +0000 (14:50 +0000)]
* man/pwconv.8.xml: Fix typos.
* man/chpasswd.8.xml, man/chgpasswd.8.xml: Document the NONE crypt
  method.
* man/login.defs.d/MAIL_DIR.xml: Add comment regarding useradd not
  using MAIL_FILE.
* man/login.defs.d/ERASECHAR.xml, man/login.defs.d/KILLCHAR.xml,
  man/login.defs.d/CONSOLE_GROUPS.xml, man/login.defs.d/ENV_HZ.xml,
  man/login.defs.d/ENV_PATH.xml, man/login.defs.d/ENV_SUPATH.xml:
  These variables are also used by some tools when compiled with PAM
  support.
* man/login.defs.d/ENV_HZ.xml: Add note that it is only used by
  sulogin when compiled with PAM support.
* man/login.defs.d/ENV_SUPATH.xml: Typos: ENV_PATH -> ENV_SUPATH,
  and mention sbin in the path.
* man/login.defs.d/LOGIN_STRING.xml: Fix typo: confition ->
  condition.
* man/sg.1.xml: Add CONFIGURATION section (SYSLOG_SG_ENAB).
* man/su.1.xml: ENV_HZ, LOGIN_STRING, MAIL_DIR, USERGROUPS_ENAB
  are only used when su is compiled without PAM support.
* man/login.defs.5.xml: Added variables: OBSCURE_CHECKS_ENAB
  PASS_ALWAYS_WARN PASS_CHANGE_TRIES SULOG_FILE SU_NAME
  SU_WHEEL_ONLY SYSLOG_SG_ENAB SYSLOG_SU_ENAB.
* man/login.defs.5.xml: ENVIRON_FILE is only used when compiled
  without PAM support.
* man/login.defs.5.xml: sulogin uses variables even when compiled
  with PAM support.
* man/login.1.xml: ENV_HZ ENV_PATH ENV_SUPATH MAIL_DIR UMASK are
  only used when login is not compiled with PAM support.

16 years agoMake sure is_console is only defined when USE_PAM is not defined.
nekral-guest [Sat, 8 Dec 2007 23:27:35 +0000 (23:27 +0000)]
Make sure is_console is only defined when USE_PAM is not defined.

16 years agoFix time () prototype.
nekral-guest [Sat, 8 Dec 2007 23:25:52 +0000 (23:25 +0000)]
Fix time () prototype.

16 years ago* man/login.defs.d/CONSOLE_GROUPS.xml,
nekral-guest [Sat, 8 Dec 2007 23:24:40 +0000 (23:24 +0000)]
* man/login.defs.d/CONSOLE_GROUPS.xml,
  man/login.defs.d/CONSOLE.xml, man/login.defs.d/DEFAULT_HOME.xml,
  man/login.defs.d/ENV_HZ.xml, man/login.defs.d/ENVIRON_FILE.xml,
  man/login.defs.d/ENV_PATH.xml, man/login.defs.d/ENV_SUPATH.xml,
  man/login.defs.d/ENV_TZ.xml, man/login.defs.d/ERASECHAR.xml,
  man/login.defs.d/FAIL_DELAY.xml,
  man/login.defs.d/FAILLOG_ENAB.xml,
  man/login.defs.d/FAKE_SHELL.xml, man/login.defs.d/FTMP_FILE.xml,
  man/login.defs.d/HUSHLOGIN_FILE.xml,
  man/login.defs.d/ISSUE_FILE.xml, man/login.defs.d/KILLCHAR.xml,
  man/login.defs.d/LASTLOG_ENAB.xml, man/login.defs.d/LOGIN_RETRIES.xml,
  man/login.defs.d/LOGIN_TIMEOUT.xml, man/login.defs.d/LOG_OK_LOGINS.xml,
  man/login.defs.d/LOG_UNKFAIL_ENAB.xml,
  man/login.defs.d/MAIL_CHECK_ENAB.xml, man/login.defs.d/MOTD_FILE.xml,
  man/login.defs.d/NOLOGINS_FILE.xml,
  man/login.defs.d/OBSCURE_CHECKS_ENAB.xml,
  man/login.defs.d/PASS_ALWAYS_WARN.xml,
  man/login.defs.d/PASS_CHANGE_TRIES.xml,
  man/login.defs.d/PASS_MAX_LEN.xml,
  man/login.defs.d/PORTTIME_CHECKS_ENAB.xml,
  man/login.defs.d/QUOTAS_ENAB.xml, man/login.defs.d/SULOG_FILE.xml,
  man/login.defs.d/SU_NAME.xml, man/login.defs.d/SU_WHEEL_ONLY.xml,
  man/login.defs.d/SYSLOG_SG_ENAB.xml,
  man/login.defs.d/SYSLOG_SU_ENAB.xml,
  man/login.defs.d/TTYGROUP.xml, man/login.defs.d/TTYTYPE_FILE.xml,
  man/login.defs.d/ULIMIT.xml, man/login.defs.d/USERGROUPS_ENAB.xml:
  New documentation of login.defs variables.
* man/login.defs.d/MAIL_DIR.xml: Updated. It now contains the
  MAIL_FILE documentation.
* man/login.defs.d/LOGIN_STRING.xml: Updated. Mentions %s.
* man/pwconv.8.xml, man/groupmems.8.xml, man/groupdel.8.xml,
  man/useradd.8.xml, man/pwck.8.xml, man/groupadd.8.xml,
  man/sulogin.8.xml, man/newgrp.1.xml, man/usermod.8.xml,
  man/su.1.xml, man/vipw.8.xml, man/passwd.1.xml,
  man/groupmod.8.xml, man/login.1.xml, man/userdel.8.xml,
  man/grpck.8.xml: Added CONFIGURATION section.
* man/generate_mans.mak: The generations of manpages depends on
  the variables from the Makefiles. Add the dependency on Makefile.
* man/login.defs.5.xml: New login.defs variable documented.
* man/Makefile.am: Added XML variable documentation to the
  distributed files.

16 years agoFix the newgrp section in the gshadow.5 manpage.
nekral-guest [Wed, 5 Dec 2007 21:31:21 +0000 (21:31 +0000)]
Fix the newgrp section in the gshadow.5 manpage.
Thanks to Andre Majorel <aym-naibed@teaser.fr>.

16 years agoPrepare the 4.1.0-rc1 release.
nekral-guest [Tue, 27 Nov 2007 20:08:16 +0000 (20:08 +0000)]
Prepare the 4.1.0-rc1 release.

16 years agoNew TODOs.
nekral-guest [Tue, 27 Nov 2007 19:45:36 +0000 (19:45 +0000)]
New TODOs.

16 years agoAdded the login.defs variables description to the man's EXTRA_DIST.
nekral-guest [Tue, 27 Nov 2007 19:42:23 +0000 (19:42 +0000)]
Added the login.defs variables description to the man's EXTRA_DIST.

16 years ago* man/chfn.1.xml: Uses CHFN_AUTH, CHFN_RESTRICT, LOGIN_STRING.
nekral-guest [Mon, 26 Nov 2007 23:27:56 +0000 (23:27 +0000)]
* man/chfn.1.xml: Uses CHFN_AUTH, CHFN_RESTRICT, LOGIN_STRING.
* man/chgpasswd.8.xml: Uses ENCRYPT_METHOD, MAX_MEMBERS_PER_GROUP,
  MD5_CRYPT_ENAB, SHA_CRYPT_MIN_ROUNDS (SHA_CRYPT_MAX_ROUNDS).
* man/chpasswd.8.xml: Switch to using entities for ENCRYPT_METHOD,
  MD5_CRYPT_ENAB, SHA_CRYPT_MIN_ROUNDS (SHA_CRYPT_MAX_ROUNDS).
* man/chsh.1.xml: Uses CHSH_AUTH, LOGIN_STRING.
* man/expiry.1.xml: Does not use any login.defs parameter.
* man/gpasswd.1.xml: Uses ENCRYPT_METHOD, MAX_MEMBERS_PER_GROUP,
  MD5_CRYPT_ENAB, SHA_CRYPT_MIN_ROUNDS.
* man/login.defs.5.xml: Added CHSH_AUTH.
* man/login.defs.5.xml: Cross reference -> cross references.
* man/login.defs.5.xml: chfn only uses CHFN_AUTH when no_pam.
* man/login.defs.5.xml: chsh uses CHSH_AUTH, not CHFN_AUTH.
* man/login.defs.d/CHSH_AUTH.xml: Added.
* man/login.defs.5.xml: chsh uses parameters only when no_pam.
* man/login.defs.5.xml: expiry does not use CONSOLE_GROUPS, even
  if linked in the binary.
* man/newusers.8.xml: Uses ENCRYPT_METHOD, MAX_MEMBERS_PER_GROUP,
  MD5_CRYPT_ENAB, PASS_MAX_DAYS, PASS_MIN_DAYS, PASS_WARN_AGE,
  SHA_CRYPT_MIN_ROUNDS, UMASK.

16 years agoThe previous commit to man/login.defs.5.xml also describeb the usage of
nekral-guest [Mon, 26 Nov 2007 22:14:45 +0000 (22:14 +0000)]
The previous commit to man/login.defs.5.xml also describeb the usage of
variables by each tools when compiled without PAM support.

16 years agoAdd --expand-all-entities to the call to xml2po to avoid translating the
nekral-guest [Mon, 26 Nov 2007 22:13:16 +0000 (22:13 +0000)]
Add --expand-all-entities to the call to xml2po to avoid translating the
external entities separately.

16 years agoPut each variable description in an external entities. This will permit to
nekral-guest [Mon, 26 Nov 2007 22:11:23 +0000 (22:11 +0000)]
Put each variable description in an external entities. This will permit to
reference them in the various utils manpages.

16 years agoDo not generate gmo files.
nekral-guest [Mon, 26 Nov 2007 22:04:20 +0000 (22:04 +0000)]
Do not generate gmo files.

16 years agoEnd of the PO unfuzzyfication (after tabulation removal in Usage strings)
nekral-guest [Mon, 26 Nov 2007 22:00:57 +0000 (22:00 +0000)]
End of the PO unfuzzyfication (after tabulation removal in Usage strings)

16 years agoFix typo.
nekral-guest [Sun, 25 Nov 2007 22:05:08 +0000 (22:05 +0000)]
Fix typo.

16 years ago* man/po/LINGUAS: Added missing LINGUAS.
nekral-guest [Sun, 25 Nov 2007 21:28:26 +0000 (21:28 +0000)]
* man/po/LINGUAS: Added missing LINGUAS.
* man/po/de.po, man/po/fr.po, man/po/it.po, man/po/pl.po,
  man/po/ru.po, man/po/sv.po: Updated.

16 years agoAdded POTFILES to the ignored files in man/po
nekral-guest [Sun, 25 Nov 2007 21:06:49 +0000 (21:06 +0000)]
Added POTFILES to the ignored files in man/po

16 years ago* configure.in, man/po/Makefile.in.in, man/po/Makevars,
nekral-guest [Sun, 25 Nov 2007 21:02:32 +0000 (21:02 +0000)]
* configure.in, man/po/Makefile.in.in, man/po/Makevars,
  man/po/POTFILES.in, man/Makefile.am: Generate the PO files for the
  manpages in the man/po directory (instead of man/<lang>). Use a
  Makefile.in.in based on gettext's one. This ensure that the PO are
  generated before being used in the <lang> directories.
* man/generate_mans.mak, man/generate_translations.mak,
  man/Makefile.am: New makefile for the generation of manpages from
  XML (generate_mans.mak). This avoid duplicate chunks in
  generate_translations.mak and Makefile.am
* man/de/de.po, man/fr/fr.po, man/it/it.po, man/pl/pl.po,
  man/ru/ru.po, man/sv/sv.po: Moved to...
* man/po/de.po, man/po/fr.po, man/po/it.po, man/po/pl.po,
  man/po/ru.po, man/po/sv.po: ... here.

16 years agoOne more fix to avoid a fuzzy string.
nekral-guest [Sun, 25 Nov 2007 20:27:25 +0000 (20:27 +0000)]
One more fix to avoid a fuzzy string.

16 years agoUnfuzzy other Usage strings translations.
nekral-guest [Sun, 25 Nov 2007 20:21:53 +0000 (20:21 +0000)]
Unfuzzy other Usage strings translations.

Note: km.po and ne.po contain translated options.

16 years agoDo not use tabulations in Usage strings.
nekral-guest [Sat, 24 Nov 2007 22:41:24 +0000 (22:41 +0000)]
Do not use tabulations in Usage strings.

16 years agoRun "make update-po" in the po directory.
nekral-guest [Sat, 24 Nov 2007 14:02:10 +0000 (14:02 +0000)]
Run "make update-po" in the po directory.

16 years ago* configure.in: New configure option: --with-sha-crypt enabled by
nekral-guest [Sat, 24 Nov 2007 13:08:08 +0000 (13:08 +0000)]
* configure.in: New configure option: --with-sha-crypt enabled by
  default. Keeping the feature enabled is safe. Disabling it permits
  to disable the references to the SHA256 and SHA512 password
  encryption algorithms from the usage help and manuals (in addition
  to the support for these algorithms in the code).
* libmisc/obscure.c, libmisc/salt.c, src/newusers.c,
  src/chpasswd.c, src/chgpasswd.c, src/passwd.c: ENCRYPT_METHOD is
  always supported in login.defs. Remove the ENCRYPTMETHOD_SELECT
  preprocessor condition.
* libmisc/obscure.c, libmisc/salt.c, src/newusers.c,
  src/chpasswd.c, src/chgpasswd.c, src/passwd.c: Disable SHA256 and
  SHA512 if USE_SHA_CRYPT is not defined (this corresponds to a
  subset of the ENCRYPTMETHOD_SELECT sections).

16 years agoIf we requested a non DES encryption, make sure crypt returned a encrypted
nekral-guest [Sat, 24 Nov 2007 00:37:37 +0000 (00:37 +0000)]
If we requested a non DES encryption, make sure crypt returned a encrypted
password longer than 13 chars. This protects against the GNU crypt() which
does not return NULL if the algorithm is not supported, and return a DES
encrypted password.

16 years agoAdd missing #include "getdef.h"
nekral-guest [Sat, 24 Nov 2007 00:28:25 +0000 (00:28 +0000)]
Add missing #include "getdef.h"

16 years ago* Provide the crypt method to all the
nekral-guest [Sat, 24 Nov 2007 00:26:31 +0000 (00:26 +0000)]
* Provide the crypt method to all the
  crypt_make_salt invocations.
* Tag the ENCRYPTMETHOD_SELECT dependent code
  accordingly.

16 years ago* libmisc/salt.c: Make sure method is not NULL, defaulting to DES.
nekral-guest [Sat, 24 Nov 2007 00:16:41 +0000 (00:16 +0000)]
* libmisc/salt.c: Make sure method is not NULL, defaulting to DES.
  Thanks to Dan Kopecek <dkopecek@redhat.com>.
* src/chpasswd.c, src/chgpasswd.c: Do not use DES by default, but
  the system default define in /Etc/login.defs. Thanks to Dan
  Kopecek <dkopecek@redhat.com>.
* NEWS, man/chpasswd.8.xml, man/chgpasswd.8.xml: Do not mention
  DES as the default algorithm.
* src/chpasswd.c, src/chgpasswd.c: Tag the ENCRYPTMETHOD_SELECT
  dependent code accordingly.

16 years agoRe-indent.
nekral-guest [Sat, 24 Nov 2007 00:00:12 +0000 (00:00 +0000)]
Re-indent.

16 years agoMake sure method is not NULL, defaulting to DES. Thanks to Dan Kopecek <dkopecek...
nekral-guest [Fri, 23 Nov 2007 23:57:47 +0000 (23:57 +0000)]
Make sure method is not NULL, defaulting to DES. Thanks to Dan Kopecek <dkopecek@redhat.com>.

16 years ago* Move the srandom call to gensalt.
nekral-guest [Fri, 23 Nov 2007 21:04:43 +0000 (21:04 +0000)]
* Move the srandom call to gensalt.
* Replace the test on salt_size by an assert.

16 years agoApplied patch shadow-utils-4.0.18.2-salt.patch. Thanks to Dan Kopecek <dkopecek@redha...
nekral-guest [Fri, 23 Nov 2007 20:51:43 +0000 (20:51 +0000)]
Applied patch shadow-utils-4.0.18.2-salt.patch. Thanks to Dan Kopecek <dkopecek@redhat.com>

16 years agoNews options -c/--crypt-method -s/--sha-rounds to newusers.
nekral-guest [Fri, 23 Nov 2007 20:24:42 +0000 (20:24 +0000)]
News options -c/--crypt-method -s/--sha-rounds to newusers.
Document also new login.defs variables.

16 years agoAdded prototype for getlong.
nekral-guest [Fri, 23 Nov 2007 20:11:00 +0000 (20:11 +0000)]
Added prototype for getlong.

16 years ago* src/chpasswd.c: Added crypt method: NONE.
nekral-guest [Fri, 23 Nov 2007 20:09:57 +0000 (20:09 +0000)]
* src/chpasswd.c: Added crypt method: NONE.
* src/chpasswd.c: Added --sha-rounds to the usage().
* libmisc/Makefile.am, libmisc/getlong.c, src/chgpasswd.c,
  src/chpasswd.c: New getlong function. Replace chpasswd's and
  chgpasswd's getnumber.

16 years agoRemoved unused variable 'member'.
nekral-guest [Fri, 23 Nov 2007 20:00:03 +0000 (20:00 +0000)]
Removed unused variable 'member'.

16 years agoDocument the variables used by chpasswd. The definitions are copied from
nekral-guest [Fri, 23 Nov 2007 19:58:10 +0000 (19:58 +0000)]
Document the variables used by chpasswd.  The definitions are copied from
login.defs. I should try to use a less error prone process for this.

16 years ago* Use <replaceable> for the values set by
nekral-guest [Fri, 23 Nov 2007 19:55:47 +0000 (19:55 +0000)]
* Use <replaceable> for the values set by
  users. (was sometimes <emphasis remap='I'>)
* Use <option> vor the variable names. This
  makes the manpage much more readable.
* (ENCRYPT_METHOD, MD5_CRYPT_ENAB,
  SHA_CRYPT_MIN_ROUNDS, SHA_CRYPT_MAX_ROUNDS): Mention that command
  line option may supersede the system setting.
* Document the variables used by chpasswd
  and chgpasswd.

16 years agosvn propset svn:keywords Id
nekral-guest [Fri, 23 Nov 2007 19:44:57 +0000 (19:44 +0000)]
svn propset svn:keywords Id

16 years ago* NEWS, lib/getdef.c, man/login.defs.5.xml: New login.defs
nekral-guest [Fri, 23 Nov 2007 00:07:59 +0000 (00:07 +0000)]
* NEWS, lib/getdef.c, man/login.defs.5.xml: New login.defs
  variable: MAX_MEMBERS_PER_GROUP. Used for the split groups support.
* lib/commonio.c, lib/commonio.h: Add an open_hook and close_hook
  operation. They are called after the database is actually opened
  and parse, or before it is closed.
* lib/groupio.c: Add an open_hook to merge split groups, and an
  close group to split groups if MAX_MEMBERS_PER_GROUP is set.
  This fixes gpasswd and chgpasswd when split groups are used.
* lib/sgroupio.c, lib/shadowio.c, lib/pwio.c: No open or close
  hooks for these databases. (unsure about what should be the gshadow
  behavior for split groups)

16 years ago* NEWS, src/gpasswd.c: Read the group and shadow groups using
nekral-guest [Thu, 22 Nov 2007 21:55:12 +0000 (21:55 +0000)]
* NEWS, src/gpasswd.c: Read the group and shadow groups using
  gr_locate and sgr_locate. gpasswd write in the file database. Thus
  it should read information from the file database, not using
  getgrnam. The change to sgr_locate is just for consistency. This
  requires opening the group databases (read only) using
  gr_open/sgr_open.
* NEWS: Indicate that manpages should be re-generated if configure
  option are changed, due to conditions.

16 years ago* configure.in: SHADOWGRP added to AM_CONDITIONAL for the
nekral-guest [Thu, 22 Nov 2007 21:36:38 +0000 (21:36 +0000)]
* configure.in: SHADOWGRP added to AM_CONDITIONAL for the
  generation of manpages.
* man/generate_translations.mak: Added pam/no_pam condition (like
  in man/Makefile.am).
* man/Makefile.am, man/generate_translations.mak: Added
  gshadow/no_gshadow condition.
* man/gpasswd.1.xml: Use the gshadow/no_gshadow condition to
  change the manpage depending on the shadow group support.

16 years agoRemove chunk that should not have been committed.
nekral-guest [Thu, 22 Nov 2007 09:27:51 +0000 (09:27 +0000)]
Remove chunk that should not have been committed.

16 years agoUpdated to 757t. Thanks to Yuri Kozlov <kozlov.y@gmail.com>.
nekral-guest [Thu, 22 Nov 2007 00:15:25 +0000 (00:15 +0000)]
Updated to 757t. Thanks to Yuri Kozlov <kozlov.y@gmail.com>.

16 years agoUpdated to 399t. Thanks to Yuri Kozlov <kozlov.y@gmail.com>.
nekral-guest [Thu, 22 Nov 2007 00:06:50 +0000 (00:06 +0000)]
Updated to 399t. Thanks to Yuri Kozlov <kozlov.y@gmail.com>.

16 years agoAdd support for conditionally including paragraphs. (e.g. to support the
nekral-guest [Thu, 22 Nov 2007 00:01:58 +0000 (00:01 +0000)]
Add support for conditionally including paragraphs. (e.g. to support the
documentation of PAM and !PAM features).

I hate docbook!

16 years ago* man/newusers.8.xml: Added /etc/gshadow, /etc/group, /etc/shadow,
nekral-guest [Wed, 21 Nov 2007 22:12:14 +0000 (22:12 +0000)]
* man/newusers.8.xml: Added /etc/gshadow, /etc/group, /etc/shadow,
  and /etc/passwd to section FILES.
* man/newusers.8.xml: Mentions that PAM is not used to set the
  passwords.
* man/chpasswd.8.xml: Added section FILES (/etc/passwd,
  /etc/shadow, /etc/login.defs).
* man/chpasswd.8.xml: Use the same paragraph as in newusers.8.xml
  to indicate that PAM is not used.
* man/chgpasswd.8.xml: Added section FILES (/etc/group,
  /etc/gshadow, /etc/login.defs).

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.