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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/registry/samba.c b/source4/lib/registry/samba.c
index 244c467a2c..6aaaa118d0 100644
--- a/source4/lib/registry/samba.c
+++ b/source4/lib/registry/samba.c
@@ -36,7 +36,12 @@ WERROR mount_samba_hive(struct registry_context *ctx,
location = talloc_asprintf(ctx, "%s/%s.ldb", lp_private_dir(), 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);
+
if (!W_ERROR_IS_OK(error))
return error;