mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
Check if the fd is a folder before setting default acls Tested: Ubuntu 18.04. test.conf: A+ /tmp/test - - - - u:user2:rw,d:u:user1:rwx The folder /tmp/test looks like /tmp/test/file1 /tmp/test/folder2 start systemd-tmpfiles manually Fixes: #9545
This commit is contained in:
parent
460d7ac3a2
commit
2667385b0e
@ -1035,7 +1035,8 @@ static int fd_set_acls(Item *item, int fd, const struct stat *st) {
|
||||
if (item->acl_access)
|
||||
r = path_set_acl(procfs_path, path, ACL_TYPE_ACCESS, item->acl_access, item->force);
|
||||
|
||||
if (r == 0 && item->acl_default)
|
||||
/* set only default acls to folders */
|
||||
if (r == 0 && item->acl_default && S_ISDIR(st->st_mode))
|
||||
r = path_set_acl(procfs_path, path, ACL_TYPE_DEFAULT, item->acl_default, item->force);
|
||||
|
||||
if (r > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user