]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/namespace: do not ignore non-EPERM mount error
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Dec 2020 15:55:57 +0000 (00:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Dec 2020 17:37:03 +0000 (02:37 +0900)
Follow-up for 61f8a7bd3e20222617fc59f398071daf2af86f96.

src/core/namespace.c

index 93eab45e21e099648cca697830af4c2881adb5c5..39729ba89920bc7e4dd7eefc2f5ebbcfd8f6130b 100644 (file)
@@ -914,7 +914,8 @@ static int mount_procfs(const MountEntry *m, const NamespaceInfo *ns_info) {
                 if (r == 0)
                         /* /proc is not mounted. Propagate the original error code. */
                         return -EPERM;
-        }
+        } else if (r < 0)
+                return r;
 
         return 1;
 }