summaryrefslogtreecommitdiff
path: root/source4/lib/registry/samba.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/samba.c')
-rw-r--r--source4/lib/registry/samba.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/source4/lib/registry/samba.c b/source4/lib/registry/samba.c
index 18bbcb8299..2397432f0b 100644
--- a/source4/lib/registry/samba.c
+++ b/source4/lib/registry/samba.c
@@ -1,4 +1,4 @@
-/*
+/*
Unix SMB/CIFS implementation.
Copyright (C) Jelmer Vernooij 2004-2007.
@@ -25,23 +25,25 @@
* @brief Samba-specific registry functions
*/
-static WERROR mount_samba_hive(struct registry_context *ctx,
+static WERROR mount_samba_hive(struct registry_context *ctx,
struct auth_session_info *auth_info,
struct cli_credentials *creds,
- const char *name,
+ const char *name,
uint32_t hive_id)
{
WERROR error;
struct hive_key *hive;
const char *location;
- location = talloc_asprintf(ctx, "%s/%s.ldb", lp_private_dir(global_loadparm), name);
-
+ location = talloc_asprintf(ctx, "%s/%s.ldb",
+ lp_private_dir(global_loadparm),
+ name);
error = reg_open_hive(ctx, location, auth_info, creds, &hive);
if (W_ERROR_EQUAL(error, WERR_NOT_FOUND))
- error = reg_open_ldb_file(ctx, location, auth_info, creds, &hive);
+ error = reg_open_ldb_file(ctx, location, auth_info,
+ creds, &hive);
if (!W_ERROR_IS_OK(error))
return error;
@@ -50,10 +52,10 @@ static WERROR mount_samba_hive(struct registry_context *ctx,
}
-_PUBLIC_ WERROR reg_open_samba (TALLOC_CTX *mem_ctx,
- struct registry_context **ctx,
- struct auth_session_info *session_info,
- struct cli_credentials *credentials)
+_PUBLIC_ WERROR reg_open_samba(TALLOC_CTX *mem_ctx,
+ struct registry_context **ctx,
+ struct auth_session_info *session_info,
+ struct cli_credentials *credentials)
{
WERROR result;
@@ -62,19 +64,19 @@ _PUBLIC_ WERROR reg_open_samba (TALLOC_CTX *mem_ctx,
return result;
}
- mount_samba_hive(*ctx, session_info, credentials,
- "hklm", HKEY_LOCAL_MACHINE);
+ mount_samba_hive(*ctx, session_info, credentials,
+ "hklm", HKEY_LOCAL_MACHINE);
- mount_samba_hive(*ctx, session_info, credentials,
- "hkcr", HKEY_CLASSES_ROOT);
+ mount_samba_hive(*ctx, session_info, credentials,
+ "hkcr", HKEY_CLASSES_ROOT);
- /* FIXME: Should be mounted from NTUSER.DAT in the home directory of the
+ /* FIXME: Should be mounted from NTUSER.DAT in the home directory of the
* current user */
- mount_samba_hive(*ctx, session_info, credentials,
- "hkcu", HKEY_CURRENT_USER);
+ mount_samba_hive(*ctx, session_info, credentials,
+ "hkcu", HKEY_CURRENT_USER);
- mount_samba_hive(*ctx, session_info, credentials,
- "hku", HKEY_USERS);
+ mount_samba_hive(*ctx, session_info, credentials,
+ "hku", HKEY_USERS);
/* FIXME: Different hive backend for HKEY_CLASSES_ROOT: merged view of HKEY_LOCAL_MACHINE\Software\Classes
* and HKEY_CURRENT_USER\Software\Classes */
@@ -86,6 +88,6 @@ _PUBLIC_ WERROR reg_open_samba (TALLOC_CTX *mem_ctx,
/* FIXME: HKEY_LOCAL_MACHINE\Hardware is autogenerated */
/* FIXME: HKEY_LOCAL_MACHINE\Security\SAM is an alias for HKEY_LOCAL_MACHINE\SAM */
-
+
return WERR_OK;
}