if (pid != 1)
return false;
- if (in_same_ns(pid, getpid(), "pid") == -EINVAL)
+ if (in_same_namespace(pid, getpid(), "pid") == -EINVAL)
return true;
return false;
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
/* check that cgcopy is either a child cgroup of cgdir, or listed in its keys.
* Then check that caller's cgroup is under path if last is a child
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (cgroup) {
if (!caller_may_see_dir(initpid, controller, cgroup))
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (!caller_is_in_ancestor(initpid, d->controller, d->cgroup, &nextcg)) {
if (nextcg) {
free_key(k);
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (!caller_may_see_dir(initpid, controller, path1)) {
ret = -ENOENT;
free_key(k);
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (!caller_may_see_dir(initpid, controller, path1)) {
ret = -ENOENT;
path1 = cgdir;
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (!caller_is_in_ancestor(initpid, controller, path1, &next)) {
if (!next)
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
if (!caller_is_in_ancestor(initpid, controller, cgroup, &next)) {
if (!last || (next && (strcmp(next, last) == 0)))
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
cg = get_pid_cgroup(initpid, "memory");
if (!cg)
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
cg = get_pid_cgroup(initpid, "cpuset");
if (!cg)
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
cg = get_pid_cgroup(initpid, "blkio");
if (!cg)
}
pid_t initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
cg = get_pid_cgroup(initpid, "memory");
if (!cg)
return read_file("/proc/loadavg", buf, size, d);
initpid = lookup_initpid_in_store(fc->pid);
- if (initpid <= 0 || is_shared_pidns(initpid))
+ if (initpid <= 1 || is_shared_pidns(initpid))
initpid = fc->pid;
cg = get_pid_cgroup(initpid, "cpu");
if (!cg)