mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-23 10:06:31 +08:00
useradd: fix comparison sign for write_full() return
I forgot to change the comparison sign that checks the return value of
write_full()
Closes: https://github.com/shadow-maint/shadow/issues/1072
Fixes: 8903b94c86
("useradd: fix write_full() return value")
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2313559
Reported-by: <https://github.com/brown-midas>
Suggested-by: <https://github.com/brown-midas>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
parent
6c9e80165b
commit
9035932496
@ -2042,7 +2042,7 @@ static void lastlog_reset (uid_t uid)
|
||||
return;
|
||||
}
|
||||
if ( (lseek (fd, offset_uid, SEEK_SET) != offset_uid)
|
||||
|| (write_full (fd, &ll, sizeof (ll)) != -1)
|
||||
|| (write_full (fd, &ll, sizeof (ll)) == -1)
|
||||
|| (fsync (fd) != 0)) {
|
||||
fprintf (stderr,
|
||||
_("%s: failed to reset the lastlog entry of UID %lu: %s\n"),
|
||||
|
Loading…
Reference in New Issue
Block a user