summaryrefslogtreecommitdiff
path: root/src/sysctl
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2022-06-13 16:01:04 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-06-14 09:29:37 +0900
commit1805fbcf064c35b13186f1f4ae6590a5cffe59f1 (patch)
tree28c6bb4bc462b43f61fc1c8565f3046ccc0d16dc /src/sysctl
parentb0367874d578ec5af387612340150a547efea8e4 (diff)
downloadsystemd-1805fbcf064c35b13186f1f4ae6590a5cffe59f1.tar.gz
sysctl: increase log severity on failed write
Increase the log severity in case of writing to a non existent sysctl parameter as this can either be caused by a misspelling or a kernel mis- configuration, e.g. in case YAMA does not get loaded due to a incomplete lsm= override: systemd-sysctl[354]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
Diffstat (limited to 'src/sysctl')
-rw-r--r--src/sysctl/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index 24c8baab03..2b854a7370 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -107,7 +107,7 @@ static int sysctl_write_or_warn(const char *key, const char *value, bool ignore_
if (ignore_failure || r == -EROFS || ERRNO_IS_PRIVILEGE(r))
log_debug_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
else if (r == -ENOENT)
- log_info_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
+ log_warning_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
else
return log_error_errno(r, "Couldn't write '%s' to '%s': %m", value, key);
}