mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-26 10:03:40 +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(path);
|
||||
assert(unit);
|
||||
assert(read_dfd >= 0 || read_dfd == AT_FDCWD);
|
||||
assert(write_dfd >= 0);
|
||||
assert(left);
|
||||
|
||||
@ -2889,7 +2890,7 @@ static int acquire_credentials(
|
||||
lc->path,
|
||||
lc->encrypted,
|
||||
unit,
|
||||
-1,
|
||||
AT_FDCWD,
|
||||
dfd,
|
||||
uid,
|
||||
ownership_ok,
|
||||
|
Loading…
x
Reference in New Issue
Block a user