[systemd-devel] [PATCH] Set cgroup path to uid for user sessions.
Auke Kok
auke-jan.h.kok at intel.com
Tue Mar 19 21:34:45 PDT 2013
Without this patch, I'm seeing cgroup paths for user sessions with
both the user name, and the uid created, which can't be intended.
Spotted through user-session-units use.
---
src/login/logind-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 411215a..8a91c80 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -315,7 +315,7 @@ static int user_create_cgroup(User *u) {
assert(u);
if (!u->cgroup_path) {
- if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0)
+ if (asprintf(&p, "%s/%lu", u->manager->cgroup_path, (unsigned long)u->uid) < 0)
return log_oom();
} else
p = u->cgroup_path;
--
1.7.11.2
More information about the systemd-devel
mailing list