diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-03-20 20:49:49 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-08-31 08:44:11 +0200 |
commit | c7b96acf1456ef127fef461fcfedb54b81fecfbb (patch) | |
tree | 1cc9387d23e96685453e545bda6d5a5efea8fa63 /kernel/utsname.c | |
parent | capabilities: allow nice if we are privileged (diff) | |
download | linux-c7b96acf1456ef127fef461fcfedb54b81fecfbb.tar.xz linux-c7b96acf1456ef127fef461fcfedb54b81fecfbb.zip |
userns: Kill nsown_capable it makes the wrong thing easy
nsown_capable is a special case of ns_capable essentially for just CAP_SETUID and
CAP_SETGID. For the existing users it doesn't noticably simplify things and
from the suggested patches I have seen it encourages people to do the wrong
thing. So remove nsown_capable.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/utsname.c')
-rw-r--r-- | kernel/utsname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/utsname.c b/kernel/utsname.c index 2fc8576efaa8..fd393124e507 100644 --- a/kernel/utsname.c +++ b/kernel/utsname.c @@ -114,7 +114,7 @@ static int utsns_install(struct nsproxy *nsproxy, void *new) struct uts_namespace *ns = new; if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || - !nsown_capable(CAP_SYS_ADMIN)) + !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) return -EPERM; get_uts_ns(ns); |