summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_nfsiod.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-02-18 13:30:20 +0000
committergreen <green@FreeBSD.org>2001-02-18 13:30:20 +0000
commit18d474781ff1acbc67429e2db4fa0cf9a0d3c51e (patch)
tree808a921485b80fef4bca2cceb1aebb079b676224 /sys/nfsclient/nfs_nfsiod.c
parente3ae1d8f1208e5e776d6d807b5d3249c810fa857 (diff)
downloadFreeBSD-src-18d474781ff1acbc67429e2db4fa0cf9a0d3c51e.zip
FreeBSD-src-18d474781ff1acbc67429e2db4fa0cf9a0d3c51e.tar.gz
Switch to using a struct xucred instead of a struct xucred when not
actually in the kernel. This structure is a different size than what is currently in -CURRENT, but should hopefully be the last time any application breakage is caused there. As soon as any major inconveniences are removed, the definition of the in-kernel struct ucred should be conditionalized upon defined(_KERNEL). This also changes struct export_args to remove dependency on the constantly-changing struct ucred, as well as limiting the bounds of the size fields to the correct size. This means: a) mountd and friends won't break all the time, b) mountd and friends won't crash the kernel all the time if they don't know what they're doing wrt actual struct export_args layout. Reviewed by: bde
Diffstat (limited to 'sys/nfsclient/nfs_nfsiod.c')
-rw-r--r--sys/nfsclient/nfs_nfsiod.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 4eb5c86..2d46568 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -260,7 +260,13 @@ nfssvc(p, uap)
FREE(nuidp->nu_nam, M_SONAME);
}
nuidp->nu_flag = 0;
- nuidp->nu_cr = nsd->nsd_cr;
+ bzero(&nuidp->nu_cr, sizeof(nuidp->nu_cr));
+ nuidp->nu_cr.cr_uid = nsd->nsd_cr.cr_uid;
+ nuidp->nu_cr.cr_ngroups =
+ nsd->nsd_cr.cr_ngroups;
+ bcopy(nsd->nsd_cr.cr_groups,
+ nuidp->nu_cr.cr_groups,
+ sizeof(nuidp->nu_cr.cr_groups));
if (nuidp->nu_cr.cr_ngroups > NGROUPS)
nuidp->nu_cr.cr_ngroups = NGROUPS;
nuidp->nu_cr.cr_ref = 1;
OpenPOWER on IntegriCloud