Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2023 13:20:08 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 45e405603b7f - main - makefs: do not pass mode to open() call lacking O_CREAT
Message-ID:  <202303301320.32UDK8Fu051857@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=45e405603b7f4d33372f32c80453ab5cd0d8fdcf

commit 45e405603b7f4d33372f32c80453ab5cd0d8fdcf
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-03-30 01:42:44 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-03-30 13:20:00 +0000

    makefs: do not pass mode to open() call lacking O_CREAT
    
    Obtained from:  OpenBSD ffs.c 1.35
---
 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 ac214a775e9d..cc0f640e3c9c 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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303301320.32UDK8Fu051857>