diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2008-07-05 13:10:10 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2008-07-05 13:10:10 +0000 |
commit | 4f7d1876d532e6607cebd4ea3775094ee8c05dba (patch) | |
tree | fcde383ade7af0060da3dd095039791d9e423bee /sys/rpc/authunix_prot.c | |
parent | e1747bd4de5dbf81642a7f258f8e4942b56ee0c5 (diff) | |
download | src-test2-4f7d1876d532e6607cebd4ea3775094ee8c05dba.tar.gz src-test2-4f7d1876d532e6607cebd4ea3775094ee8c05dba.zip |
Notes
Diffstat (limited to 'sys/rpc/authunix_prot.c')
-rw-r--r-- | sys/rpc/authunix_prot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index 141f594b5513..b229fb3cee10 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/systm.h> #include <sys/ucred.h> @@ -67,6 +69,7 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) uint32_t ngroups, i; uint32_t junk; + mtx_lock(&hostname_mtx); if (xdrs->x_op == XDR_ENCODE) { /* * Restrict name length to 255 according to RFC 1057. @@ -92,6 +95,7 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) } else { xdr_setpos(xdrs, xdr_getpos(xdrs) + RNDUP(namelen)); } + mtx_unlock(&hostname_mtx); if (!xdr_uint32_t(xdrs, &cred->cr_uid)) return (FALSE); |