Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but
also a purveyor of unfortunate (and now unsupported) direct frobbing of struct ucred. MFC after: 3 days
This commit is contained in:
parent
ee2b7497ea
commit
a49d769e88
@ -347,7 +347,6 @@ void nfsrv_cleancache(void);
|
||||
void nfsrv_init(int);
|
||||
int nfsrv_errmap(struct nfsrv_descript *, int);
|
||||
void nfsrvw_sort(gid_t *, int);
|
||||
void nfsrv_setcred(struct ucred *, struct ucred *);
|
||||
void nfsrv_wakenfsd(struct nfssvc_sock *slp);
|
||||
int nfsrv_writegather(struct nfsrv_descript **, struct nfssvc_sock *,
|
||||
struct thread *, struct mbuf **);
|
||||
|
@ -1265,23 +1265,6 @@ nfsrvw_sort(gid_t *list, int num)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* copy credentials making sure that the result can be compared with bcmp().
|
||||
*/
|
||||
void
|
||||
nfsrv_setcred(struct ucred *incred, struct ucred *outcred)
|
||||
{
|
||||
int i;
|
||||
|
||||
bzero((caddr_t)outcred, sizeof (struct ucred));
|
||||
refcount_init(&outcred->cr_ref, 1);
|
||||
outcred->cr_uid = incred->cr_uid;
|
||||
outcred->cr_ngroups = incred->cr_ngroups;
|
||||
for (i = 0; i < incred->cr_ngroups; i++)
|
||||
outcred->cr_groups[i] = incred->cr_groups[i];
|
||||
nfsrvw_sort(outcred->cr_groups, outcred->cr_ngroups);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper functions for macros.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user