mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
login: check return of parse_pid and parse_uid
This commit is contained in:
parent
b5fb37899d
commit
a34faf579d
@ -219,11 +219,17 @@ int inhibitor_load(Inhibitor *i) {
|
||||
if (mm >= 0)
|
||||
i->mode = mm;
|
||||
|
||||
if (uid)
|
||||
parse_uid(uid, &i->uid);
|
||||
if (uid) {
|
||||
r = parse_uid(uid, &i->uid);
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (pid)
|
||||
parse_pid(pid, &i->pid);
|
||||
if (pid) {
|
||||
r = parse_pid(pid, &i->pid);
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (who) {
|
||||
cc = cunescape(who);
|
||||
|
Loading…
Reference in New Issue
Block a user