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: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
This commit is contained in:
Eric W. Biederman 2015-11-11 17:22:33 -06:00 коммит произвёл Jeff Layton
Родитель 9e8925b67a
Коммит 95ace75414
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
}
/*