Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148952459
D8319.id21605.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8319.id21605.diff
View Options
Index: lib/libutil/gr_util.c
===================================================================
--- lib/libutil/gr_util.c
+++ lib/libutil/gr_util.c
@@ -141,7 +141,7 @@
errno = ENAMETOOLONG;
return (-1);
}
- if ((tfd = mkostemp(tempname, O_SYNC)) == -1)
+ if ((tfd = mkostemp(tempname, 0)) == -1)
return (-1);
if (mfd != -1) {
while ((nr = read(mfd, buf, sizeof(buf))) > 0)
Index: lib/libutil/pw_util.c
===================================================================
--- lib/libutil/pw_util.c
+++ lib/libutil/pw_util.c
@@ -225,7 +225,7 @@
errno = ENAMETOOLONG;
return (-1);
}
- if ((tfd = mkostemp(tempname, O_SYNC)) == -1)
+ if ((tfd = mkostemp(tempname, 0)) == -1)
return (-1);
if (mfd != -1) {
while ((nr = read(mfd, buf, sizeof(buf))) > 0)
Index: usr.sbin/pw/grupd.c
===================================================================
--- usr.sbin/pw/grupd.c
+++ usr.sbin/pw/grupd.c
@@ -77,6 +77,7 @@
close(tfd);
err(1, "gr_copy()");
}
+ fsync(tfd);
close(tfd);
if (gr_mkdb() == -1) {
gr_fini();
Index: usr.sbin/pw/pw_nis.c
===================================================================
--- usr.sbin/pw/pw_nis.c
+++ usr.sbin/pw/pw_nis.c
@@ -67,6 +67,7 @@
close(tfd);
err(1, "pw_copy()");
}
+ fsync(tfd);
close(tfd);
if (chmod(pw_tempname(), 0644) == -1)
err(1, "chmod()");
Index: usr.sbin/pw/pwupd.c
===================================================================
--- usr.sbin/pw/pwupd.c
+++ usr.sbin/pw/pwupd.c
@@ -114,6 +114,7 @@
close(tfd);
err(1, "pw_copy()");
}
+ fsync(tfd);
close(tfd);
/*
* in case of deletion of a user, the whole database
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 6:55 AM (2 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30072328
Default Alt Text
D8319.id21605.diff (1 KB)
Attached To
Mode
D8319: Speed up pw operations that edit /etc/group or /etc/passwd
Attached
Detach File
Event Timeline
Log In to Comment