* src/usermod.c: Likewise for the faillog and lastlog file.
This commit is contained in:
parent
96c7b12bc4
commit
5331930716
@ -4,6 +4,7 @@
|
||||
ensures that the backup file is flushed to the storage medium.
|
||||
* src/useradd.c: Likewise for the default file, faillog, lastlog,
|
||||
and mail spool.
|
||||
* src/usermod.c: Likewise for the faillog and lastlog file.
|
||||
|
||||
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
|
@ -1442,6 +1442,7 @@ static void update_lastlog (void)
|
||||
/* Copy the old entry to its new location */
|
||||
if ( (lseek (fd, off_newuid, SEEK_SET) != off_newuid)
|
||||
|| (write (fd, &ll, sizeof ll) != (ssize_t) sizeof ll)
|
||||
|| (fsync (fd) != 0)
|
||||
|| (close (fd) != 0)) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to copy the lastlog entry of user %lu to user %lu: %s\n"),
|
||||
@ -1458,6 +1459,7 @@ static void update_lastlog (void)
|
||||
memzero (&ll, sizeof (ll));
|
||||
if ( (lseek (fd, off_newuid, SEEK_SET) != off_newuid)
|
||||
|| (write (fd, &ll, sizeof ll) != (ssize_t) sizeof ll)
|
||||
|| (fsync (fd) != 0)
|
||||
|| (close (fd) != 0)) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to copy the lastlog entry of user %lu to user %lu: %s\n"),
|
||||
@ -1501,6 +1503,7 @@ static void update_faillog (void)
|
||||
/* Copy the old entry to its new location */
|
||||
if ( (lseek (fd, off_newuid, SEEK_SET) != off_newuid)
|
||||
|| (write (fd, &fl, sizeof fl) != (ssize_t) sizeof fl)
|
||||
|| (fsync (fd) != 0)
|
||||
|| (close (fd) != 0)) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to copy the faillog entry of user %lu to user %lu: %s\n"),
|
||||
|
Loading…
Reference in New Issue
Block a user