pxar: fix directory ACL entry creation

Don't override `group_obj` with `None` when handling
`ACL_TYPE_DEFAULT` entries for directories.

Reproducer: /var/log/journal ends up without a `MASK` type
entry making it invalid as it has `USER` and `GROUP`
entries.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-04-02 10:06:36 +02:00
parent 553e57f914
commit 9f40e09d0a

View File

@ -1006,6 +1006,7 @@ fn process_acl(
metadata.acl.users = acl_user;
metadata.acl.groups = acl_group;
metadata.acl.group_obj = acl_group_obj;
}
acl::ACL_TYPE_DEFAULT => {
if user_obj_permissions != None
@ -1025,13 +1026,11 @@ fn process_acl(
metadata.acl.default_users = acl_user;
metadata.acl.default_groups = acl_group;
metadata.acl.default = acl_default;
}
_ => bail!("Unexpected ACL type encountered"),
}
metadata.acl.group_obj = acl_group_obj;
metadata.acl.default = acl_default;
Ok(())
}