]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/coredump/coredump.c
Merge pull request #12508 from keszybz/no-root-checks
[thirdparty/systemd.git] / src / coredump / coredump.c
index ac7b972026f23ed0c2adf0027917b5447c6ac1f9..2cceb49f4b1aa05b51a210cb357f6dd81fa0d29a 100644 (file)
@@ -661,7 +661,7 @@ static int get_process_container_parent_cmdline(pid_t pid, char** cmdline) {
         if (r < 0)
                 return r;
 
-        r = get_process_cmdline(container_pid, 0, false, cmdline);
+        r = get_process_cmdline(container_pid, SIZE_MAX, 0, cmdline);
         if (r < 0)
                 return r;
 
@@ -765,7 +765,7 @@ static int submit_coredump(
                 return log_error_errno(r, "Failed to drop privileges: %m");
 
 #if HAVE_ELFUTILS
-        /* Try to get a strack trace if we can */
+        /* Try to get a stack trace if we can */
         if (coredump_size <= arg_process_size_max) {
                 _cleanup_free_ char *stacktrace = NULL;
 
@@ -1036,10 +1036,7 @@ static int send_iovec(const struct iovec iovec[], size_t n_iovec, int input_fd)
                                          * (truncated) copy of what we want to send, and the second one
                                          * contains the trailing dots. */
                                         copy[0] = iovec[i];
-                                        copy[1] = (struct iovec) {
-                                                .iov_base = (char[]) { '.', '.', '.' },
-                                                .iov_len = 3,
-                                        };
+                                        copy[1] = IOVEC_MAKE(((char[]){'.', '.', '.'}), 3);
 
                                         mh.msg_iov = copy;
                                         mh.msg_iovlen = 2;
@@ -1157,7 +1154,7 @@ static int gather_pid_metadata(
         if (sd_pid_get_slice(pid, &t) >= 0)
                 set_iovec_field_free(iovec, n_iovec, "COREDUMP_SLICE=", t);
 
-        if (get_process_cmdline(pid, 0, false, &t) >= 0)
+        if (get_process_cmdline(pid, SIZE_MAX, 0, &t) >= 0)
                 set_iovec_field_free(iovec, n_iovec, "COREDUMP_CMDLINE=", t);
 
         if (cg_pid_get_path_shifted(pid, NULL, &t) >= 0)