]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: Revert commit 49fe5c099 in parts for function parse_acl.
authorYmrDtnJu <YmrDtnJu@users.noreply.github.com>
Fri, 1 Feb 2019 10:38:35 +0000 (11:38 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 2 Feb 2019 11:46:32 +0000 (12:46 +0100)
Too much code has been removed while replacing startswith with STARTSWITH_SET
so that every ACL specified e.g. in tmpfiles.d was parsed as a default ACL.

src/shared/acl-util.c

index 6f0657174cbe264f1e84bf3da226364a9057a4f1..96335145138e93d631437c7d1e1d6c1096efdd47 100644 (file)
@@ -220,10 +220,10 @@ int parse_acl(const char *text, acl_t *acl_access, acl_t *acl_default, bool want
                 char *p;
 
                 p = STARTSWITH_SET(*entry, "default:", "d:");
-                if (!p)
-                        p = *entry;
-
-                r = strv_push(&d, p);
+                if (p)
+                        r = strv_push(&d, p);
+                else
+                        r = strv_push(&a, *entry);
                 if (r < 0)
                         return r;
         }