From owner-freebsd-arch Wed Dec 5 22:56:39 2001 Delivered-To: freebsd-arch@freebsd.org Received: from bazooka.trit.org (bazooka.trit.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 3015537B405 for ; Wed, 5 Dec 2001 22:56:37 -0800 (PST) Received: by bazooka.trit.org (Postfix, from userid 1000) id 9E9953E4B; Thu, 6 Dec 2001 06:56:33 +0000 (UTC) Received: from bazooka (localhost [127.0.0.1]) by bazooka.trit.org (Postfix) with ESMTP id 9D4853C13D for ; Thu, 6 Dec 2001 06:56:33 +0000 (UTC) To: arch@freebsd.org Subject: MFC'ing xucred definition Date: Thu, 06 Dec 2001 06:56:28 +0000 From: Dima Dorfman Message-Id: <20011206065633.9E9953E4B@bazooka.trit.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is there any reason the definition of struct xucred shouldn't be MFC'd? I'd like to MFC my LOCAL_PEERCRED/getpeereid() changes, and would prefer not to have to use the old ucred for a new interface. I'm not planning to merge the changes to existing interfaces to use xucred as was done in current (this would probably cause unnecessary pain in -stable), I just want to merge the definition. Here's the change I'm talking about. Any objections? Thanks. Index: ucred.h =================================================================== RCS file: /ref/cvsf/src/sys/sys/ucred.h,v retrieving revision 1.14.2.4 diff -u -r1.14.2.4 ucred.h --- ucred.h 2001/05/17 03:51:28 1.14.2.4 +++ ucred.h 2001/11/27 21:30:40 @@ -53,6 +53,19 @@ #define cr_gid cr_groups[0] #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ + +/* + * This is the external representation of struct ucred, based upon the + * size of a 4.2-RELEASE struct ucred. There will probably never be + * any need to change the size of this or layout of its used fields. + */ +struct xucred { + u_short _cr_unused0; /* compatibility with old ucred */ + uid_t cr_uid; /* effective user id */ + short cr_ngroups; /* number of groups */ + gid_t cr_groups[NGROUPS]; /* groups */ + void *_cr_unused1; /* compatibility with old ucred */ +}; #ifdef _KERNEL To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message