[OpenIndiana-discuss] Solaris privileges and seteuid()

Frank Lahm franklahm at gmail.com
Thu Aug 16 09:51:11 UTC 2012


Hi James,

2012/8/16 James Relph <james at themacplace.co.uk>:
>>   ...
>>     To prevent aliasing problems, all file systems, archive  and
>>     backup  formats,  and  protocols  must store SIDs or map all
>>     UIDs and GIDs in the 2^31 to 2^32 - 2 range  to  the  nobody
>>     user and group.
>>   ...
>>
>
> I guess my question from that after seeing what Gea has said is the "must store SIDs *or* map all UIDs", which makes me wonder if there's an easy way to store the SIDs that then lets you write the UIDs.  That's obviously what the CIFS client is doing, but it's whether there's an API to do that.

I haven't wrapped my head around what Gea tried to describe, so I
can't really comment on that but afaict it' wooly thinking (tm).

However, I think I was able to solve the problem described here (it
seems seteuid(0) is not enough if your effective gid is an ephemeral
one, after setegid(0) too the afpd process can call chown() at will),
which would mean the problem (at least for Netatalk) is solved: all
files and dirs created by Netatalk processes by an AD user have their
owen/and group set to uid and gid of the AD user, not nobody.

Cudos to Mohamed, going through the kernel stack comparing a failing
fchown and a successful one pointed me in the right direction.
Afaict it's a kernel bug.

-f



More information about the OpenIndiana-discuss mailing list