]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/namespace.h
core: Private*/Protect* options with RootDirectory
authorAlban Crequy <alban@endocode.com>
Mon, 18 May 2015 10:20:28 +0000 (12:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 May 2015 16:47:45 +0000 (18:47 +0200)
commitee818b89f4890b3a00e93772249fce810f60811e
tree0bda24d838ca13d87f40eba0dc3f582731bf9396
parenta363680faa063dbcb624a6dfc4798cff0a4ba9d5
core: Private*/Protect* options with RootDirectory

When a service is chrooted with the option RootDirectory=/opt/..., then
the options PrivateDevices, PrivateTmp, ProtectHome, ProtectSystem must
mount the directories under $RootDirectory/{dev,tmp,home,usr,boot}.

The test-ns tool can test setup_namespace() with and without chroot:
 $ sudo TEST_NS_PROJECTS=/home/lennart/projects ./test-ns
 $ sudo TEST_NS_CHROOT=/home/alban/debian-tree TEST_NS_PROJECTS=/home/alban/debian-tree/home/alban/Documents ./test-ns
src/core/execute.c
src/core/namespace.c
src/core/namespace.h
src/test/test-ns.c