Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2009 13:11:46 +0000 (UTC)
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r197667 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern rpc/rpcsec_gss
Message-ID:  <200910011311.n91DBkOf052250@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jamie
Date: Thu Oct  1 13:11:45 2009
New Revision: 197667
URL: http://svn.freebsd.org/changeset/base/197667

Log:
  MFC r197581, r197583, r197584:
  
    Set the prison in NFS anon and GSS SVC creds.
  
  Reviewed by:	marcel
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/vfs_export.c
  stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c

Modified: stable/8/sys/kern/vfs_export.c
==============================================================================
--- stable/8/sys/kern/vfs_export.c	Thu Oct  1 13:03:17 2009	(r197666)
+++ stable/8/sys/kern/vfs_export.c	Thu Oct  1 13:11:45 2009	(r197667)
@@ -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, stru
 		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, stru
 	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));

Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Thu Oct  1 13:03:17 2009	(r197666)
+++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Thu Oct  1 13:11:45 2009	(r197667)
@@ -449,6 +449,8 @@ rpc_gss_svc_getcred(struct svc_req *req,
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910011311.n91DBkOf052250>