broken string_to_sid, sid_to_string

Jeremy Allison jallison at cthulhu.engr.sgi.com
Wed Nov 25 17:36:12 GMT 1998


Luke Kenneth Casson Leighton wrote:
> 
> On Wed, 25 Nov 1998, Luke Kenneth Casson Leighton wrote:
> 
> > jeremy,
> >
> > as the string_to_sid() functions are broken, there is an opportunity _now_
> > to fix them even more proplerly.
> >
> > these functions read the rid components in decimal, they should not: they
> > should read in hex.
> >
> > can we fix this?
> 

Well now I'm adding strtoul in lib/replace and have used it in
the fix I'm about to checkin the answer is yes.

> ... by reading from SAM.SID (and ignoring MACHINE.SID, or preferably
> deleting it) and generating SAM.SID rid components in hex, like they
> should be?
> 

The file SAM.SID does not exist (as far as I know - unless you've
invented a new file ?). The machine sid is stored in MACHINE.SID.

> the format for S-xxx is S-1-5-20-xxx-yyy-zzz NOT S-1-5-32-xxx-yyy-zzz, and
> this is really confusing and wrong.

Ok - but for backwards compatibility with existsing
files it needs to be coded as :

S-1-5-32  --- read as base 10.

S-1-5-0x20 --- read as base 16.

Happy ?

Jeremy.
-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-technical mailing list