Re: Proposal to automatically make the owner/user of an accepted socket the current process

Jonathan Stone <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel,gmane.os.netbsd.devel.network
Message-ID <[email protected]>
 

On Thursday, June 5, 2025 at 09:36:58 AM PDT, Emmanuel Nyarko <[email protected]> wrote:


> Errmmm, I was thinking that it maybe becomes a default behavior.
> 
> I mean every socket should be owned by the process that the socket was created for.
[...]
You say "should" be owned? Why? You're proposing a change at the SOL_SOCKET level, which means it will apply to Unix-domain sockets. What are the impacts of changing the owner of that socket to the uid of forked process, instead of the uid of the creator (presumably root)?

Deploying the proposed change everywhere that runs -current, without testing and experience, seems... premature. It has security implications. So until that experience is gained, I suggest making the feature 'opt-in', both system-wide, and per socket -- that is, the original creator has to issue a setsockopt() to enable the feature when (at minimum) the global setting is "off".

But hey, it's not my say.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.