chiark / gitweb /
namespace: add missing 'const' to parameters
[elogind.git] / src / core / execute.c
index 8b9bb27137c24b3cefbbbb4deca9bcae122deff6..43f2764a49db32cbe6f0e504b138cbf89b2c0283 100644 (file)
@@ -1545,7 +1545,10 @@ static int exec_child(ExecCommand *command,
                                 context->protect_home,
                                 context->protect_system,
                                 context->mount_flags);
-                if (err < 0) {
+
+                if (err == -EPERM)
+                        log_error_unit(params->unit_id, "Failed to setup namespace, ignoring: %s", strerror(-err));
+                else if (err < 0) {
                         *error = EXIT_NAMESPACE;
                         return err;
                 }
@@ -1698,7 +1701,7 @@ static int exec_child(ExecCommand *command,
                         err = aa_change_onexec(context->apparmor_profile);
                         if (err < 0 && !context->apparmor_profile_ignore) {
                                 *error = EXIT_APPARMOR_PROFILE;
-                                return err;
+                                return -errno;
                         }
                 }
 #endif