mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22: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. (cherry picked from commit 661e4251a5b157d1aee1df98fbd2f0c95285ebba)
This commit is contained in:
parent
4cfdb1c73b
commit
d78dc885b0
@ -2662,6 +2662,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);
|
||||||
|
|
||||||
@ -2888,7 +2889,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