Subject: Re: struct ucred changed.
To: Todd Vierling <email@example.com>
From: Alfred Perlstein <firstname.lastname@example.org>
Date: 11/29/2001 11:26:24
* Todd Vierling <email@example.com> [011129 11:12] wrote:
> On Thu, 29 Nov 2001, David Laight wrote:
> : Aren't uid_t and gid_t 32 bit?
> : If so you (probably) haven't changed the alignment!
> Depends on the system. For instance, m68k a.out compat aligns structs and
> 32-bit objects on a 16-bit boundary. (m68k ELF raises this to 32 bits,
> but m68k a.out compat is still afflicted.)
> : If the 'ucred' structure is zero'd on creation a little-endian
> : system won't see a difference.
> : But you will have changed the values seen on a big-endian system.
> ...the latter of which is quite important for cr_ngroups from userland.
One thing you might want to do is divorce the kernel ucred from the
userland ucred. We've done that in FreeBSD and it's allowed us to
add mutexes and hang other references off the kernel ucred without
having to go through such pain.
-Alfred Perlstein [firstname.lastname@example.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'