.. | .. |
---|
95 | 95 | return container_of(ns, struct cgroup_namespace, ns); |
---|
96 | 96 | } |
---|
97 | 97 | |
---|
98 | | -static int cgroupns_install(struct nsproxy *nsproxy, struct ns_common *ns) |
---|
| 98 | +static int cgroupns_install(struct nsset *nsset, struct ns_common *ns) |
---|
99 | 99 | { |
---|
| 100 | + struct nsproxy *nsproxy = nsset->nsproxy; |
---|
100 | 101 | struct cgroup_namespace *cgroup_ns = to_cg_ns(ns); |
---|
101 | 102 | |
---|
102 | | - if (!ns_capable(current_user_ns(), CAP_SYS_ADMIN) || |
---|
| 103 | + if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) || |
---|
103 | 104 | !ns_capable(cgroup_ns->user_ns, CAP_SYS_ADMIN)) |
---|
104 | 105 | return -EPERM; |
---|
105 | 106 | |
---|