mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09: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:
committed by
Yu Watanabe
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,
|
||||
|
||||
Reference in New Issue
Block a user