Date: Thu, 10 Jan 2008 18:36:28 -0800 From: Alfred Perlstein <alfred@freebsd.org> To: Peter Wemm <peter@wemm.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin <jhb@freebsd.org> Subject: Re: cvs commit: src/sys/nfsclient nfs_socket.c Message-ID: <20080111023628.GB99258@elvis.mu.org> In-Reply-To: <e7db6d980801101741j3c0a23aeh25e83b091394e011@mail.gmail.com> References: <200801102336.m0ANa0mP035046@repoman.freebsd.org> <20080111010033.GC52842@elvis.mu.org> <e7db6d980801101741j3c0a23aeh25e83b091394e011@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Peter Wemm <peter@wemm.org> [080110 17:39] wrote: > On Jan 10, 2008 5:00 PM, Alfred Perlstein <alfred@freebsd.org> wrote: > > > > * John Baldwin <jhb@FreeBSD.org> [080110 15:33] wrote: > > > jhb 2008-01-10 23:36:00 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/nfsclient nfs_socket.c > > > Log: > > > Pass curthread to various socket routines (socreate(), sobind(), and > > > soconnect()) instead of &thread0 when establishing a connection to the NFS > > > server. Otherwise inconsistent credentials may be used when setting up > > > the NFS socket. > > > > I'm not sure, but I think this may be a regression, I seem to recall > > that a long time ago it was switched to &thread0 because otherwise > > certain operations can fail due to curthread not running as root. > > That's my recollection too. For example, when nfs is configured to > bind to a priviliged local port for making queries or connections, it > had to be done as root. With tcp mounts, the connection can be > dropped and a reconnect required at any time. This could be implemented by a handoff to a thread that does the appropriate setuid call beforehand, or perhaps the credential inconsistencies can be further expained or fixed. -Alfred
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080111023628.GB99258>