Subject: Re: Are permissions of local sockets correct?
To: None <tech-kern@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: tech-kern
Date: 08/21/2005 22:29:22
jmmv84@gmail.com ("Julio M. Merino Vidal") writes:

>while trying gamin (a file alteration monitor, like fam), I found that it
>refuses to work because it detects that the local sockets it creates
>have "too much permissions" (that is, 777).

Many UNIX variants ignore the mode bits for local sockets. This is
probably just 'traditional' but also makes local sockets more similar
to network sockets.

>FreeBSD, OpenBSD and Linux respect the umask.  If our behavior is
>not correct, what about the following patch?

Our behaviour is at least not consistent as connect() seems to honor
the mode bits when you change them with chmod.

Does fchmod() work?

-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."