]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/pw_nis.c
Revert "Set chpass to 755 too"
[pw-darwin.git] / pw / pw_nis.c
index 35b26ea5224b55eac884a0e06cac3533f7e0e90a..4b70bc1de1f67995c566ada1b0f6d5501295a1f8 100644 (file)
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
  * Copyright (C) 1996
  *     David L. Nugent.  All rights reserved.
  *
@@ -67,6 +69,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()");