From owner-cvs-src-old@FreeBSD.ORG Fri Jun 19 17:13:35 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B011C106564A for ; Fri, 19 Jun 2009 17:13:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9351B8FC13 for ; Fri, 19 Jun 2009 17:13:35 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JHDZK9072859 for ; Fri, 19 Jun 2009 17:13:35 GMT (envelope-from brooks@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5JHDZsR072858 for cvs-src-old@freebsd.org; Fri, 19 Jun 2009 17:13:35 GMT (envelope-from brooks@repoman.freebsd.org) Message-Id: <200906191713.n5JHDZsR072858@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to brooks@repoman.freebsd.org using -f From: Brooks Davis Date: Fri, 19 Jun 2009 17:10:35 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src UPDATING src/lib/libc/rpc netname.c netnamer.c src/lib/libkvm kvm_proc.c src/sys/compat/linux linux_misc.c linux_uid16.c src/sys/fs/nfs nfs_commonport.c src/sys/fs/nfsclient nfs_clport.c src/sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdstate.c ... X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 17:13:35 -0000 brooks 2009-06-19 17:10:35 UTC FreeBSD src repository Modified files: . UPDATING lib/libc/rpc netname.c netnamer.c lib/libkvm kvm_proc.c sys/compat/linux linux_misc.c linux_uid16.c sys/fs/nfs nfs_commonport.c sys/fs/nfsclient nfs_clport.c sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdstate.c sys/fs/portalfs portal.h portal_vnops.c sys/fs/unionfs union_vnops.c sys/i386/ibcs2 ibcs2_misc.c sys/kern kern_exec.c kern_proc.c kern_prot.c vfs_export.c sys/netinet/ipfw ip_fw2.c sys/nfsserver nfs_srvsock.c nfs_srvsubs.c sys/rpc svc_auth.c svc_auth_unix.c sys/rpc/rpcsec_gss svc_rpcsec_gss.c sys/sys param.h syslimits.h ucred.h user.h sys/ufs/ufs ufs_vnops.c usr.sbin/mount_portalfs portald.h usr.sbin/mountd mountd.c Log: SVN rev 194498 on 2009-06-19 17:10:35Z by brooks Rework the credential code to support larger values of NGROUPS and NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024 and 1023 respectively. (Previously they were equal, but under a close reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it is the number of supplemental groups, not total number of groups.) The bulk of the change consists of converting the struct ucred member cr_groups from a static array to a pointer. Do the equivalent in kinfo_proc. Introduce new interfaces crcopysafe() and crsetgroups() for duplicating a process credential before modifying it and for setting group lists respectively. Both interfaces take care for the details of allocating groups array. crsetgroups() takes care of truncating the group list to the current maximum (NGROUPS) if necessary. In the future, crsetgroups() may be responsible for insuring invariants such as sorting the supplemental groups to allow groupmember() to be implemented as a binary search. Because we can not change struct xucred without breaking application ABIs, we leave it alone and introduce a new XU_NGROUPS value which is always 16 and is to be used or NGRPS as appropriate for things such as NFS which need to use no more than 16 groups. When feasible, truncate the group list rather than generating an error. Minor changes: - Reduce the number of hand rolled versions of groupmember(). - Do not assign to both cr_gid and cr_groups[0]. - Modify ipfw to cache ucreds instead of part of their contents since they are immutable once referenced by more than one entity. Submitted by: Isilon Systems (initial implementation) X-MFC after: never PR: bin/113398 kern/133867 Revision Changes Path 1.620 +17 -0 src/UPDATING 1.9 +0 -3 src/lib/libc/rpc/netname.c 1.13 +3 -7 src/lib/libc/rpc/netnamer.c 1.99 +1 -2 src/lib/libkvm/kvm_proc.c 1.240 +15 -9 src/sys/compat/linux/linux_misc.c 1.24 +12 -6 src/sys/compat/linux/linux_uid16.c 1.4 +1 -6 src/sys/fs/nfs/nfs_commonport.c 1.3 +3 -5 src/sys/fs/nfsclient/nfs_clport.c 1.14 +2 -4 src/sys/fs/nfsserver/nfs_nfsdport.c 1.10 +0 -1 src/sys/fs/nfsserver/nfs_nfsdstate.c 1.11 +1 -1 src/sys/fs/portalfs/portal.h 1.81 +3 -2 src/sys/fs/portalfs/portal_vnops.c 1.160 +8 -12 src/sys/fs/unionfs/union_vnops.c 1.73 +24 -9 src/sys/i386/ibcs2/ibcs2_misc.c 1.334 +1 -3 src/sys/kern/kern_exec.c 1.282 +2 -4 src/sys/kern/kern_proc.c 1.222 +135 -35 src/sys/kern/kern_prot.c 1.351 +4 -6 src/sys/kern/vfs_export.c 1.5 +18 -43 src/sys/netinet/ipfw/ip_fw2.c 1.116 +2 -2 src/sys/nfsserver/nfs_srvsock.c 1.166 +1 -3 src/sys/nfsserver/nfs_srvsubs.c 1.4 +1 -5 src/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c 1.4 +2 -4 src/sys/rpc/svc_auth.c 1.4 +3 -3 src/sys/rpc/svc_auth_unix.c 1.422 +1 -1 src/sys/sys/param.h 1.24 +3 -1 src/sys/sys/syslimits.h 1.60 +9 -3 src/sys/sys/ucred.h 1.82 +3 -3 src/sys/sys/user.h 1.316 +2 -0 src/sys/ufs/ufs/ufs_vnops.c 1.12 +1 -0 src/usr.sbin/mount_portalfs/portald.h 1.103 +4 -4 src/usr.sbin/mountd/mountd.c