summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2022-02-02 13:22:11 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2022-02-02 13:22:11 +0000
commit1ffd2d54a5d3d467a356018594a9d852fd5e2079 (patch)
treeaf558b6796ddb12a248bfdf319e148d06d3e0374 /usr.sbin
parent6e4b5cf96ef20a20bc0569df5d3e8b0846ddb1d5 (diff)
Add missing mode argument to open(2) with O_CREAT.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/installboot/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/installboot/util.c b/usr.sbin/installboot/util.c
index ba5ee2f0e9c..0ffd5e742f9 100644
--- a/usr.sbin/installboot/util.c
+++ b/usr.sbin/installboot/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.14 2019/07/03 03:24:03 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.15 2022/02/02 13:22:10 visa Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
@@ -52,7 +52,7 @@ filecopy(const char *srcfile, const char *dstfile)
}
sz = sb.st_size;
- dfd = open(dstfile, O_WRONLY|O_CREAT);
+ dfd = open(dstfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (dfd == -1) {
warn("open %s", dstfile);
return (-1);