MFC r197581, r197583, r197584:
Set the prison in NFS anon and GSS SVC creds. Reviewed by: marcel Approved by: re (kib)
This commit is contained in:
parent
f24f7ffbd4
commit
a301d3226a
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/dirent.h>
|
||||
#include <sys/domain.h>
|
||||
#include <sys/jail.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -122,6 +123,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
|
||||
np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
|
||||
crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
|
||||
argp->ex_anon.cr_groups);
|
||||
np->netc_anon->cr_prison = &prison0;
|
||||
prison_hold(np->netc_anon->cr_prison);
|
||||
np->netc_numsecflavors = argp->ex_numsecflavors;
|
||||
bcopy(argp->ex_secflavors, np->netc_secflavors,
|
||||
sizeof(np->netc_secflavors));
|
||||
@ -206,6 +209,8 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
|
||||
np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
|
||||
crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
|
||||
np->netc_anon->cr_groups);
|
||||
np->netc_anon->cr_prison = &prison0;
|
||||
prison_hold(np->netc_anon->cr_prison);
|
||||
np->netc_numsecflavors = argp->ex_numsecflavors;
|
||||
bcopy(argp->ex_secflavors, np->netc_secflavors,
|
||||
sizeof(np->netc_secflavors));
|
||||
|
@ -449,6 +449,8 @@ rpc_gss_svc_getcred(struct svc_req *req, struct ucred **crp, int *flavorp)
|
||||
cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid;
|
||||
cr->cr_rgid = cr->cr_svgid = uc->gid;
|
||||
crsetgroups(cr, uc->gidlen, uc->gidlist);
|
||||
cr->cr_prison = &prison0;
|
||||
prison_hold(cr->cr_prison);
|
||||
*crp = crhold(cr);
|
||||
|
||||
return (TRUE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user