* 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.
This commit is contained in:
nekral-guest
2007-12-31 04:29:30 +00:00
parent 3b7497b063
commit db38d0b104
3 changed files with 290 additions and 190 deletions

3
NEWS
View File

@@ -32,6 +32,9 @@ shadow-4.1.0 -> shadow-4.1.1 UNRELEASED
* The new users are no more added to the list of members of their groups
because the membership is already set by their primary group.
* Added support for gshadow.
- chage
* Fix bug which forbid to set the aging information of an account with a
passwd entry, but no shadow entry.
shadow-4.0.18.2 -> shadow-4.1.0 09-12-2008