tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Remote pid with SOCK_DGRAM local socket



On May 13, 2011, at 12:24 57AM, der Mouse wrote:

>>> [I]t seems to me this should be part of SCM_CREDS.  Surely it
>>> wouldn't be that hard to version the structure and option to do
>>> that?  Or is there some reason _I_'m missing why that would be a Bad
>>> Thing?
>> What if more than one process has an open fd to the socket?  Which
>> should it give?
> 
> The one which did the send, of course.

There is, of course, a race condition, since that one could exit quickly.
> 
> You have exactly the same issue for the information SCM_CREDS already
> carries; a quick look at the code makes me think the issue is resolved
> this way already for that data.

The PR spoke of bind() and connect()...

                --Steve Bellovin, https://www.cs.columbia.edu/~smb







Home | Main Index | Thread Index | Old Index