Date: Thu, 06 Dec 2001 06:56:28 +0000 From: Dima Dorfman <dima@trit.org> To: arch@freebsd.org Subject: MFC'ing xucred definition Message-ID: <20011206065633.9E9953E4B@bazooka.trit.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011206065633.9E9953E4B>