The previous patch actually didn't handle those, but only
/cgroup itself.
Closes #107
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
cgroup = find_cgroup_in_path(path);
if (!cgroup) {
// access("/sys/fs/cgroup/systemd", mode) - rx allowed, w not
cgroup = find_cgroup_in_path(path);
if (!cgroup) {
// access("/sys/fs/cgroup/systemd", mode) - rx allowed, w not
- return mode & W_OK == 0 ? 0 : -EACCES;
+ if ((mode & W_OK) == 0)
+ return 0;
+ return -EACCES;
}
get_cgdir_and_path(cgroup, &cgdir, &last);
}
get_cgdir_and_path(cgroup, &cgdir, &last);
k = cgfs_get_key(controller, path1, path2);
if (!k) {
k = cgfs_get_key(controller, path1, path2);
if (!k) {
+ if ((mode & W_OK) == 0)
+ ret = 0;
+ else
+ ret = -EACCES;