Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26089/ldapserver/ldap/servers/slapd
Modified Files:
backend_manager.c mapping_tree.c
Log Message:
Resolves: bug 232377
Bug Description: PAM passthru ENTRY method not working
Reviewed by: prowley (Thanks!)
Fix Description: There are several problems.
1) For the ENTRY method to perform the internal search to get the entry for the bind DN,
it must have a component ID (aka plugin identity). The code was already there to get/set
it, but it was never initialized in the init function.
2) You cannot mix slapi_sdn_new* with slapi_sdn_init* - slapi_sdn_init will erase the
knowledge that the Slapi_DN was allocated with malloc and it will not free it in
slapi_sdn_free().
3) People may assume they can specify a subtree (e.g. ou=people,dc=example,dc=com) instead
of a suffix for the list of included/excluded suffixes. The error message will not print
a list of valid suffixes for the admin to use.
4) slapi_be_exist was failing because the database does not notify the mapping tree code
that the backend is started during startup. This works fine under normal conditions
because most all of the code in mapping_tree.c will lookup the backend if the mtn_be
pointer in the mapping tree node is NULL. However, slapi_be_exist and slapi_be_select do
not do this. The proper solution is to call slapi_mtn_be_started() at database startup
time. This is the same thing that happens when a backend is added at runtime.
Platforms tested: FC6
Flag Day: no
Doc impact: no
Index: backend_manager.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/backend_manager.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- backend_manager.c 10 Nov 2006 23:45:40 -0000 1.7
+++ backend_manager.c 15 Mar 2007 18:21:37 -0000 1.8
@@ -80,6 +80,10 @@
backends[i] = be;
nbackends++;
+
+ slapi_log_error(SLAPI_LOG_TRACE, "slapi_be_new",
+ "Added new backend name [%s] type [%s] nbackends [%d]\n",
+ name, type, nbackends);
return( be );
}
Index: mapping_tree.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mapping_tree.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mapping_tree.c 14 Dec 2006 23:16:54 -0000 1.8
+++ mapping_tree.c 15 Mar 2007 18:21:37 -0000 1.9
@@ -324,6 +324,12 @@
node->mtn_dstr_plg_name = plg_fct;
node->mtn_dstr_plg = plg;
+ slapi_log_error(SLAPI_LOG_TRACE, "mapping_tree",
+ "Created new mapping tree node for suffix [%s] backend [%s]
[%p]\n",
+ slapi_sdn_get_dn(dn),
+ backend_names && backend_names[0] ? backend_names[0] :
"null",
+ be ? be[0] : NULL);
+
return node;
}
Show replies by date