Source-Changes archive

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

Re: CVS commit: src/sys/nfs



On Jul 8, 12:36pm, yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
-- Subject: Re: CVS commit: src/sys/nfs

| > Module Name:        src
| > Committed By:       christos
| > Date:               Thu Jul  7 14:26:37 UTC 2005
| > 
| > Modified Files:
| >     src/sys/nfs: nfs_bio.c
| > 
| > Log Message:
| > Back to using curproc in the VLNK case when uiop->uio_procp == NULL,
| > and explain why we need to.
| 
| why do you want to use uio_procp->p_ucred here?
| 
| uio_procp specifies an address space, not a requester.
| i don't understand what an address space's credential means.

The whole structure of the code is stupid. We go from:

nfs_readlink -> nfs_bioread -> nfs_doio -> nfs_doio_read -> nfs_readlinkrpc
                   |
                   \-> nfs_readlinkrpc

We have the proper credentials here in the beginning of the call chain,
but we stupidly drop them between nfs_bioread and nfs_doio. The proper
fix is to pass cred down the chain instead of relying on curproc.

It would be nice to have the notion of "who are we doing the i/o on behalf
of" in uio, but we don't, and yes I agree uio_procp->p_ucred is not it
(since in the UIO_SYSSPACE case uio_procp is NULL).

christos

christos



Home | Main Index | Thread Index | Old Index