This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setregid() and setreuid() implementation proposal


On Wed, Jan 22, 2003 at 09:56:45AM -0500, Pierre A. Humblet wrote:
> Corinna Vinschen wrote:
> >
> > > But it's not *that* simple:
> > >
> > > - sec_acl.cc is still using __aclent16_t instead of __aclent32_t.
> 
> Those two structures have the same size and the same field offsets.

Really?  I missed that fact.

> Would you thumb your nose at a conversion of the style
> 
> whatever 
> aclXXX( __aclent16_t * acl)
> {
>   __aclent32_t * acl32 = acl;
>   acl32->a_id &= 0x0000FFFF;
>   return (whatever) aclXXX32(acl32);
> }
> or would you insist on alloc and copying of everything
> before and after calling the aclXXX32 function?

If the structs are same size, that's fine with me.  We just would
have to rename all external aclXXX functions to aclXXX32 and create
new aclXXX functions calling the corresponding aclXXX32 function with
converted struct.  I'm happy with this.

> > Ooops!  Another really *really* big problem:  struct stat is using
> > uids and gids as well.  Using 32 bit ids with 32 bit offset stuff
> > would require to introduce a new struct __stat32_2 plus access
> > functions.  We would have to support three variations of struct
> > stat then :-(((
> 
> :-(((

I already begged on knees that somebody would take a look into the
changes needed to newlib but...

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]