From: Lars Braeuer (lbraeuer_at_mpex.net)
Date: Mon 29 Mar 2004 - 12:58:57 BST
Herbert Poetzl wrote:
>>What would be the right formula for reassembling the id's for vs1.27 +
> currently the best format would probably be UID24/GID24
> #define XIDINO_UID(uid, xid) (((uid) & 0xFFFFFF) | (((xid) & 0xFF00) << 16))
> #define XIDINO_GID(gid, xid) (((gid) & 0xFFFFFF) | (((xid) & 0x00FF) << 24))
> which basically means that the upper 8 bit of (16 bit) xid
> go into the upper 8 bit of the (32 bit) uid, and the lower
> 8 bit of the xid, into the upper 8 bit of the (32 bit) gid
> but probably simpler would be the transition to UID32/GID16
> because in this setup, you only have to mask the 'old' uid
> to 16 bit, and leave the gid untouched ...
You mean the uid will remain untouched, since the xid goes into the upper 16 bit of the gid, correct
or am I making a mistake here?
Well if UID24/GID24 is the recommended format, then converting both values (uid/gid) should be as
easy as converting a single one (gid), I hope. ;)
Thanks for your help.
Vserver mailing list