b9eec1ea49
Other new functions: open_files(), close_files(). This force flushing the password database after the password file is unlocked.
nekral-guest2007-12-28 22:18:55 +00:00
566b357f99
New functions: process_flags(), check_flags(), check_perms(). Split out of main().
nekral-guest2007-12-28 22:05:51 +00:00
dc1dccd9e2
Before pam_end(), the return value of the previous pam API was already checked. No need to validate it again.
nekral-guest2007-12-28 21:29:06 +00:00
8dc4ca297c
New function check_flags(). Split the validation of options and arguments out of process_flags.
nekral-guest2007-12-28 21:04:04 +00:00
605a338216
(main, check_perms): New function check_perms(). Split the validation of the user's permissions out of main()
nekral-guest2007-12-28 20:46:24 +00:00
6d09b4ce4d
(main): Before pam_end(), the return value of the previous pam API was already checked. No need to validate it again.
nekral-guest2007-12-28 20:40:59 +00:00
ffa34c5afd
(process_flags): prefer fail_exit to exit. This avoid an explicit call to audit_logger().
nekral-guest2007-12-28 19:15:14 +00:00
da37da30e1
I forgot the initialization of group_id in find_new_gid().
nekral-guest2007-12-28 19:08:33 +00:00
b4f6b853f8
* process_args renamed process_flags * Add the options checks in process_flags (group_name, group ID uniqueness) * Add the parameters' names in the prototypes.
nekral-guest2007-12-28 11:22:27 +00:00
cc1f6c10be
Split the processing of options out of main().
nekral-guest2007-12-28 10:41:22 +00:00
08e09354b2
find_new_gid is never called when an GID is specified with -g. Simplify find_new_gid accordingly.
nekral-guest2007-12-28 10:30:39 +00:00
83b546beef
(find_new_gid): If oflg is set, gflg is also set. Use (!gflg), which is cleared than (!gflg || !oflg).
nekral-guest2007-12-28 10:19:21 +00:00
b4071939e0
A group with the specified name cannot exist at that time in find_new_gid. Remove the check.
nekral-guest2007-12-28 10:15:42 +00:00
18a654d13b
When compiled without AUDIT support, if the return code was E_SUCCESS, fail_exit() wouldn't have exited. Fix the scope of #idef WITH_AUDIT.
nekral-guest2007-12-28 09:39:22 +00:00
dfb6416a5b
libmisc/copydir.c cleanup * libmisc/copydir.c: Split copy_tree() in more maintainable functions: copy_entry(), copy_dir(), copy_symlink(), copy_hardlink(), copy_special(), and copy_file(). * libmisc/copydir.c: -1 is used to indicate an error, directly set err to -1, instead of incrementing it, and checking if not nul at the end.
nekral-guest2007-12-27 23:23:51 +00:00
bfa8ef3e75
Avoid implicit conversions to booleans.
nekral-guest2007-12-27 21:56:45 +00:00
c919701466
Simplify gpasswd's main(): Also split check_flags() out of main().
nekral-guest2007-12-27 21:19:57 +00:00
c81bf3e06f
Simplify gpasswd's main(): Split also get_group() and change_passwd() out of main().
nekral-guest2007-12-27 21:04:22 +00:00
586181bf71
Simplify gpasswd's main(): New function: check_perms(). Split out of main() to simplify main().
nekral-guest2007-12-27 19:08:31 +00:00
55d581d041
Simplify gpasswd's main(): New functions: open_files(), close_files(), update_group(). Split out from main() to simplify this (too) big function.
nekral-guest2007-12-27 18:52:40 +00:00
f429f3e38d
Simplify gpasswd's main(): New function: process_flags(). Split the processing of options out of main().
nekral-guest2007-12-27 18:27:57 +00:00
7b05484494
gpasswd cleanup * src/gpasswd.c: Add argument name to the internal function prototypes. * src/gpasswd.c: Document global variables.
nekral-guest2007-12-27 17:36:08 +00:00
5714adb090
Recommend editing the shadowed (resp. regular) file if the regular (resp. shadowed) file was edited.
nekral-guest2007-12-26 23:43:55 +00:00
ac7693ef7b
End of the previous changelog entry...
nekral-guest2007-12-26 23:17:27 +00:00
5cbc86b7d9
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.
nekral-guest2007-12-26 23:15:43 +00:00
b44a6c316d
If started as init, login and sulogin need to start a new session.
nekral-guest2007-12-26 22:36:54 +00:00
f5461ff01e
Merge Debian's patch 408_passwd_check_arguments * NEWS, src/passwd.c: Make sure that no more than one username argument was provided.
nekral-guest2007-12-26 22:17:13 +00:00
3a48f0954c
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.
nekral-guest2007-12-26 21:54:04 +00:00
fd970ab62c
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.
nekral-guest2007-12-26 16:50:38 +00:00
e663c696c2
su's arguments are now reordered. If needed, use -- to separate su's options from the shell's options.
nekral-guest2007-12-26 15:10:48 +00:00
65d0682647
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.
nekral-guest2007-12-26 13:54:23 +00:00
3935d32676
Mention RedHat's patches for previous commits.
nekral-guest2007-12-26 13:18:27 +00:00
c57e8983ff
Add option -l to avoid adding the user to the lastlog and faillog databases
nekral-guest2007-12-26 10:15:20 +00:00
a840bc8c99
The manpages should indicate how common options are.
nekral-guest2007-12-26 10:13:57 +00:00
20dfe6ba98
NO_GETPWENT is no more supported. Remove associated chunks of code.
nekral-guest2007-12-26 09:28:02 +00:00
60c167838f
Document the long options (--force, --gid, --key, --non-unique).
nekral-guest2007-12-26 09:22:49 +00:00
d6ee05ef93
Do not install the shadow library per default. lib_LTLIBRARIES changed to noinst_LTLIBRARIES.
nekral-guest2007-12-26 09:18:45 +00:00
34ed03d978
* 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.
nekral-guest2007-12-09 22:54:53 +00:00
15989f16f7
* 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.
nekral-guest2007-12-09 14:50:14 +00:00
9ac8c65e37
Make sure is_console is only defined when USE_PAM is not defined.
nekral-guest2007-12-08 23:27:35 +00:00
5a00c2a03e
Added the login.defs variables description to the man's EXTRA_DIST.
nekral-guest2007-11-27 19:42:23 +00:00
0f7f0ea467
* 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.
nekral-guest2007-11-26 23:27:56 +00:00
7fd329721a
The previous commit to man/login.defs.5.xml also describeb the usage of variables by each tools when compiled without PAM support.
nekral-guest2007-11-26 22:14:45 +00:00
4183905c3a
Add --expand-all-entities to the call to xml2po to avoid translating the external entities separately.
nekral-guest2007-11-26 22:13:16 +00:00
b75fe4940b
Put each variable description in an external entities. This will permit to reference them in the various utils manpages.
nekral-guest2007-11-26 22:11:23 +00:00
1683c26db3
Added POTFILES to the ignored files in man/po
nekral-guest2007-11-25 21:06:49 +00:00
543b693547
* 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.
nekral-guest2007-11-25 21:02:32 +00:00
971c43c0e5
Unfuzzy other Usage strings translations.
nekral-guest2007-11-25 20:21:53 +00:00
6831c45533
Do not use tabulations in Usage strings.
nekral-guest2007-11-24 22:41:24 +00:00
0e400eae56
Run "make update-po" in the po directory.
nekral-guest2007-11-24 14:02:10 +00:00
4d606cc690
* 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).
nekral-guest2007-11-24 13:08:08 +00:00
ee5c48d51c
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.
nekral-guest2007-11-24 00:37:37 +00:00
afbf2094a8
* Provide the crypt method to all the crypt_make_salt invocations. * Tag the ENCRYPTMETHOD_SELECT dependent code accordingly.
nekral-guest2007-11-24 00:26:31 +00:00
2e782e3d7d
* 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.
nekral-guest2007-11-24 00:16:41 +00:00
f0ccf72107
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.
nekral-guest2007-11-23 19:58:10 +00:00
d316ba1b87
* 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.
nekral-guest2007-11-23 19:55:47 +00:00
e15fbb905c
* 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)
nekral-guest2007-11-23 00:07:59 +00:00
a0488ccac2
* 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.
nekral-guest2007-11-22 21:55:12 +00:00
b2c58c81ed
* 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.
nekral-guest2007-11-22 21:36:38 +00:00
905596ced5
Remove chunk that should not have been committed.
nekral-guest2007-11-22 09:27:51 +00:00