From 6f26183f204f95821740dd188ca90efa4fda6134 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 21 Jan 2003 09:50:59 +0000 Subject: [PATCH] Confusingly, make SLAPI_OPERATION_AUTHTYPE return a pointer to SLAPI_CONN_AUTHMETHOD. From my understanding of the Sun ONE API this is the correct behaviour. --- servers/slapd/slapi/slapi_pblock.c | 6 ------ servers/slapd/slapi/slapi_utils.c | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/servers/slapd/slapi/slapi_pblock.c b/servers/slapd/slapi/slapi_pblock.c index 4eaa4b5bcd..204468dc27 100644 --- a/servers/slapd/slapi/slapi_pblock.c +++ b/servers/slapd/slapi/slapi_pblock.c @@ -361,12 +361,6 @@ slapi_pblock_destroy( Slapi_PBlock* pb ) str = NULL; } - get( pb, SLAPI_OPERATION_AUTHTYPE, (void **)&str ); - if ( str != NULL ) { - ch_free( str ); - str = NULL; - } - get( pb, SLAPI_CONN_AUTHMETHOD, (void **)&str ); if ( str != NULL ) { ch_free( str ); diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 8f790d81c0..348afa39de 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1302,8 +1302,9 @@ int slapi_x_operation_set_pb( Slapi_PBlock *pb, Operation *op ) if ( rc != LDAP_SUCCESS ) return rc; - opAuthType = Authorization2AuthType( &op->o_authz, op->o_conn->c_is_tls, 1 ); - if (opAuthType != NULL) { + rc = slapi_pblock_get( pb, SLAPI_CONN_AUTHMETHOD, (void *)&opAuthType ); + if ( rc == LDAP_SUCCESS && opAuthType != NULL ) { + /* Not quite sure what the point of this is. */ rc = slapi_pblock_set( pb, SLAPI_OPERATION_AUTHTYPE, (void *)opAuthType ); if ( rc != LDAP_SUCCESS ) return rc; -- 2.39.5