diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/utils.c b/src/utils.c index ae036de..d63edcc 100644 --- a/src/utils.c +++ b/src/utils.c @@ -286,7 +286,7 @@ void chk_chroot(void) return; } - E("%s", "Can not mount filesystem as private"); + E("%s", "Can not mount filesystem as slave"); exit(EXIT_FAILURE); } @@ -294,7 +294,7 @@ void mount_root(void) { int s; - s = mount("none", "/", "none", MS_PRIVATE|MS_REC, NULL); + s = mount("none", "/", "", MS_SLAVE|MS_NOSUID|MS_REC, NULL); if (s) chk_chroot(); } @@ -391,6 +391,7 @@ int create_device_files(const char *mount_path) return s; } +#if 0 int update_guid_map(pid_t pid, unsigned int map[3], int update_uidmap) { int s, fd; @@ -434,12 +435,13 @@ int update_setgroups_self(int allow) return 1; if (allow) { - written = write(fd, str_allow, sizeof str_allow); + written = write(fd, str_allow, sizeof(str_allow) - 1); } else { - written = write(fd, str_deny, sizeof str_deny); + written = write(fd, str_deny, sizeof(str_deny) - 1); } if (written <= 0) return 1; return 0; } +#endif |