aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-13 13:41:37 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-13 13:41:37 +0200
commitd336c8771f617df35c43f28feae6c3f83512deaf (patch)
tree3e227ed11408e89a34afa3cc35771773781bee5f /src/utils.c
parentaebb4b9fa16bd82fc78d850dc47484c6d733b223 (diff)
parent9b1eccdee52a0c8972eb60cb18710bc2f07ca695 (diff)
Merge branch 'master' of ssh://git.lan:/git/potd
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 9f42fd8..bcca9c3 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -290,7 +290,7 @@ void mount_root(void)
{
int s;
- s = mount(NULL, "/", "auto", MS_SLAVE|MS_REC, NULL);
+ s = mount("none", "/", "none", MS_PRIVATE|MS_REC, NULL);
if (s)
chk_chroot();
}
@@ -331,8 +331,9 @@ int mount_proc(const char *mount_path)
{
int s;
+ umount(mount_path);
s = mount("proc", mount_path, "proc",
- MS_RELATIME, "rw");
+ MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REC, NULL);
if (s) {
E_STRERR("Mount proc filesystem to %s", mount_path);
return 1;