1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
samba-mirror/source4/lib/registry
Wilco Baan Hofman 45bb24e939 Fix trailing garbage in the hbin block.
This specifically fixes a problem showing extra bytes of garbage in list and
print in regshell, even though the vk.data_length has the correct size.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
..
man r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have 2007-10-10 15:02:34 -05:00
tests s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
tools regshell: Add support for 'cd ..' and cd relative to the root. 2009-09-26 17:05:34 +02:00
config.mk python: Move helper functions for using param into a separate file rather 2009-06-02 18:05:40 +02:00
dir.c Use common util_file code. 2008-10-12 17:34:43 +02: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 s4:lib/tevent: rename structs 2008-12-29 20:46:40 +01:00
interface.c Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
ldb.c s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect() 2009-10-23 14:52:17 +11:00
local.c Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
patchfile_dotreg.c Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
patchfile_preg.c Add a new non-convenience version of push_codepoint. 2009-04-23 17:50:18 +02:00
patchfile.c source4/lib/registry/patchfile.c(reg_diff_load): fixed possible resource leak. 2009-07-19 16:01:12 +02:00
pyregistry.c s4-python: we need to include Python.h first 2009-10-23 16:23:01 +11: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 trailing garbage in the hbin block. 2009-11-15 19:26:50 +01:00
regf.idl r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have 2007-10-10 15:02:34 -05:00
registry.h s4:lib/tevent: rename structs 2008-12-29 20:46:40 +01:00
registry.pc.in Fix installation of dcerpc_atsvc and registry as required by samba-gtk. 2008-04-03 01:36:03 +02:00
rpc.c winreg: fix winreg_EnumValue callers. 2009-01-16 00:28:46 +01:00
samba.c s4:lib/tevent: rename structs 2008-12-29 20:46:40 +01:00
TODO r24717: Some more easy bool conversions, update TODO for registry 2007-10-10 15:02:55 -05:00
util.c lib/util Split data_blob_hex_string() into upper and lower 2009-11-12 16:34:01 +11:00
wine.c r25544: Cleanup some more indents in lib/registry. 2007-10-10 15:07:51 -05: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