mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-27 14:03:43 +03:00
execute: Pass AT_FDCWD instead of -1
Let's enforce that callers pass AT_FDCWD as read_dfd to load_credential() to avoid an assert() in read_full_file_full() if read_dfd is -1.
This commit is contained in:
parent
99173cafbe
commit
661e4251a5
@ -2663,6 +2663,7 @@ static int load_credential(
|
|||||||
assert(id);
|
assert(id);
|
||||||
assert(path);
|
assert(path);
|
||||||
assert(unit);
|
assert(unit);
|
||||||
|
assert(read_dfd >= 0 || read_dfd == AT_FDCWD);
|
||||||
assert(write_dfd >= 0);
|
assert(write_dfd >= 0);
|
||||||
assert(left);
|
assert(left);
|
||||||
|
|
||||||
@ -2889,7 +2890,7 @@ static int acquire_credentials(
|
|||||||
lc->path,
|
lc->path,
|
||||||
lc->encrypted,
|
lc->encrypted,
|
||||||
unit,
|
unit,
|
||||||
-1,
|
AT_FDCWD,
|
||||||
dfd,
|
dfd,
|
||||||
uid,
|
uid,
|
||||||
ownership_ok,
|
ownership_ok,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user