Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
add compute_proxy_cgroup to declarations in fs.h
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Mar 24, 2015
1 parent 9f585b4 commit 8dbb501
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs.c
Expand Up @@ -1345,6 +1345,10 @@ bool compute_pid_cgroup(pid_t pid, const char *controller, const char *cgroup,
}

#define SYSTEMD_CGPROXY_SLICE "/system.slice/cgproxy.service"
/*
* compute_proxy_cgroup - same as compute_pid_cgroup, but chops of the
* final /system.slice/cgproxy.service.
*/
bool compute_proxy_cgroup(pid_t pid, const char *controller, const char *cgroup,
char *path, int *depth)
{
Expand Down
2 changes: 2 additions & 0 deletions fs.h
Expand Up @@ -31,6 +31,8 @@ int collect_subsystems(char *extra_mounts, char *skip_mounts);
int setup_cgroup_mounts(void);
bool compute_pid_cgroup(pid_t pid, const char *controller, const char *cgroup,
char *path, int *depth);
bool compute_proxy_cgroup(pid_t pid, const char *controller, const char *cgroup,
char *path, int *depth);
bool may_access(pid_t pid, uid_t uid, gid_t gid, const char *path, int mode);
void get_pid_creds(pid_t pid, uid_t *uid, gid_t *gid);
char *file_read_string(void *parent, const char *path);
Expand Down

0 comments on commit 8dbb501

Please sign in to comment.