]> git.sur5r.net Git - openldap/commitdiff
Confusingly, make SLAPI_OPERATION_AUTHTYPE return a pointer to
authorLuke Howard <lukeh@openldap.org>
Tue, 21 Jan 2003 09:50:59 +0000 (09:50 +0000)
committerLuke Howard <lukeh@openldap.org>
Tue, 21 Jan 2003 09:50:59 +0000 (09:50 +0000)
SLAPI_CONN_AUTHMETHOD. From my understanding of the Sun ONE API
this is the correct behaviour.

servers/slapd/slapi/slapi_pblock.c
servers/slapd/slapi/slapi_utils.c

index 4eaa4b5bcd0b3455b3cedcf42a3d91ab213d2187..204468dc272aa5bc5bfefdb41e3d4a330a026daf 100644 (file)
@@ -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 );
index 8f790d81c013ba44744c0fcddb3412190edcf07a..348afa39dec75e9475be2d26c4b6a8c94da5c23a 100644 (file)
@@ -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;