1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/lib/registry
Volker Lendecke 55b0a16e9b registry: Fix Coverity ID 1034918 Wrong sizeof argument
sizeof(data_val) is the size of the pointer. This might well be 8 bytes
where the string is only 4 bytes long

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
..
man docs: man regtree: Add missing meta data. 2012-11-29 13:42:09 +01:00
tests registry: Fix Coverity ID 1034918 Wrong sizeof argument 2013-11-11 21:04:08 +01:00
tools s4-registry: Don't leak memory on error. 2013-02-22 16:36:14 +01:00
Doxyfile
hive.c s4-registry: Don't leak file descriptor. 2013-02-22 16:36:14 +01: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-regsitry: Check return value of ldb_msg_add_empty(). 2012-12-21 13:55:59 +01:00
local.c registry4: Fix CID 1034911 Dereference before null check 2013-08-19 11:15:20 +12:00
patchfile_dotreg.c Ensure convert_string_XXX is always called with a valid converted_size pointer. 2011-03-29 21:01:49 +02:00
patchfile_preg.c
patchfile.c
pyregistry.c s4:pyregistry: make use of samba_tevent_context_init() 2013-02-28 12:07:31 +01:00
README
regf.c s4-libregistry: Improve NULL handling of name. 2013-03-05 23:30:11 +01:00
regf.idl Fix regf.idl, subkey and rootkey types were switched. 2010-09-19 12:34:55 -07:00
registry.h s4:registry: add a TALLOC_CTX argument to reg_open_remote() 2012-07-13 00:57:19 +02:00
registry.pc.in s4-pkgconfig: add @LIB_RPATH@ to our link flags 2010-12-08 12:46:00 +01:00
rpc.c s4:registry: add a TALLOC_CTX argument to reg_open_remote() 2012-07-13 00:57:19 +02:00
samba.c s4-loadparm: 2nd half of lp_ to lpcfg_ conversion 2010-07-16 18:24:27 +10:00
TODO
util.c Ensure convert_string_XXX is always called with a valid converted_size pointer. 2011-03-29 21:01:49 +02:00
wine.c
wscript_build Remove the 'dir' registry backend. 2011-12-29 16:45:23 +01: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