]> git.sur5r.net Git - openldap/commitdiff
Remove extended op callback function... doesn't provide necessary locking
authorKurt Zeilenga <kurt@openldap.org>
Sat, 26 Aug 2000 02:13:52 +0000 (02:13 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 26 Aug 2000 02:13:52 +0000 (02:13 +0000)
servers/slapd/extended.c
servers/slapd/passwd.c
servers/slapd/proto-slap.h
servers/slapd/starttls.c

index 23923fc82686eae077bb650af27b04be13c5855d..1660aaa914026bc8d4a0a7485c619606877c1476 100644 (file)
@@ -61,10 +61,6 @@ struct {
 
 static extop_list_t *find_extop( extop_list_t *list, char *oid );
 
-static int extop_callback(
-       Connection *conn, Operation *op,
-       int msg, int arg, void *argp);
-
 char *
 get_supported_extop (int index)
 {
@@ -152,7 +148,7 @@ do_extended(
        text = NULL;
        refs = NULL;
 
-       rc = (ext->ext_main)( extop_callback, conn, op,
+       rc = (ext->ext_main)( conn, op,
                reqoid, reqdata,
                &rspoid, &rspdata, &rspctrls, &text, &refs );
 
@@ -247,46 +243,4 @@ find_extop( extop_list_t *list, char *oid )
                        return(ext);
        }
        return(NULL);
-}
-
-int
-extop_callback(
-       Connection *conn, Operation *op,
-       int msg, int arg, void *argp)
-{
-       if (argp == NULL)
-               return(-1);
-
-       switch (msg) {
-       case SLAPD_EXTOP_GETVERSION:
-               *(int *)argp = 1;
-               return(0);
-
-       case SLAPD_EXTOP_GETPROTO:
-               *(int *)argp = op->o_protocol;
-               return(0);
-       
-       case SLAPD_EXTOP_GETAUTH:
-               *(int *)argp = op->o_authtype;
-               return(0);
-       
-       case SLAPD_EXTOP_GETDN:
-               *(char **)argp = op->o_dn;
-               return(0);
-       
-       case SLAPD_EXTOP_GETCLIENT:
-               if (conn->c_peer_domain != NULL && *conn->c_peer_domain != 0) {
-                       *(char **)argp = conn->c_peer_domain;
-                       return(0);
-               }
-               if (conn->c_peer_name != NULL && *conn->c_peer_name != 0) {
-                       *(char **)argp = conn->c_peer_name;
-                       return(0);
-               }
-               break;
-       
-       default:
-               break;
-       }
-       return(-1);
-}
+}
\ No newline at end of file
index db240991da2707654cd0658ffc01331b6ebc487c..7580f7c6619b2fee460d7125671d3c7f3a7dd463 100644 (file)
@@ -19,7 +19,6 @@
 #include <lutil.h>
 
 int passwd_extop(
-       SLAP_EXTOP_CALLBACK_FN ext_callback,
        Connection *conn, Operation *op,
        const char *reqoid,
        struct berval *reqdata,
index 8ae6be8c8535f7dcdbb166a04acbec4852e719bb..e54ed9aa56c4036f99f8509d0dcb48140d6ba12e 100644 (file)
@@ -321,18 +321,7 @@ LDAP_SLAPD_F (int) entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
  * extended.c
  */
 
-#define SLAPD_EXTOP_GETVERSION 0
-#define SLAPD_EXTOP_GETPROTO 1
-#define SLAPD_EXTOP_GETAUTH 2
-#define SLAPD_EXTOP_GETDN 3
-#define SLAPD_EXTOP_GETCLIENT 4
-
-typedef int (*SLAP_EXTOP_CALLBACK_FN) LDAP_P((
-       Connection *conn, Operation *op,
-       int msg, int arg, void *argp ));
-
 typedef int (*SLAP_EXTOP_MAIN_FN) LDAP_P((
-       SLAP_EXTOP_CALLBACK_FN,
        Connection *conn, Operation *op,
        const char * reqoid,
        struct berval * reqdata,
@@ -667,7 +656,6 @@ LDAP_SLAPD_F (int) dscompare LDAP_P(( const char *s1, const char *s2del, char de
  */
 
 LDAP_SLAPD_F (int) starttls_extop LDAP_P((
-       SLAP_EXTOP_CALLBACK_FN,
        Connection *conn, Operation *op,
        const char * reqoid,
        struct berval * reqdata,
@@ -723,7 +711,6 @@ LDAP_SLAPD_F (void) slap_init_user LDAP_P(( char *username, char *groupname ));
  * passwd.c
  */
 LDAP_SLAPD_F (int) passwd_extop LDAP_P((
-       SLAP_EXTOP_CALLBACK_FN,
        Connection *conn, Operation *op,
        const char * reqoid,
        struct berval * reqdata,
index b607c68ef70431606d2edd6f1473a2f4f25b8576..f59f15adb41969e903cfe149a3fbaadf4d2558d8 100644 (file)
@@ -20,7 +20,6 @@
 
 int
 starttls_extop (
-       SLAP_EXTOP_CALLBACK_FN cb,
        Connection *conn,
        Operation *op,
        const char * reqoid,