diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-13 15:27:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-08-13 15:27:04 +0200 |
commit | ac0930c892bc7979b4c9bc2a52e5e844650b025d (patch) | |
tree | f0388a829e7b827e0797fe5fab5ae50f79a6afcd /src/test | |
parent | 6f67a45d8e61d69bf4f75e1da3edcf9fe7d89982 (diff) |
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')
-rw-r--r-- | src/test/test-ns.c | 5 |
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; } |