HomeFreeBSD

syslogd: Fix handling of unix socket modes

Description

syslogd: Fix handling of unix socket modes

When bind() is called, the process umask is applied, so one has to
either clear the umask before binding or call chmod() to add permissions
after the fact. Do the former here to ensure that the socket always has
the correct mode.

Reported by: Lexi Winter <lexi@le-fay.org>
Fixes: 2b8c3a05e0a6 ("syslogd: Set unix socket modes atomically")

Details

Provenance
markjAuthored on Nov 5 2024, 5:48 PM
Parents
rGd14c38ceb8aa: sys: Avoid relying on pollution from refcount.h
Branches
Unknown
Tags
Unknown