From 9f40e09d0a53a2a6b89e0cb3f60d5e46bfd7dbde Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 2 Apr 2021 10:06:36 +0200 Subject: [PATCH] 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 --- src/pxar/create.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pxar/create.rs b/src/pxar/create.rs index e5673de7..ec3dc057 100644 --- a/src/pxar/create.rs +++ b/src/pxar/create.rs @@ -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(()) }