diff options
| author | Brian Feldman <green@FreeBSD.org> | 2001-02-18 13:30:20 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 2001-02-18 13:30:20 +0000 |
| commit | c0511d3b58c985e17c0c23585ea7d16b6f52fe61 (patch) | |
| tree | 2c98c72cf23cba290a2be73c7aed9bd4bf7a492c /sys/nfs | |
| parent | ffa3e13653a581fa24e55f911eef6ab1b8ffbf82 (diff) | |
Notes
Diffstat (limited to 'sys/nfs')
| -rw-r--r-- | sys/nfs/nfs.h | 2 | ||||
| -rw-r--r-- | sys/nfs/nfs_syscalls.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h index 5c5a8237f13f..6423e5ac6af6 100644 --- a/sys/nfs/nfs.h +++ b/sys/nfs/nfs.h @@ -197,7 +197,7 @@ struct nfsd_srvargs { struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */ uid_t nsd_uid; /* Effective uid mapped to cred */ u_int32_t nsd_haddr; /* Ip address of client */ - struct ucred nsd_cr; /* Cred. uid maps to */ + struct xucred nsd_cr; /* Cred. uid maps to */ int nsd_authlen; /* Length of auth string (ret) */ u_char *nsd_authstr; /* Auth string (ret) */ int nsd_verflen; /* and the verfier */ diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 4eb5c86eaf73..2d46568f08cb 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.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; |
