summaryrefslogtreecommitdiff
path: root/src/test/test-ns.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-13 15:27:04 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-13 15:27:04 +0200
commitac0930c892bc7979b4c9bc2a52e5e844650b025d (patch)
treef0388a829e7b827e0797fe5fab5ae50f79a6afcd /src/test/test-ns.c
parent6f67a45d8e61d69bf4f75e1da3edcf9fe7d89982 (diff)
downloadsystemd-ac0930c892bc7979b4c9bc2a52e5e844650b025d.tar.gz
systemd-ac0930c892bc7979b4c9bc2a52e5e844650b025d.tar.bz2
systemd-ac0930c892bc7979b4c9bc2a52e5e844650b025d.zip
namespace: rework namespace support
- don't use pivot_root() anymore, just reuse root hierarchy - first create all mounts, then mark them read-only so that we get the right behaviour when people want writable mounts inside of read-only mounts - don't pass invalid combinations of MS_ constants to the kernel
Diffstat (limited to 'src/test/test-ns.c')
-rw-r--r--src/test/test-ns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test-ns.c b/src/test/test-ns.c
index 102b005880..b1c759fc20 100644
--- a/src/test/test-ns.c
+++ b/src/test/test-ns.c
@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
NULL
};
- const char * const readable[] = {
+ const char * const readonly[] = {
"/",
"/usr",
"/boot",
@@ -48,7 +48,8 @@ int main(int argc, char *argv[]) {
int r;
- if ((r = setup_namespace((char**) writable, (char**) readable, (char**) inaccessible, true, MS_SHARED)) < 0) {
+ r = setup_namespace((char**) writable, (char**) readonly, (char**) inaccessible, true, 0);
+ if (r < 0) {
log_error("Failed to setup namespace: %s", strerror(-r));
return 1;
}