diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-10-04 10:27:04 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-10-04 12:47:01 +0200 |
commit | 7cd56ec9515a7ffc4edbd7d10ab7d001129abf57 (patch) | |
tree | d523333e8d206866ad4a09e12d1b64042b9af12c /src/partition | |
parent | man: consolidate list of active unit states into a shared table (diff) | |
download | systemd-7cd56ec9515a7ffc4edbd7d10ab7d001129abf57.tar.xz systemd-7cd56ec9515a7ffc4edbd7d10ab7d001129abf57.zip |
repart: Handle empty arg_copy_source in file_is_denylisted()
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 090fe27672..95ae0a3158 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -5458,8 +5458,8 @@ static int file_is_denylisted(const char *source, Hashmap *denylist) { if (PTR_TO_INT(hashmap_get(denylist, &st)) == DENY_INODE) return 1; - if (stat(arg_copy_source, &rst) < 0) - return log_error_errno(errno, "Failed to stat '%s': %m", arg_copy_source); + if (stat(empty_to_root(arg_copy_source), &rst) < 0) + return log_error_errno(errno, "Failed to stat '%s': %m", empty_to_root(arg_copy_source)); pfd = chase_and_open_parent(source, arg_copy_source, CHASE_PREFIX_ROOT, /*ret_filename=*/ NULL); if (pfd < 0) |