]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/coredump/coredump.c
coredump,journal: do not do ACL magic for processes of dynamic UIDs
[thirdparty/systemd.git] / src / coredump / coredump.c
index ee258a121953587a9032aefeba6109eedf7c3a9f..cf56a8ad2673481870d79277d3b9b001b8d2b9c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -164,7 +165,7 @@ static int fix_acl(int fd, uid_t uid) {
 
         assert(fd >= 0);
 
-        if (uid <= SYSTEM_UID_MAX)
+        if (uid_is_system(uid) || uid_is_dynamic(uid))
                 return 0;
 
         /* Make sure normal users can read (but not write or delete)
@@ -1214,7 +1215,7 @@ static int gather_pid_metadata(
         if (get_process_environ(pid, &t) >= 0)
                 set_iovec_field_free(iovec, n_iovec, "COREDUMP_ENVIRON=", t);
 
-        t = strjoin("COREDUMP_TIMESTAMP=", context[CONTEXT_TIMESTAMP], "000000", NULL);
+        t = strjoin("COREDUMP_TIMESTAMP=", context[CONTEXT_TIMESTAMP], "000000");
         if (t)
                 iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(t);