[systemd-devel] [PATCH] syslog: apply requested datagram size before sysctl

Colin Guthrie gmane at colin.guthr.ie
Thu Jul 24 02:30:12 PDT 2014


Umut Tezduyar Lindskog wrote on 24/07/14 09:53:
> systemd-sysctl runs after syslog.socket since syslog.socket
> has DefaultDependencies=no. Due to this, syslog.socket
> is created with default value of net.unix.max_dgram_qlen.
> ---
>  units/syslog.socket |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/units/syslog.socket b/units/syslog.socket
> index e6e9cf8..4e23953 100644
> --- a/units/syslog.socket
> +++ b/units/syslog.socket
> @@ -16,6 +16,7 @@ Before=sockets.target shutdown.target
>  Conflicts=shutdown.target
>  
>  [Socket]
> +ExecStartPre=/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/unix/max_dgram_qlen
>  ListenDatagram=/run/systemd/journal/syslog
>  SocketMode=0666
>  PassCredentials=yes


Not sure if there are other problems here, but IMO it would be safer to
make this an ExecStartPre=- thing as we presumably don't want the syslog
socket to fail just because we couldn't run sysctl for whatever reason
(not that I could think why, unless it fails when proc is ro or such
like - not checked)

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list