#132 daemon does not honor umask for socket creation

open
nobody
daemon (84)
5
2011-06-07
2011-06-07
flp
No

The dspam daemon does not honor the umask from the environment it inherits. See
src/daemon.c, line 133:
http://dspam.git.sourceforge.net/git/gitweb.cgi?p=dspam/dspam;a=blob;f=src/daemon.c;h=4b76e0fcb8f9fc4c938100b22134e608c490e1b8;hb=HEAD#l133

It sets the umask to 000, hence /var/run/dspam/dspam.sock is srwxrwxrwx, which can be undesirable.
The socket permissions should ideally be configurable via dspam.conf, but a quicker fix might be to use the inherited umask, making it up to the init script and hence the user/distro to provide the desired umask before starting dspam.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks