tree-wide: Add some extra debug logging

This commit is contained in:
Daan De Meyer
2026-02-13 11:15:05 +01:00
parent 77b3ddf2aa
commit 051d228b1c
2 changed files with 6 additions and 2 deletions

View 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;

View 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,