From: Frantisek Sumsal Date: Fri, 27 Oct 2023 19:46:18 +0000 (+0200) Subject: tmpfiles: ignore EINVAL with --graceful X-Git-Tag: v255-rc1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f939a403ca93a01fc677af9f7757d89f81e0fc37;p=thirdparty%2Fsystemd.git tmpfiles: ignore EINVAL with --graceful Add EINVAL to the list of ignored errnos, since acl_from_text() returns EINVAL if it can't translate the given string. ~# cat /tmp/tmpfiles-test.conf a+ /tmp/foo - - - - default:group:foo:rwx ~# build/systemd-tmpfiles /tmp/tmpfiles-test.conf --create --graceful Failed to parse ACL "default:group:foo:rwx", ignoring: Invalid argument Resolves: #29742 --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index e18f5bd7645..230ec09b979 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -1161,7 +1161,7 @@ static int parse_acls_from_arg(Item *item) { r = parse_acl(item->argument, &item->acl_access, &item->acl_access_exec, &item->acl_default, !item->append_or_force); if (r < 0) - log_full_errno(arg_graceful && IN_SET(r, -ENOENT, -ESRCH) ? LOG_DEBUG : LOG_WARNING, + log_full_errno(arg_graceful && IN_SET(r, -EINVAL, -ENOENT, -ESRCH) ? LOG_DEBUG : LOG_WARNING, r, "Failed to parse ACL \"%s\", ignoring: %m", item->argument); #else log_warning("ACLs are not supported, ignoring.");