]> granicus.if.org Git - shadow/log
shadow
16 years agoThe crypt_method string always points to a constant string. Add the const qualifier.
nekral-guest [Sun, 6 Jan 2008 12:26:20 +0000 (12:26 +0000)]
The crypt_method string always points to a constant string. Add the const qualifier.

16 years agoRemove prototype of l64a() (not used in pwunconv).
nekral-guest [Sun, 6 Jan 2008 12:12:30 +0000 (12:12 +0000)]
Remove prototype of l64a() (not used in pwunconv).

16 years agoRemove prototypes for __gr_del_entry(), __gr_get_head(),
nekral-guest [Sun, 6 Jan 2008 12:09:38 +0000 (12:09 +0000)]
Remove prototypes for __gr_del_entry(), __gr_get_head(),
__sgr_del_entry(), and __sgr_get_head().

16 years ago* src/login_nopam.c: Use an ANSI prototype for resolve_hostname()
nekral-guest [Sun, 6 Jan 2008 12:07:42 +0000 (12:07 +0000)]
* src/login_nopam.c: Use an ANSI prototype for resolve_hostname()
  instead of K&R prototype.
* src/login_nopam.c: Fix the prototypes of list_match(),
  user_match(), from_match(), string_match(). There were no
  parameters in the prototypes.
* src/login_nopam.c: Fix the prototypes of the function parameter
  match_fn of list_match().

16 years agoRemove the src parameter of copy_special().
nekral-guest [Sun, 6 Jan 2008 12:02:24 +0000 (12:02 +0000)]
Remove the src parameter of copy_special().
The entry's information are taken from the stat structure.

16 years ago* libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c,
nekral-guest [Sun, 6 Jan 2008 11:59:01 +0000 (11:59 +0000)]
* libmisc/console.c, libmisc/ulimit.c, lib/sgetgrent.c,
  lib/sgetpwent.c: Include "prototypes.h" to make
  sure the exported prototypes are the ones used for the definition
  of functions.
* lib/prototypes.h: Added prototypes for __gr_del_entry(),
  __gr_get_db(), __gr_get_head(), __gr_set_changed(), __gr_dup(),
  __pw_del_entry(), __pw_get_db(), __pw_get_head(), __pw_dup(),
  sgetgrent(), sgetpwent(), __sgr_del_entry(), __sgr_dup(),
  __sgr_get_head(), __sgr_set_changed(), __spw_get_head(),
  __spw_del_entry(), __spw_dup().
* lib/prototypes.h: Removed prototype for is_listed().
* lib/prototypes.h: Added name of the check_su_auth()'s parameters.
* lib/groupio.h: Removed prototypes for __gr_dup() and
  __gr_set_changed().
* lib/sgroupio.c: Removed prototypes for putsgent(), sgetsgent(),
  and __gr_get_db().
* lib/sgroupio.h: Removed prototypes for __sgr_dup() and
  __sgr_set_changed().
* lib/shadowio.c: Removed prototype for __pw_get_db().
* lib/pwio.c: Removed prototype for sgetpwent() and putpwent().
* lib/shadowio.h: Removed prototypes for __spw_dup() and
  __spw_set_changed().
* lib/pwio.h: Removed prototypes for __pw_dup() and
  __pw_set_changed().
* lib/commonio.h: Add protection against multiple inclusions.
* lib/prototypes.h: Include commonio.h (needed for the
  __xx_del_entry() functions).

16 years agoAdd documentation for the new --password options.
nekral-guest [Sat, 5 Jan 2008 17:25:00 +0000 (17:25 +0000)]
Add documentation for the new --password options.

16 years agoFix find_new_gid() prototype. Add a void parameter.
nekral-guest [Sat, 5 Jan 2008 17:23:46 +0000 (17:23 +0000)]
Fix find_new_gid() prototype. Add a void parameter.

16 years agoRemove old comments in the header.
nekral-guest [Sat, 5 Jan 2008 17:22:38 +0000 (17:22 +0000)]
Remove old comments in the header.

16 years agoInclude <lastlog.h> for the declaration of struct lastlog.
nekral-guest [Sat, 5 Jan 2008 17:20:45 +0000 (17:20 +0000)]
Include <lastlog.h> for the declaration of struct lastlog.

16 years agoFix typos.
nekral-guest [Sat, 5 Jan 2008 16:44:51 +0000 (16:44 +0000)]
Fix typos.

16 years ago* lib/prototypes.h: Add the dolastlog() prototype.
nekral-guest [Sat, 5 Jan 2008 16:44:28 +0000 (16:44 +0000)]
* lib/prototypes.h: Add the dolastlog() prototype.
* lib/prototypes.h: Typo: login.c -> loginprompt.c
* src/login.c: Remove declaration of dolastlog().
* libmisc/log.c: dolastlog() should not have been changed to static.
  Include prototypes.h instead.

16 years ago* libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h>
nekral-guest [Sat, 5 Jan 2008 16:33:43 +0000 (16:33 +0000)]
* libmisc/pwdcheck.c: Do not include <pwd.h>. Include <shadow.h>
  and "pwauth.h" only when compiled without PAM support.
* src/chfn.c, src/chsh.c: Do not include <shadow.h>
* lib/commonio.c: Do not include <shadow.h>. Do not include
  <pwd.h>. Include "nscd.h" instead of <nscd.h>.
* configure.in: Do not check if shadow.h exist, but make sure it
  exists.
* libmisc/pwdcheck.c, src/chfn.c, src/chsh.c, lib/defines.h,
  lib/shadowmem.c, lib/shadowio.c, lib/commonio.c:
  HAVE_SHADOW_H is no more needed (shadow.h should always exist).

16 years agoFix the do_pam_passwd() prototype (it returns void).
nekral-guest [Sat, 5 Jan 2008 15:43:33 +0000 (15:43 +0000)]
Fix the do_pam_passwd() prototype (it returns void).

16 years agodo_pam_passwd should not have been defined static, prototypes.h needed
nekral-guest [Sat, 5 Jan 2008 15:41:58 +0000 (15:41 +0000)]
do_pam_passwd should not have been defined static, prototypes.h needed
to be included instead.

16 years agoRemove prototype of putgrent(), add parameter's name of sgetgrent().
nekral-guest [Sat, 5 Jan 2008 14:35:13 +0000 (14:35 +0000)]
Remove prototype of putgrent(), add parameter's name of sgetgrent().

16 years agoAdd option --password to groupadd and groupmod (similar to useradd and usermod).
nekral-guest [Sat, 5 Jan 2008 14:17:43 +0000 (14:17 +0000)]
Add option --password to groupadd and groupmod (similar to useradd and usermod).

16 years agoRemove the declaration of getutent(), getutline(), setutent(), and
nekral-guest [Sat, 5 Jan 2008 14:09:56 +0000 (14:09 +0000)]
Remove the declaration of getutent(), getutline(), setutent(), and
endutent() which are declared in <utmp.h>

16 years agostat shadows another stat variable. Remove this
nekral-guest [Sat, 5 Jan 2008 14:01:34 +0000 (14:01 +0000)]
stat shadows another stat variable. Remove this
variable, and directly check the result of getfscreatecon().

16 years agoChangelog entry forgotten in previous src/gshadow.c commit:
nekral-guest [Sat, 5 Jan 2008 13:58:56 +0000 (13:58 +0000)]
Changelog entry forgotten in previous src/gshadow.c commit:
 * list() is an external function. DO not shadow it
   with a static function. The internal list() was renamed
   build_list().

16 years agoThe prototypes of fgetsx() and fputsx() are already defined in
nekral-guest [Sat, 5 Jan 2008 13:56:21 +0000 (13:56 +0000)]
The prototypes of fgetsx() and fputsx() are already defined in
prototypes.h. Remove the declaration of these functions.

16 years agologinsh is a global variable, use newshell for the update_shell()'s parameter.
nekral-guest [Sat, 5 Jan 2008 13:54:39 +0000 (13:54 +0000)]
loginsh is a global variable, use newshell for the update_shell()'s parameter.

16 years agologin_prompt is the name of a function, use loginprompt for the internal variable.
nekral-guest [Sat, 5 Jan 2008 13:53:14 +0000 (13:53 +0000)]
login_prompt is the name of a function, use loginprompt for the internal variable.

16 years agoMake a proper prototype for the main() function declaration. (add void)
nekral-guest [Sat, 5 Jan 2008 13:51:43 +0000 (13:51 +0000)]
Make a proper prototype for the main() function declaration. (add void)

16 years agoAdd changelog entry for previous commit.
nekral-guest [Sat, 5 Jan 2008 13:49:32 +0000 (13:49 +0000)]
Add changelog entry for previous commit.

16 years agoAdd missing include "shadowio.h". (This was OK as long as prototypes.h included this...
nekral-guest [Sat, 5 Jan 2008 13:40:49 +0000 (13:40 +0000)]
Add missing include "shadowio.h". (This was OK as long as prototypes.h included this file.)

16 years ago* libmisc/pam_pass.c: Define do_pam_passwd() as static and add its prototype.
nekral-guest [Sat, 5 Jan 2008 13:37:32 +0000 (13:37 +0000)]
* libmisc/pam_pass.c: Define do_pam_passwd() as static and add its prototype.
* libmisc/log.c: Define dolastlog() as static and add its prototype.
* src/chage.c: Define isnum() as static and add its prototype.

16 years agoInclude config.h as a system include, as recommended by the autoconf documentation.
nekral-guest [Sat, 5 Jan 2008 13:32:32 +0000 (13:32 +0000)]
Include config.h as a system include, as recommended by the autoconf documentation.

16 years agoDefine is_listed() as static and add its prototype.
nekral-guest [Sat, 5 Jan 2008 13:29:24 +0000 (13:29 +0000)]
Define is_listed() as static and add its prototype.

16 years agoInclude "prototypes.h" to make sure the exported prototypes are
nekral-guest [Sat, 5 Jan 2008 13:23:22 +0000 (13:23 +0000)]
Include "prototypes.h" to make sure the exported prototypes are
the ones used for the definition of functions.

16 years ago"shadowio.h" was included for the definition of the spwd structure.
nekral-guest [Sat, 5 Jan 2008 13:07:54 +0000 (13:07 +0000)]
"shadowio.h" was included for the definition of the spwd structure.
Replace this include by <shadow.h>

16 years agogrent.c does not exist anymore. Remove the putgrent prototype.
nekral-guest [Sat, 5 Jan 2008 13:05:21 +0000 (13:05 +0000)]
grent.c does not exist anymore. Remove the putgrent prototype.

16 years agoAdd the syslog_sg prototype.
nekral-guest [Tue, 1 Jan 2008 23:56:03 +0000 (23:56 +0000)]
Add the syslog_sg prototype.

16 years agoAlso split syslog_sg() out of main().
nekral-guest [Tue, 1 Jan 2008 23:54:51 +0000 (23:54 +0000)]
Also split syslog_sg() out of main().

16 years agoRemove duplicate logging to syslog.
nekral-guest [Tue, 1 Jan 2008 23:45:44 +0000 (23:45 +0000)]
Remove duplicate logging to syslog.

16 years agoSplit check_perms() out of main().
nekral-guest [Tue, 1 Jan 2008 23:35:55 +0000 (23:35 +0000)]
Split check_perms() out of main().

16 years agoAvoid assignments in conditionals.
nekral-guest [Tue, 1 Jan 2008 23:07:55 +0000 (23:07 +0000)]
Avoid assignments in conditionals.

16 years agoAvoid assignments in conditionals.
nekral-guest [Tue, 1 Jan 2008 22:21:55 +0000 (22:21 +0000)]
Avoid assignments in conditionals.

16 years ago(split_groups): Test the pointer returned by malloc.
nekral-guest [Tue, 1 Jan 2008 20:47:31 +0000 (20:47 +0000)]
(split_groups): Test the pointer returned by malloc.

16 years agoDocument add_one_entry_nis(), write_all(), commonio_remove(),
nekral-guest [Tue, 1 Jan 2008 20:34:47 +0000 (20:34 +0000)]
Document add_one_entry_nis(), write_all(), commonio_remove(),
commonio_locate(), and commonio_rewind().

16 years agoFix typo s/groupadd/chpasswd/
nekral-guest [Tue, 1 Jan 2008 19:56:29 +0000 (19:56 +0000)]
Fix typo s/groupadd/chpasswd/

16 years agoNew TODO item:
nekral-guest [Tue, 1 Jan 2008 19:54:37 +0000 (19:54 +0000)]
New TODO item:
 - newusers: add logging to SYSLOG & AUDIT

16 years agoFix typo s/groupadd/chage/
nekral-guest [Tue, 1 Jan 2008 19:53:33 +0000 (19:53 +0000)]
Fix typo s/groupadd/chage/

16 years agoFix typo s/groupadd/chgpasswd/.
nekral-guest [Tue, 1 Jan 2008 19:53:02 +0000 (19:53 +0000)]
Fix typo s/groupadd/chgpasswd/.

16 years agoAvoid implicit conversions to booleans.
nekral-guest [Tue, 1 Jan 2008 18:27:40 +0000 (18:27 +0000)]
Avoid implicit conversions to booleans.

16 years agoAvoid implicit brackets.
nekral-guest [Tue, 1 Jan 2008 18:04:46 +0000 (18:04 +0000)]
Avoid implicit brackets.

16 years agoRe-indent.
nekral-guest [Tue, 1 Jan 2008 17:56:33 +0000 (17:56 +0000)]
Re-indent.

16 years agoAvoid implicit conversions to booleans.
nekral-guest [Tue, 1 Jan 2008 17:51:54 +0000 (17:51 +0000)]
Avoid implicit conversions to booleans.

16 years agouse_system_pw_file and use_system_spw_file were not reset.
nekral-guest [Tue, 1 Jan 2008 17:43:18 +0000 (17:43 +0000)]
use_system_pw_file and use_system_spw_file were not reset.

16 years agoRe-indent.
nekral-guest [Tue, 1 Jan 2008 16:58:13 +0000 (16:58 +0000)]
Re-indent.

16 years agoAvoid implicit brackets.
nekral-guest [Tue, 1 Jan 2008 16:54:18 +0000 (16:54 +0000)]
Avoid implicit brackets.

16 years agoignore libmisc.a
nekral-guest [Tue, 1 Jan 2008 16:40:50 +0000 (16:40 +0000)]
ignore libmisc.a

16 years agoNo functional changes were introduced by the previous pwck and grpck
nekral-guest [Tue, 1 Jan 2008 16:36:06 +0000 (16:36 +0000)]
No functional changes were introduced by the previous pwck and grpck
changes, except for the following bug fix: no syslog logging if a passwd
or group file was specified on the command line without a shadowed
database file, even if the system shadowed database was changed).

16 years ago* Fix open_files prototype (void argument).
nekral-guest [Tue, 1 Jan 2008 16:28:01 +0000 (16:28 +0000)]
* Fix open_files prototype (void argument).
* close_file documentation (s:password/shadow:group/gshadow:)

16 years agoFix typos in comments (gshadow/shadow).
nekral-guest [Tue, 1 Jan 2008 16:25:57 +0000 (16:25 +0000)]
Fix typos in comments (gshadow/shadow).

16 years agoSimplify pwck's main(). Remove gotos.
nekral-guest [Tue, 1 Jan 2008 15:52:07 +0000 (15:52 +0000)]
Simplify pwck's main(). Remove gotos.

16 years agoSplit also check_pw_file() and check_spw_file() out of main().
nekral-guest [Tue, 1 Jan 2008 15:49:33 +0000 (15:49 +0000)]
Split also check_pw_file() and check_spw_file() out of main().

16 years agoAlso split open_files and close_files out of main().
nekral-guest [Tue, 1 Jan 2008 15:29:47 +0000 (15:29 +0000)]
Also split open_files and close_files out of main().
New global variables use_system_pw_file and use_system_spw_file

16 years agoSplit process_flags() out of main(). New global variables is_shadow,
nekral-guest [Tue, 1 Jan 2008 15:07:41 +0000 (15:07 +0000)]
Split process_flags() out of main(). New global variables is_shadow,
sort_mode.

16 years agoDe-comment code (duplicate the entry when the _R function is not present on the system).
nekral-guest [Tue, 1 Jan 2008 14:48:04 +0000 (14:48 +0000)]
De-comment code (duplicate the entry when the _R function is not present on the system).

16 years ago* src/lastlog.c: Remove statbuf, not used.
nekral-guest [Tue, 1 Jan 2008 14:38:47 +0000 (14:38 +0000)]
* src/lastlog.c: Remove statbuf, not used.
* src/lastlog.c: Fix types, cast umin and umax to uid_t.
* src/lastlog.c: (option -u) user needs to be a signed long, not
  uid_t (to accept rangees like -<uid>

16 years agoAvoid ?: construct without the middle term.
nekral-guest [Tue, 1 Jan 2008 14:34:07 +0000 (14:34 +0000)]
Avoid ?: construct without the middle term.

16 years agoForgot to commit that one.
nekral-guest [Tue, 1 Jan 2008 14:32:41 +0000 (14:32 +0000)]
Forgot to commit that one.
Avoid empty file when USE_PAM is set.

16 years ago* libmisc/copydir.c, src/usermod.c, lib/prototypes.h: The uid and
nekral-guest [Tue, 1 Jan 2008 14:31:00 +0000 (14:31 +0000)]
* libmisc/copydir.c, src/usermod.c, lib/prototypes.h: The uid and
  gid parameters can be set to -1 to indicate that the original
  owners must be kept. Change the types from uid_t/gid_t to a
  long int (signed).
* libmisc/copydir.c: Change the copy_entry(), copy_dir(),
  copy_symlink(), copy_special(), and copy_file() prototypes
  accordingly.
* lib/prototypes.h: Add the parameters' name for the
  libmisc/copydir.c functions.

16 years agoAvoid empty file when WITH_AUDIT is not set.
nekral-guest [Tue, 1 Jan 2008 14:20:36 +0000 (14:20 +0000)]
Avoid empty file when WITH_AUDIT is not set.

16 years ago* libmisc/limits.c, libmisc/obscure.c, src/login_nopam.c,
nekral-guest [Tue, 1 Jan 2008 14:18:55 +0000 (14:18 +0000)]
* libmisc/limits.c, libmisc/obscure.c, src/login_nopam.c,
  lib/pwauth.c: Avoid empty file when USE_PAM is set.
* src/login_nopam.c: Fix warnings: resolve_hostname takes and
  returns a constant string.

16 years agoRemove inaccurate documentation.
nekral-guest [Tue, 1 Jan 2008 14:12:34 +0000 (14:12 +0000)]
Remove inaccurate documentation.
The password file is no more opened in read only mode.

16 years agoAdd missing prototype declarations.
nekral-guest [Tue, 1 Jan 2008 14:10:21 +0000 (14:10 +0000)]
Add missing prototype declarations.
Document the new functions.

16 years agoI forgot to mention compare_members_lists().
nekral-guest [Tue, 1 Jan 2008 14:09:47 +0000 (14:09 +0000)]
I forgot to mention compare_members_lists().

16 years agoSplit check_members() out of check_grp_file() and check_sgr_file().
nekral-guest [Tue, 1 Jan 2008 13:50:06 +0000 (13:50 +0000)]
Split check_members() out of check_grp_file() and check_sgr_file().

16 years agoSplit check_grp_file() and check_sgr_file() out of main().
nekral-guest [Tue, 1 Jan 2008 13:48:49 +0000 (13:48 +0000)]
Split check_grp_file() and check_sgr_file() out of main().

16 years agoSplit process_flags(), open_files(), and close_files() out of main(). New
nekral-guest [Tue, 1 Jan 2008 13:13:47 +0000 (13:13 +0000)]
Split process_flags(), open_files(), and close_files() out of main(). New
global variables is_shadow, sort_mode, use_system_grp_file, and
use_system_sgr_file.

16 years agoIf remove-potcdate.sin does not exist, use the one from teh po directory
nekral-guest [Mon, 31 Dec 2007 20:16:46 +0000 (20:16 +0000)]
If remove-potcdate.sin does not exist, use the one from teh po directory
(it is not installed automatically by autopoint.

16 years agoCompilation fix. pamh needs to be global since the split of check_perms().
nekral-guest [Mon, 31 Dec 2007 20:15:15 +0000 (20:15 +0000)]
Compilation fix. pamh needs to be global since the split of check_perms().

16 years agoCompilation fix. user was removed from the list of global variables.
nekral-guest [Mon, 31 Dec 2007 20:14:31 +0000 (20:14 +0000)]
Compilation fix. user was removed from the list of global variables.

16 years agoFix the type of the bitfields in the commonio_entry and commonio_db
nekral-guest [Mon, 31 Dec 2007 20:12:48 +0000 (20:12 +0000)]
Fix the type of the bitfields in the commonio_entry and commonio_db
structures to unsigned int (instead of int).

16 years agoRe-indent.
nekral-guest [Mon, 31 Dec 2007 15:34:29 +0000 (15:34 +0000)]
Re-indent.

16 years agoRe-indent.
nekral-guest [Mon, 31 Dec 2007 15:32:15 +0000 (15:32 +0000)]
Re-indent.

16 years agoAvoid assignments in comparisons.
nekral-guest [Mon, 31 Dec 2007 15:30:29 +0000 (15:30 +0000)]
Avoid assignments in comparisons.

16 years agoAvoid implicit brackets.
nekral-guest [Mon, 31 Dec 2007 15:27:23 +0000 (15:27 +0000)]
Avoid implicit brackets.

16 years ago(compil fix) Use pw->pw_name instead of user.
nekral-guest [Mon, 31 Dec 2007 15:13:39 +0000 (15:13 +0000)]
(compil fix) Use pw->pw_name instead of user.

16 years agosflg needs to be global.
nekral-guest [Mon, 31 Dec 2007 15:07:59 +0000 (15:07 +0000)]
sflg needs to be global.

16 years agoAlso split update_shell() out of main().
nekral-guest [Mon, 31 Dec 2007 15:06:22 +0000 (15:06 +0000)]
Also split update_shell() out of main().

16 years ago* Split also check_perms() out of main().
nekral-guest [Mon, 31 Dec 2007 14:54:46 +0000 (14:54 +0000)]
* Split also check_perms() out of main().
* Before pam_end(), the return value of the previous
  pam API was already checked. No need to validate it again.

16 years agoSplit process_flags() out of main().
nekral-guest [Mon, 31 Dec 2007 14:52:52 +0000 (14:52 +0000)]
Split process_flags() out of main().

16 years agoAvoid assignments in comparisons.
nekral-guest [Mon, 31 Dec 2007 14:37:24 +0000 (14:37 +0000)]
Avoid assignments in comparisons.

16 years agoAvoid assignments in comparisons.
nekral-guest [Mon, 31 Dec 2007 14:25:06 +0000 (14:25 +0000)]
Avoid assignments in comparisons.

16 years agoAvoid implicit conversions to booleans.
nekral-guest [Mon, 31 Dec 2007 14:15:29 +0000 (14:15 +0000)]
Avoid implicit conversions to booleans.

16 years agoDocument may_change_field().
nekral-guest [Mon, 31 Dec 2007 14:03:14 +0000 (14:03 +0000)]
Document may_change_field().

16 years agoAvoid implicit brackets.
nekral-guest [Mon, 31 Dec 2007 13:48:48 +0000 (13:48 +0000)]
Avoid implicit brackets.

16 years ago* New function: process_flags() split out of main().
nekral-guest [Mon, 31 Dec 2007 13:43:04 +0000 (13:43 +0000)]
* New function: process_flags() split out of main().
  The flags variables are now global.
* New functions: check_perms(), update_gecos(),
  get_old_fields(), and check_fields() split out of main().
* Before pam_end(), the return value of the previous
  pam API was already checked. No need to validate it again.

16 years ago* src/newusers.c: Compilation fix for PAM support (pamh needs to be
nekral-guest [Mon, 31 Dec 2007 04:57:54 +0000 (04:57 +0000)]
* src/newusers.c: Compilation fix for PAM support (pamh needs to be
  global since the function split).
* src/chpasswd.c: Likewise.
* src/chgpasswd.c: Likewise.
* src/chpasswd.c: Avoid implicit conversions to booleans.

16 years agoSort the tools in the NEWS entries of 4.1.1.
nekral-guest [Mon, 31 Dec 2007 04:34:10 +0000 (04:34 +0000)]
Sort the tools in the NEWS entries of 4.1.1.

16 years agoRewrote to match the previous commit message.
nekral-guest [Mon, 31 Dec 2007 04:31:28 +0000 (04:31 +0000)]
Rewrote to match the previous commit message.

16 years ago * src/chage.c: Fix typo: s/maximim/maximum/
nekral-guest [Mon, 31 Dec 2007 04:29:30 +0000 (04:29 +0000)]
* src/chage.c: Fix typo: s/maximim/maximum/
* src/chage.c: New function: fail_exit(). Change most of the exit()
to a fail_exit, which makes sure the files are unlocked (new global
variables: pw_locked, spw_locked), the PAM transaction is ended, and
the failure is logged to libaudit (use a global user_name and user_uid
for logging).
* src/chage.c: Compilation fix for PAM support (pamh needs to be
global since the function split).
* src/chage.c: Document process_flags(), check_flags(), check_perms(),
open_files(), and close_files().
* src/chage.c: Split update_age() and get_defaults() out of main()
* src/chage.c: Drop the privileges just after opening the files.
* src/chage.c: Do not log to audit only if the user has an entry in
the shadow file.
* NEWS, src/chage.c (open_files): Also open the password file for
writing. This fix chage when the user only has a password entry (and
no shadow entries).
* src/chage.c (get_defaults): Use default values that don't change the
behavior of the account for the fields that are not specified when the
user has no shadow entry.

16 years ago* Compilation fix for PAM support (pamh needs to be
nekral-guest [Sun, 30 Dec 2007 21:48:55 +0000 (21:48 +0000)]
* Compilation fix for PAM support (pamh needs to be
  global since the function split).
* End the PAM transaction in fail_exit().
* Document check_flags().

16 years agoCompilation fix for non-gshadow support.
nekral-guest [Sun, 30 Dec 2007 21:39:57 +0000 (21:39 +0000)]
Compilation fix for non-gshadow support.

16 years agoI forgot to open and close gshadow.
nekral-guest [Sat, 29 Dec 2007 17:34:02 +0000 (17:34 +0000)]
I forgot to open and close gshadow.

16 years agoAdded support for gshadow.
nekral-guest [Sat, 29 Dec 2007 17:26:28 +0000 (17:26 +0000)]
Added support for gshadow.

16 years agoDo not add the new user to the group's members, because the group is already
nekral-guest [Sat, 29 Dec 2007 17:05:13 +0000 (17:05 +0000)]
Do not add the new user to the group's members, because the group is already
the primary group of the new user.