提交 95ace754 编写于 作者: E Eric W. Biederman 提交者: Jeff Layton

locks: Don't allow mounts in user namespaces to enable mandatory locking

Since no one uses mandatory locking and files with mandatory locks can
cause problems don't allow them in user namespaces.
Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
上级 9e8925b6
......@@ -1589,7 +1589,7 @@ static inline bool may_mandlock(void)
#ifndef CONFIG_MANDATORY_FILE_LOCKING
return false;
#endif
return true;
return capable(CAP_SYS_ADMIN);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册