[systemd-devel] x bits set on /run/systemd/private, any particular reason?

Mantas Mikulėnas grawity at gmail.com
Fri Jun 24 16:30:38 UTC 2016


On Fri, Jun 24, 2016 at 2:24 PM, Hoyer, Marko (ADITG/SW2) <
mhoyer at de.adit-jv.com> wrote:

> Hi,
>
>
>
> I’m not an expert on Linux access right management but I’m wondering why
> systemd’s private socket (/run/systemd/private) has the x bits set. Did it
> happen accidently?
>

Immediately after bind(), the socket will have all permissions that weren't
masked out by the current umask – there doesn't seem to be an equivalent to
the mode parameter of open().

The default umask for init is 0; it seems that while systemd does set a
more restrictive umask when necessary, it doesn't bother doing so when
setting up the private socket, so it ends up having 0777 permissions by
default...

Either way, +x has no meaning on sockets (only +w matters). Checking `find
/run -type s -ls`, it seems services aren't very consistent whether to keep
or remove it for their own sockets...

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160624/5874a0b4/attachment.html>


More information about the systemd-devel mailing list