diff options
Diffstat (limited to 'src/basic/namespace-util.c')
-rw-r--r-- | src/basic/namespace-util.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c index 0e81b1de6f..2ecce5fa61 100644 --- a/src/basic/namespace-util.c +++ b/src/basic/namespace-util.c @@ -228,7 +228,7 @@ int userns_acquire(const char *uid_map, const char *gid_map) { r = safe_fork("(sd-mkuserns)", FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGKILL|FORK_NEW_USERNS, &pid); if (r < 0) - return r; + return log_debug_errno(r, "Failed to fork process (sd-mkuserns): %m"); if (r == 0) /* Child. We do nothing here, just freeze until somebody kills us. */ freeze(); @@ -236,12 +236,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); if (r < 0) - return log_error_errno(r, "Failed to write UID map: %m"); + return log_debug_errno(r, "Failed to write UID map: %m"); xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); if (r < 0) - return log_error_errno(r, "Failed to write GID map: %m"); + return log_debug_errno(r, "Failed to write GID map: %m"); r = namespace_open(pid, /* ret_pidns_fd = */ NULL, @@ -250,10 +250,9 @@ int userns_acquire(const char *uid_map, const char *gid_map) { &userns_fd, /* ret_root_fd = */ NULL); if (r < 0) - return log_error_errno(r, "Failed to open userns fd: %m"); + return log_debug_errno(r, "Failed to open userns fd: %m"); return TAKE_FD(userns_fd); - } int in_same_namespace(pid_t pid1, pid_t pid2, NamespaceType type) { |