summaryrefslogtreecommitdiffstats
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 5dd289c1b4..91700d9282 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2280,10 +2280,9 @@ static int copy_devnode_one(const char *dest, const char *node, bool ignore_mkno
r = path_extract_directory(from, &parent);
if (r < 0)
return log_error_errno(r, "Failed to extract directory from %s: %m", from);
- if (!path_equal(parent, "/dev/")) {
- if (userns_mkdir(dest, parent, 0755, 0, 0) < 0)
- return log_error_errno(r, "Failed to create directory %s: %m", parent);
- }
+ r = userns_mkdir(dest, parent, 0755, 0, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to create directory %s: %m", parent);
if (mknod(to, st.st_mode, st.st_rdev) < 0) {
r = -errno; /* Save the original error code. */
@@ -4654,7 +4653,7 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r
ucred = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_CREDENTIALS, struct ucred);
if (!ucred || ucred->pid != inner_child_pid) {
- log_debug("Received notify message without valid credentials. Ignoring.");
+ log_debug("Received notify message from process that is not the payload's PID 1. Ignoring.");
return 0;
}