The branch main has been updated by emaste:

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

commit 45e405603b7f4d33372f32c80453ab5cd0d8fdcf
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2023-03-30 01:42:44 +0000
Commit:     Ed Maste <ema...@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 {

Reply via email to