From dab1523df5daf21aa82b0c6fc5b2f79fa82dddf8 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 21 Mar 2009 19:32:14 +0000 Subject: [PATCH] * libmisc/sulog.c: Likewise for the su log. --- ChangeLog | 1 + libmisc/sulog.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6035b142..5a7e54a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ and mail spool. * src/usermod.c: Likewise for the faillog and lastlog file. * src/vipw.c: Likewise for the backup file. + * libmisc/sulog.c: Likewise for the su log. 2009-03-15 Nicolas François diff --git a/libmisc/sulog.c b/libmisc/sulog.c index a0664795..1948324b 100644 --- a/libmisc/sulog.c +++ b/libmisc/sulog.c @@ -97,6 +97,7 @@ void sulog (const char *tty, bool success, const char *oldname, const char *name success ? '+' : '-', tty, oldname, name); (void) fflush (fp); + fsync (fileno (fp)); fclose (fp); /* TODO: log if failure */ }