From: Lennart Poettering Date: Fri, 10 Jan 2025 22:50:41 +0000 (+0100) Subject: sysusers: use chase_and_stat() where appropriate X-Git-Tag: v258-rc1~1623^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F35976%2Fhead;p=thirdparty%2Fsystemd.git sysusers: use chase_and_stat() where appropriate --- diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index 8dd28902990..d4997bb6f0d 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -1039,11 +1039,8 @@ static int uid_is_ok( return 1; } -static int root_stat(const char *p, struct stat *st) { - const char *fix; - - fix = prefix_roota(arg_root, p); - return RET_NERRNO(stat(fix, st)); +static int root_stat(const char *p, struct stat *ret_st) { + return chase_and_stat(p, arg_root, CHASE_PREFIX_ROOT, /* ret_path= */ NULL, ret_st); } static int read_id_from_file(Item *i, uid_t *ret_uid, gid_t *ret_gid) {