1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/lib/registry
Andreas Schneider 783eff3f76 s4:lib: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14 21:45:29 +00:00
..
man
tests s4:lib: Fix code spelling 2023-08-14 21:45:29 +00:00
tools lib:registry: drop unused argument of reg_open_remote() 2023-04-06 16:46:03 +00:00
Doxyfile
hive.c
interface.c lib/util: remove extra safe_string.h file 2020-08-28 02:18:40 +00:00
ldb.c CVE-2022-32746 s4/registry: Use LDB_FLAG_MOD_TYPE() for flags equality check 2022-07-27 10:52:36 +00:00
local.c
patchfile_dotreg.c
patchfile_preg.c lib/util: remove extra safe_string.h file 2020-08-28 02:18:40 +00:00
patchfile.c
pyregistry.c Fix clang 9 missing-field-initializer warnings 2020-05-08 09:31:31 +00:00
README
regf.c s4:lib: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
regf.idl
registry.h lib:registry: drop unused argument of reg_open_remote() 2023-04-06 16:46:03 +00:00
rpc.c lib:registry: drop unused argument of reg_open_remote() 2023-04-06 16:46:03 +00:00
samba.c
TODO
util.c
wine.c
wscript_build s4:registry: Migrate regpatch to new cmdline option parser 2021-06-20 23:26:32 +00: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