summaryrefslogtreecommitdiff
path: root/src/login/sd-login.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/sd-login.c')
-rw-r--r--src/login/sd-login.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index f433e3e80b..4c918f2105 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -84,6 +84,17 @@ _public_ int sd_pid_get_unit(pid_t pid, char **unit) {
return cg_pid_get_unit(pid, unit);
}
+_public_ int sd_pid_get_user_unit(pid_t pid, char **unit) {
+
+ if (pid < 0)
+ return -EINVAL;
+
+ if (!unit)
+ return -EINVAL;
+
+ return cg_pid_get_user_unit(pid, unit);
+}
+
_public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) {
int r;
char *root, *cgroup, *p, *cc;