]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: Add some extra debug logging
authorDaan De Meyer <daan@amutable.com>
Fri, 13 Feb 2026 10:15:05 +0000 (11:15 +0100)
committerDaan De Meyer <daan@amutable.com>
Mon, 16 Feb 2026 08:37:32 +0000 (09:37 +0100)
src/basic/terminal-util.c
src/machine/machine-dbus.c

index 1013e38d0dba00a80928ef49b64fcd66bed2253d..732ab0824d4d5d37954afbbe4303078472fb00e4 100644 (file)
@@ -31,6 +31,7 @@
 #include "namespace-util.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "pidref.h"
 #include "proc-cmdline.h"
 #include "process-util.h"
 #include "signal-util.h"
@@ -1666,7 +1667,7 @@ int openpt_allocate_in_namespace(
 
         r = pidref_namespace_open(pidref, &pidnsfd, &mntnsfd, /* ret_netns_fd= */ NULL, &usernsfd, &rootfd);
         if (r < 0)
-                return r;
+                return log_debug_errno(r, "Failed to open namespaces of PID "PID_FMT": %m", pidref->pid);
 
         if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, pair) < 0)
                 return -errno;
index 6bee74fd300967462ead4b9466e63f929c31b64b..e3281e1d3857b7fac95b10ccc4f6f4684a34a8b2 100644 (file)
@@ -376,7 +376,10 @@ int bus_machine_method_open_shell(sd_bus_message *message, void *userdata, sd_bu
         if (m->uid != 0 && m->class != MACHINE_HOST) {
                 r = pidref_in_same_namespace(&PIDREF_MAKE_FROM_PID(1), &m->leader, NAMESPACE_USER);
                 if (r < 0)
-                        return r;
+                        return log_debug_errno(
+                                        r,
+                                        "Failed to check if machine '%s' is running in the root user namespace: %m",
+                                        m->name);
                 if (r != 0)
                         return sd_bus_error_set(
                                         error,