Subject: Re: curproc removal (NFS, ...)
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 05/26/2004 04:08:59
>> We have agreed not to go back to using use curproc.  How, then,
>> would you suggest we pass the necessary struct proc * to
>> soreceive(), so it can pass it onto pr->pr_domain->dom_externalize?
> Can't this end up in the so_pcb, get filled in at connect time and
> then be entirely private to unix domain sockets?

No; that's not how the semantics of receiving SCM_RIGHTS messages
(which is what unp_externalize, the dom_externalize function for
AF_LOCAL sockets, is in aid of) work.  The descriptors have to land in
the open-file table of the process that does the receive, regardless of
whether that process bears any relation to any process that may have
been involved at connect time.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B