mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
tmpfiles: improve error message for missing user/group
From a boot with a dracut initrd: systemd-tmpfiles[242]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:2: Failed to resolve user 'tss': No such process systemd-tmpfiles[242]: Failed to parse ACL "default:group:tss:rwx", ignoring: Invalid argument systemd-tmpfiles[242]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:4: Failed to resolve user 'tss': No such process systemd-tmpfiles[242]: Failed to parse ACL "default:group:tss:rwx", ignoring: Invalid argument systemd-tmpfiles[242]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:6: Failed to resolve group 'tss': No such process systemd-tmpfiles[242]: /usr/lib/tmpfiles.d/tpm2-tss-fapi.conf:7: Failed to resolve group 'tss': No such process
This commit is contained in:
@@ -3992,7 +3992,8 @@ static int parse_line(
|
||||
missing_user_or_group = true;
|
||||
} else if (r < 0) {
|
||||
*invalid_config = true;
|
||||
return log_syntax(NULL, LOG_ERR, fname, line, r, "Failed to resolve user '%s': %m", u);
|
||||
return log_syntax(NULL, LOG_ERR, fname, line, r,
|
||||
"Failed to resolve user '%s': %s", u, STRERROR_USER(r));
|
||||
} else
|
||||
i.uid_set = true;
|
||||
}
|
||||
@@ -4013,7 +4014,8 @@ static int parse_line(
|
||||
missing_user_or_group = true;
|
||||
} else if (r < 0) {
|
||||
*invalid_config = true;
|
||||
return log_syntax(NULL, LOG_ERR, fname, line, r, "Failed to resolve group '%s': %m", g);
|
||||
return log_syntax(NULL, LOG_ERR, fname, line, r,
|
||||
"Failed to resolve group '%s': %s", g, STRERROR_GROUP(r));
|
||||
} else
|
||||
i.gid_set = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user