1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
samba-mirror/source4/lib/registry
Andrew Tridgell b4dd1accc8 s4-waf: don't depend directly on python modules
build rules should not list dependencies on python modules. Instead,
if code needs the module it should use the python API import calls to
access the module.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11:00
..
man Avoid use of Samba DTD, which requires net access. 2010-08-22 14:05:58 +02:00
tests s4-selftest: Move more tests to scripting/python, simplifies running of tests. 2010-09-21 22:54:38 -07:00
tools samba: share readline wrappers among all buildsystems. 2010-10-01 22:30:22 +02:00
config.mk s4: use shared registry functions. 2010-04-27 16:42:15 +02:00
dir.c s4:registry - "dir.c" - fix up dynamic memory allocation operations 2010-03-22 22:31:01 +01:00
Doxyfile r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have 2007-10-10 15:02:34 -05:00
hive.c Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
interface.c s4:registry - on key add operations we have to handle with paths not always only a name 2010-07-01 15:48:05 +02:00
ldb.c s4: fixed some printf format errors 2010-09-15 15:39:35 +10:00
local.c s4:registry - move some common constraint checks to the "local" backend 2010-07-01 15:48:06 +02:00
patchfile_dotreg.c registry: Make a two more functions static. 2010-10-04 13:52:09 +02:00
patchfile_preg.c Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
patchfile.c Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
pyregistry.c s4-param: Fix more memory leaks, invalid memory context. 2010-09-22 17:48:24 -07:00
README r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have 2007-10-10 15:02:34 -05:00
regf.c Fix issues addressed by Jelmer: 2010-10-03 15:31:38 +02:00
regf.idl Fix regf.idl, subkey and rootkey types were switched. 2010-09-19 12:34:55 -07:00
registry.h s4:registry - on key add operations we have to handle with paths not always only a name 2010-07-01 15:48:05 +02:00
registry.pc.in s4-build: use @PACKAGE_VERSION@ in s4 pc.in files 2010-08-09 12:27:23 +10:00
rpc.c s4:registry - on key add operations we have to handle with paths not always only a name 2010-07-01 15:48:05 +02:00
samba.c s4-loadparm: 2nd half of lp_ to lpcfg_ conversion 2010-07-16 18:24:27 +10:00
TODO r24717: Some more easy bool conversions, update TODO for registry 2007-10-10 15:02:55 -05:00
util.c s4:lib/registry/util.c - cosmetic - fix indentation, trailing whitespaces 2010-10-15 07:27:07 +00:00
wine.c r25544: Cleanup some more indents in lib/registry. 2007-10-10 15:07:51 -05:00
wscript_build s4-waf: don't depend directly on python modules 2010-10-21 19:03:26 +11:00

This is the registry library. The registry is basically a bunch of
hives, each of which is loaded from a file. When using a local registry, 
it is possible to specify where hives should be loaded from, etc. 

There are separate APIs for accessing the data in a hive and the 
data in the registry itself. Each supports different backends. 

The following "full registry" backends are currently provided:

 * Remote (over DCE/RPC)
 * Local (allows "mounting" hives)
 * Wine (uses the wine plain-text file)

The following hive backends are supported:

 - ldb 
 - regf (NTUSER.DAT-style files)
 - rpc (Remote individual hives)
 - directory

reg_open_samba() loads a set of hives based on smb.conf settings.
Lines in smb.conf should have the following syntax:

registry:<hivename> = <backend>:<location>

So an example usage could be:

registry:HKEY_CURRENT_USER = regf:NTUSER.DAT
registry:HKEY_LOCAL_MACHINE = ldb:tdb://registry.tdb

WERR_NOT_SUPPORTED will be returned for all hives that haven't been set.

On Windows the various registry hives are loaded from:

HKEY_CURRENT_CONFIG: %SystemRoot%\System32\Config\System
HKEY_CURRENT_USER: %Profile%\NTUser.dat
HKEY_LOCAL_MACHINE\SAM: %SystemRoot%\System32\Config\Sam
HKEY_LOCAL_MACHINE\Security: %SystemRoot%\System32\Config\Security
HKEY_LOCAL_MACHINE\Software: %SystemRoot%\System32\Config\Software
HKEY_LOCAL_MACHINE\System: %SystemRoot%\System32\Config\System
HKEY_USERS\.DEFAULT: %SystemRoot%\System32\Config\Default
HKEY_LOCAL_MACHINE\HARDWARE: is autogenerated