1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

python: Use relative paths for registry.

(This used to be commit 079200b824de6dd8c7de3e5b76ed1805fde02965)
This commit is contained in:
Jelmer Vernooij 2008-01-26 04:22:42 +01:00
parent 172e00d8a1
commit cab677a33f

View File

@ -203,7 +203,13 @@ def provision_paths_from_lp(lp, dnsdomain, private_dir=None):
paths.s4_ldapi_path = os.path.join(private_dir, "ldapi")
paths.phpldapadminconfig = os.path.join(private_dir,
"phpldapadmin-config.php")
paths.hklm = os.path.join(private_dir, "hklm.ldb")
paths.hklm = "hklm.ldb"
paths.hkcr = "hkcr.ldb"
paths.hkcu = "hkcu.ldb"
paths.hku = "hku.ldb"
paths.hkpd = "hkpd.ldb"
paths.hkpt = "hkpt.ldb"
paths.sysvol = lp.get("sysvol", "path")
if paths.sysvol is None:
paths.sysvol = os.path.join(lp.get("lock dir"), "sysvol")
@ -442,6 +448,7 @@ def setup_registry(path, setup_path, session_info, credentials, lp):
:param lp: Loadparm context
"""
reg = registry.Registry()
print path
hive = registry.open_ldb(path, session_info=session_info,
credentials=credentials, lp_ctx=lp)
reg.mount_hive(hive, "HKEY_LOCAL_MACHINE")