lxc_list_init(&new->state_clients);
new->lsm_aa_profile = NULL;
new->lsm_se_context = NULL;
- new->tmp_umount_proc = 0;
+ new->tmp_umount_proc = false;
/* if running in a new user namespace, init and COMMAND
* default to running as UID/GID 0 when using lxc-execute */
if (conf->rootfs.path)
return -1;
} else if (mounted == 1) {
- conf->tmp_umount_proc = 1;
+ conf->tmp_umount_proc = true;
}
return 0;
void tmp_proc_unmount(struct lxc_conf *lxc_conf)
{
- if (lxc_conf->tmp_umount_proc != 1)
+ if (!lxc_conf->tmp_umount_proc)
return;
- umount("/proc");
- lxc_conf->tmp_umount_proc = 0;
+ (void)umount2("/proc", MNT_DETACH);
+ lxc_conf->tmp_umount_proc = false;
}
/* Walk /proc/mounts and change any shared entries to slave. */
char *lsm_aa_profile;
unsigned int lsm_aa_allow_incomplete;
char *lsm_se_context;
- int tmp_umount_proc;
+ bool tmp_umount_proc;
char *seccomp; /* filename with the seccomp rules */
#if HAVE_SCMP_FILTER_CTX
scmp_filter_ctx seccomp_ctx;