[Date Prev][Date Next] [Chronological] [Thread] [Top]

Allow extended operation plugin to override default (ITS#2324)



Full_Name: Julius Enarusai
Version: HEAD
OS: RedHat Linux 8.1
URL: ftp://ftp.openldap.org/incoming/extended.diff
Submission from: (NULL) (129.42.208.182)


The current HEAD code (in extended.c)first calls the find_extop() function 
to determine if the specified extended operation is supported by slapd. If this
fails and LDAP_SLAPI is defined then it calls the getPluginFunc() function to
retrieve the user defined plugin. This design does not allow a user defined
plugin
to override the default implementation provided by slapd. The following patch
corrects this by checking for the user defined plugin first:

Index: ldap/servers/slapd/extended.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/extended.c,v
retrieving revision 1.47
diff -u -r1.47 extended.c
--- ldap/servers/slapd/extended.c       16 Feb 2003 05:15:28 -0000      1.47
+++ ldap/servers/slapd/extended.c       20 Feb 2003 16:31:43 -0000
@@ -157,14 +157,13 @@
                goto done;
        }

-       if( !(ext = find_extop(supp_ext_list, &reqoid))
 #ifdef LDAP_SLAPI
-               && !(funcAddr)
-#endif
-       ) {
-#ifdef LDAP_SLAPI
-               /* Netscape extended operation */
-               getPluginFunc( &reqoid, &funcAddr );
+       /* Netscape extended operation */
+       getPluginFunc( &reqoid, &funcAddr );
+
+       if( !(funcAddr) && !(ext = find_extop(supp_ext_list, &reqoid)) ) {
+#else
+       if( !(ext = find_extop(supp_ext_list, &reqoid)) ) {
 #endif

 #ifdef NEW_LOGGING