diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-04-21 18:11:19 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-04-21 18:11:19 +0000 |
commit | 32f12b60cc993453e0419d55699f883edd7feeb5 (patch) | |
tree | c01699d851b69d7ae36f215085155bda57bc12f7 /sys/nfsserver | |
parent | cca3de2c55be08432928aafb01996eb30f5ebcf0 (diff) | |
download | FreeBSD-src-32f12b60cc993453e0419d55699f883edd7feeb5.zip FreeBSD-src-32f12b60cc993453e0419d55699f883edd7feeb5.tar.gz |
Attempt to rationalize NFS privileges:
- Replace PRIV_NFSD with PRIV_NFS_DAEMON, add PRIV_NFS_LOCKD.
- Use PRIV_NFS_DAEMON in the NFS server.
- In the NFS client, move the privilege check from nfslockdans(), which
occurs every time a write is performed on /dev/nfslock, and instead do it
in nfslock_open() just once. This allows us to avoid checking the saved
uid for root, and just use the effective on open. Use PRIV_NFS_LOCKD.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index f81900b..ab247ea 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -139,7 +139,7 @@ nfssvc(struct thread *td, struct nfssvc_args *uap) if (error) return (error); #endif - error = priv_check(td, PRIV_NFSD); + error = priv_check(td, PRIV_NFS_DAEMON); if (error) return (error); NET_LOCK_GIANT(); |