mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
core/service: append the original error cause in the debugging logs
This commit is contained in:
@@ -6294,17 +6294,17 @@ int service_determine_exec_selinux_label(Service *s, char **ret) {
|
||||
else
|
||||
r = chase(c->path, s->exec_context.root_directory, CHASE_PREFIX_ROOT|CHASE_TRIGGER_AUTOFS, &path, NULL);
|
||||
if (r < 0) {
|
||||
log_unit_debug_errno(UNIT(s), r, "Failed to resolve service binary '%s', ignoring.", c->path);
|
||||
log_unit_debug_errno(UNIT(s), r, "Failed to resolve service binary '%s', ignoring: %m", c->path);
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
r = mac_selinux_get_create_label_from_exe(path, ret);
|
||||
if (ERRNO_IS_NEG_NOT_SUPPORTED(r)) {
|
||||
log_unit_debug_errno(UNIT(s), r, "Reading SELinux label off binary '%s' is not supported, ignoring.", path);
|
||||
log_unit_debug_errno(UNIT(s), r, "Reading SELinux label off binary '%s' is not supported, ignoring: %m", path);
|
||||
return -ENODATA;
|
||||
}
|
||||
if (ERRNO_IS_NEG_PRIVILEGE(r)) {
|
||||
log_unit_debug_errno(UNIT(s), r, "Can't read SELinux label off binary '%s', due to privileges, ignoring.", path);
|
||||
log_unit_debug_errno(UNIT(s), r, "Can't read SELinux label off binary '%s', due to privileges, ignoring: %m", path);
|
||||
return -ENODATA;
|
||||
}
|
||||
if (r < 0) {
|
||||
|
||||
Reference in New Issue
Block a user