summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/bootp_subr.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-12-31 17:45:16 +0000
committerrwatson <rwatson@FreeBSD.org>2001-12-31 17:45:16 +0000
commit5eea21cccab61c0a7e31c0025f3f57feeb99870a (patch)
tree7c8b2985310180ddd6c0718cf693e5b928d63555 /sys/nfsclient/bootp_subr.c
parent25ebb0c5b897fa6d9c618e7d9ced3a63510278d1 (diff)
downloadFreeBSD-src-5eea21cccab61c0a7e31c0025f3f57feeb99870a.zip
FreeBSD-src-5eea21cccab61c0a7e31c0025f3f57feeb99870a.tar.gz
o Make the credential used by socreate() an explicit argument to
socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r--sys/nfsclient/bootp_subr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index 1221135..ff7c256 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -586,7 +586,8 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td)
/*
* Create socket and set its recieve timeout.
*/
- error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td);
+ error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_proc->p_ucred,
+ td);
if (error != 0)
goto out;
@@ -971,7 +972,8 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
struct ifaddr *ifa;
struct sockaddr_dl *sdl;
- error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0, td);
+ error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0,
+ td->td_proc->p_ucred, td);
if (error != 0)
panic("nfs_boot: socreate, error=%d", error);
OpenPOWER on IntegriCloud