Date: Thu, 4 Jun 2009 11:28:33 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Doug Rabson <dfr@rabson.org> Cc: dfr@freebsd.org, Dmitry Marakasov <amdmi3@amdmi3.ru>, freebsd-current@freebsd.org, Michael Moll <kvedulv@kvedulv.de>, Wesley Shields <wxs@FreeBSD.org>, "Bjoern A. Zeeb" <bz@FreeBSD.org>, Jamie Gritton <jamie@FreeBSD.org> Subject: Re: Kernel panic when accessing ZFS-Filesystem via NFS Message-ID: <alpine.BSF.2.00.0906041126510.74158@fledge.watson.org> In-Reply-To: <942C18EE-0453-4568-B835-8379966F0B8A@rabson.org> References: <20090601182012.GA21543@darkthrone.kvedulv.de> <20090603121307.GA15659@hades.panopticon> <20090603152810.GA21014@atarininja.org> <20090603160945.GC21014@atarininja.org> <20090603184215.L12292@maildrop.int.zabbadoz.net> <942C18EE-0453-4568-B835-8379966F0B8A@rabson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Jun 2009, Doug Rabson wrote: >> I would start looking at svc_getcred() and blame at least the AUTH_UNIX >> case; end of rpc/svc_auth.c. This looks like a big NO-NO. I am pretty >> sure I'd also want to audit svc_rpc_gss(), just in case. > > The NFS server is creating a ucred which describes the privileges to be > given to the remote user. What is the correct way to do this and where can I > read the documentation? In practice, all credentials in the system are (often quite indirectly) derived from one of two root credentials, those belong to swapper and init. Typical practice, on initializing a kernel service, is to take an additional reference on the credential that configured the service and derive future credentials from it. I think this is what the old NFS code did, presumably either directly borrowing a proc 0 credential, or from the syscall turning on the NFS server. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0906041126510.74158>