Command line REGEDIT for any platform

Luke Kenneth Casson Leighton lkcl at samba.org
Fri Jan 28 22:26:53 GMT 2000


> nico's "dosreg" code??? Tell me more!

cvs co dosreg (see http:://samba.org/cvs.html) instead of cvs co samba

> > does it do security descriptors as well?
> 
> Yes and no. Security descripters are kept at the head of the hive in a
> doubly linked list. I haven't taken the time to look at their contents yet
> but I can reassign all of the default or any created security descriptors
> to any keys.

see samba/source/rpc_parse/parse_sec.c for a way to marshall / unmarshall
security descriptors.  see rpc_parse/parse_creds.c create_user_creds() for
a way (it's 4 lines of code :-) :-) to "flatten" a data structure into a
memory buffer.  yes, it's really that simple, and so is the reverse
process.

then you have a system to manipulate security descriptors, too.

i suggest that you take a look at the hive SDs and check that they have a
uint32 length, sizeis(length) char* sd format.  if they do, we're in
business.


> 
> > if so, your code could be used to write a registry implementation.
> 
> I plan on writing a command line REGEDIT.EXE equivalent for any POSIX
> environment. (NT included ;) This will also be able to fix and optimize
> trashed or bloated registries. (Think roaming profiles.)

nico's already done this in dosreg.cpp, it compiles under dos.

> I will be releasing the source on SourceForge and FreshMeat in the next
> week or so. You can download it from there at that time.

kkkkkexcellent!

you know, if you implement it as conforming to the registry API in the
MSDN, i'm going to love you forever.  you want to know why?  because i
will be able to just LITERALLY plug it straight in to the samba source
tree without any modifcations, or at worst, some trivial sed-script based
ones.



More information about the samba-ntdom mailing list