Remove extended op callback function... doesn't provide necessary locking

This commit is contained in:
Kurt Zeilenga 2000-08-26 02:13:52 +00:00
parent 1c328aa9c7
commit 2d3e998c3c
4 changed files with 2 additions and 63 deletions

View 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);
}
}

View 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,

View 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,

View file

@ -20,7 +20,6 @@
int
starttls_extop (
SLAP_EXTOP_CALLBACK_FN cb,
Connection *conn,
Operation *op,
const char * reqoid,