git: 5f31bbc5fab3 - stable/13 - makefs: do not pass mode to open() call lacking O_CREAT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Apr 2023 12:52:46 UTC
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=5f31bbc5fab3f3df9a8e586d39411559a7716dae
commit 5f31bbc5fab3f3df9a8e586d39411559a7716dae
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-03-30 01:42:44 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-14 12:10:36 +0000
makefs: do not pass mode to open() call lacking O_CREAT
Obtained from: OpenBSD ffs.c 1.35
(cherry picked from commit 45e405603b7f4d33372f32c80453ab5cd0d8fdcf)
---
usr.sbin/makefs/ffs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 1911f75fb4fd..448aa08b9d21 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -954,7 +954,7 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts)
if (isfile) {
fbuf = emalloc(ffs_opts->bsize);
- if ((ffd = open((char *)buf, O_RDONLY, 0444)) == -1) {
+ if ((ffd = open((char *)buf, O_RDONLY)) == -1) {
err(EXIT_FAILURE, "Can't open `%s' for reading", (char *)buf);
}
} else {