summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-04-21 00:38:16 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-04-21 00:38:16 +0000
commitea67a9e0566bfa6659e5911dbdfa1054d4ee0c77 (patch)
tree43de4890a40c0f1ea7fa3737676e4c21ec4bb6e7
parent60801e810503a89ba1253e3e0b688a33f7465182 (diff)
downloadsamba-ea67a9e0566bfa6659e5911dbdfa1054d4ee0c77.tar.gz
samba-ea67a9e0566bfa6659e5911dbdfa1054d4ee0c77.tar.bz2
samba-ea67a9e0566bfa6659e5911dbdfa1054d4ee0c77.zip
Pdb modules are in $libdir/pdb not $libdir/passdb
(This used to be commit 9822af500cf36e83fce54e49a062a8847d1c5431)
-rw-r--r--source3/passdb/pdb_interface.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 8adcd9dbfa..9224e784e0 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -43,13 +43,9 @@ BOOL smb_register_passdb(const char *name, pdb_init_function init, int version)
DEBUG(5,("Attempting to register passdb backend %s\n", name));
- /* Check for duplicates */
- while(entry) {
- if(strcasecmp(name, entry->name) == 0) {
- DEBUG(0,("There already is a passdb backend registered with the name %s!\n", name));
- return False;
- }
- entry = entry->next;
+ if (pdb_find_backend_entry(name)) {
+ DEBUG(0,("There already is a passdb backend registered with the name %s!\n", name));
+ return False;
}
entry = smb_xmalloc(sizeof(struct pdb_init_function_entry));
@@ -64,12 +60,9 @@ BOOL smb_register_passdb(const char *name, pdb_init_function init, int version)
static struct pdb_init_function_entry *pdb_find_backend_entry(const char *name)
{
struct pdb_init_function_entry *entry = backends;
- pstring stripped;
-
- module_path_get_name(name, stripped);
while(entry) {
- if (strequal(entry->name, stripped)) return entry;
+ if (strcasecmp(entry->name, name) == 0) return entry;
entry = entry->next;
}
@@ -431,7 +424,7 @@ static NTSTATUS make_pdb_methods_name(struct pdb_methods **methods, struct pdb_c
/* Try to find a module that contains this module */
if (!entry) {
DEBUG(2,("No builtin backend found, trying to load plugin\n"));
- if(smb_probe_module("passdb", module_name) && !(entry = pdb_find_backend_entry(module_name))) {
+ if(smb_probe_module("pdb", module_name) && !(entry = pdb_find_backend_entry(module_name))) {
DEBUG(0,("Plugin is available, but doesn't register passdb backend %s\n", module_name));
SAFE_FREE(module_name);
return NT_STATUS_UNSUCCESSFUL;