Signed-off-by: Karel Zak <kzak@redhat.com>
}
- if (!rc && cxt->restricted && (cxt->user_mountflags & MNT_MS_USER)) {
+ if (!rc && mnt_context_is_restricted(cxt) && (cxt->user_mountflags & MNT_MS_USER)) {
ns_old = mnt_context_switch_origin_ns(cxt);
if (!ns_old)
return -MNT_ERR_NAMESPACE;
DBG(CXT, ul_debugobj(cxt, "do umount"));
- if (cxt->restricted && !mnt_context_is_fake(cxt)) {
+ if (mnt_context_is_restricted(cxt) && !mnt_context_is_fake(cxt)) {
/*
* extra paranoia for non-root users
* -- chdir to the parent of the mountpoint and use NOFOLLOW