aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsserver/nfs.h
diff options
context:
space:
mode:
authorChristian S.J. Peron <csjp@FreeBSD.org>2006-01-28 19:24:40 +0000
committerChristian S.J. Peron <csjp@FreeBSD.org>2006-01-28 19:24:40 +0000
commit7a3e89195145c75fcc2f8ad92bbfb2384fea7a05 (patch)
tree548a570898537062aeefe097d3c1dce9772b05f8 /sys/nfsserver/nfs.h
parent05157fa0a1fbe7173f9996277a675f3caf67e75a (diff)
Manage the ucred for the NFS server using the crget/crfree API defined in
kern_prot.c. This API handles reference counting among many other things. Notably, if MAC is compiled into the kernel, it will properly initialize the MAC labels when the ucred is allocated. This work is in preparation for a new MAC entry point which will be responsible for properly initializing policy specific labels for the NFS server credential. Utilization of the crfree/crget APIs reduce the complexity associated with this label's management. Submitted by: green (with changes) [1] Obtained from: TrustedBSD Project Discussed with: rwatson, alfred [1] I moved the ucred allocation outside the scope of the NFS server lock to prevent M_WAIKOK allocations from occurring with non-sleep-able locks held. Additionally, to reduce complexity, the ucred persist as long as the NFS server descriptor.
Notes
svn path=/head/; revision=154960
Diffstat (limited to 'sys/nfsserver/nfs.h')
-rw-r--r--sys/nfsserver/nfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h
index e8d5d2163485..809df66c156b 100644
--- a/sys/nfsserver/nfs.h
+++ b/sys/nfsserver/nfs.h
@@ -258,7 +258,7 @@ struct nfsrv_descript {
u_int32_t nd_retxid; /* Reply xid */
struct timeval nd_starttime; /* Time RPC initiated */
fhandle_t nd_fh; /* File handle */
- struct ucred nd_cr; /* Credentials */
+ struct ucred *nd_cr; /* Credentials */
};
/* Bits for "nd_flag" */