]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core, sysctl: skip ENOENT for /proc/sys/net/unix/max_dgram_qlen
authorGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 5 Nov 2018 22:06:14 +0000 (23:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Nov 2018 13:41:34 +0000 (16:41 +0300)
sysctl is disabled for /proc mounted from an user namespace thus entries like
/proc/sys/net/unix/max_dgram_qlen do not exist.  In this case, skip the error
and do not try to change the default for the AF_UNIX datagram queue length.

src/core/main.c

index 807f5457c28f662902560ca2177e17e63e488560..1fd3f10f7ef22ecceb19ca2f8a46e4453e95f4e2 100644 (file)
@@ -1391,7 +1391,7 @@ static int bump_unix_max_dgram_qlen(void) {
 
         r = read_one_line_file("/proc/sys/net/unix/max_dgram_qlen", &qlen);
         if (r < 0)
-                return log_warning_errno(r, "Failed to read AF_UNIX datagram queue length, ignoring: %m");
+                return log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r, "Failed to read AF_UNIX datagram queue length, ignoring: %m");
 
         r = safe_atolu(qlen, &v);
         if (r < 0)