stat-util: generalize is_* and verify_* handling
This commit is contained in:
@@ -1066,10 +1066,8 @@ static int process_root_account(int rfd) {
|
||||
|
||||
FOREACH_STRING(s, "passwd", "shadow") {
|
||||
r = verify_regular_at(pfd, s, /* follow = */ false);
|
||||
if (IN_SET(r, -EISDIR, -ELOOP, -EBADFD))
|
||||
return log_error_errno(r, "/etc/%s is not a regular file", s);
|
||||
if (r < 0 && r != -ENOENT)
|
||||
return log_error_errno(r, "Failed to check whether /etc/%s is a regular file: %m", s);
|
||||
return log_error_errno(r, "Verification of /etc/%s being regular file failed: %m", s);
|
||||
|
||||
r = should_configure(pfd, s);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user