Wed, 22 Mar 2023 18:18:22 +0100
fix uninitialized memory usage in sys_vfs_open, resulting in unwanted fchown calls
src/server/daemon/vfs.c | file | annotate | diff | comparison | revisions |
--- a/src/server/daemon/vfs.c Sun Mar 19 16:53:49 2023 +0100 +++ b/src/server/daemon/vfs.c Wed Mar 22 18:18:22 2023 +0100 @@ -393,7 +393,7 @@ } // if a file system acl is active, we set the owner for newly created files - if(((oflags & O_CREAT) == O_CREAT) && sysacl.user_uid != -1) { + if(((oflags & O_CREAT) == O_CREAT) && sysacl.acl) { if(fchown(fd, sysacl.user_uid, sysacl.user_gid)) { perror("vfs_open: fchown"); system_close(fd);