Page MenuHomeFreeBSD

D58304.diff
No OneTemporary

D58304.diff

diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c
--- a/usr.sbin/certctl/certctl.c
+++ b/usr.sbin/certctl/certctl.c
@@ -523,6 +523,8 @@
tmppath = xasprintf(".%s", path);
fd = openat(d, tmppath,
O_CREAT | O_WRONLY | O_EXCL, mode);
+ if (!unprivileged && fd >= 0)
+ (void)fchmod(fd, mode);
}
}
/* write the certificate */
@@ -594,6 +596,8 @@
} else {
tmpfile = xasprintf(".%s", file);
fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode);
+ if (!unprivileged && fd >= 0)
+ (void)fchmod(fd, mode);
}
if (fd < 0 || (f = fdopen(fd, "w")) == NULL) {
if (tmpfile != NULL && fd >= 0) {

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 24, 9:43 AM (1 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35199586
Default Alt Text
D58304.diff (658 B)

Event Timeline