1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/source4/lib/registry
Andrew Bartlett 5c1867ba45 py3: Remove #define PyInt_FromLong PyLong_FromLong
This allows us to end the use of Python 2/3 compatability macros.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power
2020-03-23 19:12:43 +00:00
..
man docs: remove duplicate arguments listing in regdiff manpage. 2013-11-19 09:52:39 +01:00
tests werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/lib/registry/ 2016-09-28 00:04:23 +02:00
tools s4:registry: Fix size type and loop 2018-04-03 20:20:10 +02:00
Doxyfile
hive.c werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/lib/registry/ 2016-09-28 00:04:17 +02:00
interface.c werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/lib/registry/ 2016-09-28 00:04:23 +02:00
ldb.c source4: Update all consumers of strtoul_err(), strtoull_err() to new API 2019-06-30 11:32:18 +00:00
local.c werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in source4/lib/registry/ 2016-09-28 00:04:23 +02:00
patchfile_dotreg.c werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source4/lib/registry/ 2016-09-28 00:04:21 +02:00
patchfile_preg.c registry: Free memory at the end of each loop run to prevent mem leak 2019-08-08 06:44:12 +00:00
patchfile.c werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source4/lib/registry/ 2016-09-28 00:04:21 +02:00
pyregistry.c py3: Remove #define PyInt_FromLong PyLong_FromLong 2020-03-23 19:12:43 +00:00
README
regf.c lib/registry/regf: better initialise nk_block 2016-11-30 20:36:24 +01:00
regf.idl
registry.h
rpc.c lib: Fix CID 1373388 Uninitialized scalar variable 2016-09-28 15:19:21 +02:00
samba.c werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/lib/registry/ 2016-09-28 00:04:17 +02:00
TODO
util.c
wine.c
wscript_build build: Remove bld.gen_python_environments() 2019-03-21 04:06:14 +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