svn commit: samba r9209 - in branches/SAMBA_4_0/source/lib/registry: .

tridge at samba.org tridge at samba.org
Mon Aug 8 03:19:28 GMT 2005


Author: tridge
Date: 2005-08-08 03:19:28 +0000 (Mon, 08 Aug 2005)
New Revision: 9209

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9209

Log:
- fixed the ldb registry backend to work with the new provision ldif

- default to ldb backend if none specified









Modified:
   branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c
   branches/SAMBA_4_0/source/lib/registry/reg_samba.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c	2005-08-08 02:42:35 UTC (rev 9208)
+++ branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c	2005-08-08 03:19:28 UTC (rev 9209)
@@ -250,7 +250,7 @@
 	talloc_set_destructor (hive, ldb_free_hive);
 	(*k)->name = talloc_strdup(*k, "");
 	(*k)->backend_data = kd = talloc_zero(*k, struct ldb_key_data);
-	kd->dn = talloc_strdup(*k, "hive=");
+	kd->dn = talloc_strdup(*k, "hive=NONE");
 	
 
 	return WERR_OK;

Modified: branches/SAMBA_4_0/source/lib/registry/reg_samba.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/reg_samba.c	2005-08-08 02:42:35 UTC (rev 9208)
+++ branches/SAMBA_4_0/source/lib/registry/reg_samba.c	2005-08-08 03:19:28 UTC (rev 9209)
@@ -27,7 +27,8 @@
 {
 	WERROR error;
 	const char *conf;
-	char *backend, *location;
+	char *backend;
+	const char *location;
 	const char *hivename = reg_get_predef_name(hkey);
 
 	*k = NULL;
@@ -38,12 +39,13 @@
 		return WERR_NOT_SUPPORTED;
 	}
 
-	backend = talloc_strdup(NULL, conf);
-	location = strchr(backend, ':');
-
+	location = strchr(conf, ':');
 	if (location) {
-		*location = '\0';
+		backend = talloc_strndup(ctx, conf, (int)(location - conf));
 		location++;
+	} else {
+		backend = talloc_strdup(ctx, "ldb");
+		location = conf;
 	}
 
 	/* FIXME: Different hive backend for HKEY_CLASSES_ROOT: merged view of HKEY_LOCAL_MACHINE\Software\Classes



More information about the samba-cvs mailing list