* 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.
This commit is contained in:
2
NEWS
2
NEWS
@@ -28,6 +28,8 @@ shadow-4.0.18.1 -> shadow-4.0.18.2 UNRELEASED
|
||||
- userdel: Abort if an error is detected while updating the passwd or group
|
||||
databases. The passwd or group files will not be written.
|
||||
- usermod: Update the group database before flushing the nscd caches.
|
||||
- usermod: Make sure the group modifications will be allowed before
|
||||
writing the passwd files.
|
||||
|
||||
shadow-4.0.18.1 -> shadow-4.0.18.2 28-10-2007
|
||||
|
||||
|
Reference in New Issue
Block a user