dbus-send --print-reply --system --dest=org.freedesktop.login1
/org/freedesktop/login1 org.freedesktop.login1.Manager.GetUserByPID
uint32:0
causes
systemd-logind[29843]: Assertion 'pid >= 1' failed at
src/login/logind.c:938, function manager_get_user_by_pid(). Aborting.
int r;
assert(m);
- assert(pid >= 1);
assert(session);
+ if (pid < 1)
+ return -EINVAL;
+
r = cg_pid_get_unit(pid, &unit);
if (r < 0)
return r;
int r;
assert(m);
- assert(pid >= 1);
assert(user);
+ if (pid < 1)
+ return -EINVAL;
+
r = cg_pid_get_slice(pid, &unit);
if (r < 0)
return r;