s4:ldb Allow a module string of ""
authorAndrew Bartlett <abartlet@samba.org>
Fri, 9 Oct 2009 22:12:54 +0000 (09:12 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 12 Oct 2009 05:51:02 +0000 (16:51 +1100)
(We may have no modules set)

Andrew Bartlett

source4/lib/ldb/common/ldb_modules.c

index ea29a09a2ab6703b99010f62c2a94f51105d7112..135ed8c05f1f15da81d5df9396af434491b16c75 100644 (file)
@@ -96,6 +96,12 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m
        }
        talloc_steal(modules, modstr);
 
+       if (modstr[0] == '\0') {
+               modules[0] = NULL;
+               m = (const char **)modules;
+               return m;
+       }
+
        i = 0;
        /* The str*r*chr walks backwards:  This is how we get the inverse order mentioned above */
        while ((p = strrchr(modstr, ',')) != NULL) {