mirror of
https://github.com/systemd/systemd.git
synced 2024-11-04 22:21:55 +03:00
logind: normalize home path when creating user object
Triggered by: #11910
This commit is contained in:
parent
f5164dfebc
commit
cd13d971dc
@ -68,6 +68,8 @@ int user_new(User **ret,
|
|||||||
if (!u->home)
|
if (!u->home)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
path_simplify(u->home, true);
|
||||||
|
|
||||||
if (asprintf(&u->state_file, "/run/systemd/users/"UID_FMT, uid) < 0)
|
if (asprintf(&u->state_file, "/run/systemd/users/"UID_FMT, uid) < 0)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user