diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/execute.c | 3 | ||||
-rw-r--r-- | src/core/main.c | 10 | ||||
-rw-r--r-- | src/core/mount-setup.c | 5 | ||||
-rw-r--r-- | src/core/namespace.c | 15 | ||||
-rw-r--r-- | src/core/service.c | 7 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index cd3592b847..6abb0a5d5d 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1998,9 +1998,8 @@ void exec_context_done(ExecContext *c) { strv_free(c->environment_files); c->environment_files = NULL; - for (l = 0; l < ELEMENTSOF(c->rlimit); l++) { + for (l = 0; l < ELEMENTSOF(c->rlimit); l++) c->rlimit[l] = mfree(c->rlimit[l]); - } c->working_directory = mfree(c->working_directory); c->root_directory = mfree(c->root_directory); diff --git a/src/core/main.c b/src/core/main.c index 6577a06621..be95dc68b2 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1116,9 +1116,10 @@ static void test_mtab(void) { if (r >= 0 && nulstr_contains(ok, p)) return; - log_warning("/etc/mtab is not a symlink or not pointing to /proc/self/mounts. " - "This is not supported anymore. " - "Please make sure to replace this file by a symlink to avoid incorrect or misleading mount(8) output."); + log_error("/etc/mtab is not a symlink or not pointing to /proc/self/mounts. " + "This is not supported anymore. " + "Please make sure to replace this file by a symlink to avoid incorrect or misleading mount(8) output."); + freeze(); } static void test_usr(void) { @@ -1836,9 +1837,8 @@ finish: arg_shutdown_watchdog = m->shutdown_watchdog; m = manager_free(m); - for (j = 0; j < ELEMENTSOF(arg_default_rlimit); j++) { + for (j = 0; j < ELEMENTSOF(arg_default_rlimit); j++) arg_default_rlimit[j] = mfree(arg_default_rlimit[j]); - } arg_default_unit = mfree(arg_default_unit); diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index e84f80b61b..65f3d06ad0 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -303,6 +303,11 @@ int mount_cgroup_controllers(char ***join_controllers) { r = symlink(options, t); if (r < 0 && errno != EEXIST) return log_error_errno(errno, "Failed to create symlink %s: %m", t); +#ifdef SMACK_RUN_LABEL + r = mac_smack_copy(t, options); + if (r < 0 && r != -EOPNOTSUPP) + return log_error_errno(r, "Failed to copy smack label from %s to %s: %m", options, t); +#endif } } } diff --git a/src/core/namespace.c b/src/core/namespace.c index 0b85b859fa..eb88574f8f 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -294,15 +294,15 @@ static int mount_kdbus(BindMount *m) { busnode = strjoina(root, "/bus"); if (mknod(busnode, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) { - log_error_errno(errno, "mknod() for %s failed: %m", busnode); - r = -errno; + r = log_error_errno(errno, "mknod() for %s failed: %m", + busnode); goto fail; } r = mount(m->path, busnode, NULL, MS_BIND, NULL); if (r < 0) { - log_error_errno(errno, "bind mount of %s failed: %m", m->path); - r = -errno; + r = log_error_errno(errno, "bind mount of %s failed: %m", + m->path); goto fail; } @@ -313,8 +313,8 @@ static int mount_kdbus(BindMount *m) { } if (mount(root, basepath, NULL, MS_MOVE, NULL) < 0) { - log_error_errno(errno, "bind mount of %s failed: %m", basepath); - r = -errno; + r = log_error_errno(errno, "bind mount of %s failed: %m", + basepath); goto fail; } @@ -555,10 +555,9 @@ int setup_namespace( /* Remount / as the desired mode. Not that this will not * reestablish propagation from our side to the host, since * what's disconnected is disconnected. */ - if (mount(NULL, "/", NULL, mount_flags | MS_REC, NULL) < 0) { + if (mount(NULL, "/", NULL, mount_flags | MS_REC, NULL) < 0) /* at this point, we cannot rollback */ return -errno; - } return 0; diff --git a/src/core/service.c b/src/core/service.c index e396dbe213..248a9e8c62 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2937,14 +2937,11 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags, FDSet *fds) } /* Interpret WATCHDOG= */ - if (strv_find(tags, "WATCHDOG=1")) { + if (strv_find(tags, "WATCHDOG=1")) service_reset_watchdog(s); - } - /* Add the passed fds to the fd store */ - if (strv_find(tags, "FDSTORE=1")) { + if (strv_find(tags, "FDSTORE=1")) service_add_fd_store_set(s, fds); - } /* Notify clients about changed status or main pid */ if (notify_dbus) |