forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/kernel/cgroup/namespace.c
....@@ -95,11 +95,12 @@
9595 return container_of(ns, struct cgroup_namespace, ns);
9696 }
9797
98
-static int cgroupns_install(struct nsproxy *nsproxy, struct ns_common *ns)
98
+static int cgroupns_install(struct nsset *nsset, struct ns_common *ns)
9999 {
100
+ struct nsproxy *nsproxy = nsset->nsproxy;
100101 struct cgroup_namespace *cgroup_ns = to_cg_ns(ns);
101102
102
- if (!ns_capable(current_user_ns(), CAP_SYS_ADMIN) ||
103
+ if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) ||
103104 !ns_capable(cgroup_ns->user_ns, CAP_SYS_ADMIN))
104105 return -EPERM;
105106