diff options
author | Alan Somers <asomers@FreeBSD.org> | 2016-11-18 16:07:08 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2016-11-18 16:07:08 +0000 |
commit | cbaba16b23124331498f0a6d48a4d71f4f20b508 (patch) | |
tree | 229b54f5e1d98024a318d18cab53e0ea1469b9fc /usr.sbin/pw | |
parent | 34cd8ebdcfc8b88cfba92270f37e870dc00c47e8 (diff) |
Notes
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/grupd.c | 1 | ||||
-rw-r--r-- | usr.sbin/pw/pw_nis.c | 1 | ||||
-rw-r--r-- | usr.sbin/pw/pwupd.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c index 38d5e5bc956ce..5d0df0263e4a8 100644 --- a/usr.sbin/pw/grupd.c +++ b/usr.sbin/pw/grupd.c @@ -77,6 +77,7 @@ gr_update(struct group * grp, char const * group) close(tfd); err(1, "gr_copy()"); } + fsync(tfd); close(tfd); if (gr_mkdb() == -1) { gr_fini(); diff --git a/usr.sbin/pw/pw_nis.c b/usr.sbin/pw/pw_nis.c index 35b26ea5224b5..087c9460f3f3e 100644 --- a/usr.sbin/pw/pw_nis.c +++ b/usr.sbin/pw/pw_nis.c @@ -67,6 +67,7 @@ pw_nisupdate(const char * path, struct passwd * pwd, char const * user) close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); if (chmod(pw_tempname(), 0644) == -1) err(1, "chmod()"); diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 3bcb95f8c4651..87c3c994bada8 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -114,6 +114,7 @@ pw_update(struct passwd * pwd, char const * user) close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); /* * in case of deletion of a user, the whole database |