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

Re: killing server with a bad request (ITS#1305)



Can you provide a stack backtrace from slapd crash as
well as relevant sections of its log?  Thanks.


At 02:14 AM 2001-09-03, jchassler@hexaflux.com wrote:
>Full_Name: Jean-Christian Hassler
>Version: 2.0.11
>OS: redhat linux 6.2
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (217.128.93.52)
>
>
>While I was programming a client for changing passwords using the Netscape
>SDK's, I generate a incorrect request which killed the server each time it was
>sent, so I believe it must be a bug. I give the code of the bad request and of
>the good one.
>I use SSL connection with server authentification only.
>Here's the code of the killing request :
>/* The connection is already open with a valid user, the handle is ld */
>   int rc,id;
>   BerElement *ber;
>   struct berval *bv = NULL;
>        ber = ber_alloc_t(0x01);
>        ber_printf( ber, "{" );
>        ber_printf( ber, "ts",LDAP_TAG_EXOP_X_MODIFY_PASSWD_NEW,                                        
>NewPassword);
>--->    ber_printf( ber, "N}" );
>        rc = ber_flatten( ber, &bv );
>        ber_free( ber, 1 );
>                rc = ldap_extended_operation( ld,
>                LDAP_EXOP_X_MODIFY_PASSWD, bv, 
>                NULL, NULL, &id );
>        ber_bvfree( bv );
>        if ( rc != LDAP_SUCCESS ) {
>                printf("Error\n");
>                } else {
>                printf("Succes\n");
>        }
>
>
>Here's the code of the correct request :
>/* The connection is already open with a valid user, the handle is ld */
>   int rc,id;
>   BerElement *ber;
>   struct berval *bv = NULL;
>        ber = ber_alloc_t(0x01);
>        ber_printf( ber, "{" );
>        ber_printf( ber, "ts",LDAP_TAG_EXOP_X_MODIFY_PASSWD_NEW,                                        
>NewPassword);
>--->    ber_printf( ber, "}" );
>        rc = ber_flatten( ber, &bv );
>        ber_free( ber, 1 );
>                rc = ldap_extended_operation( ld,
>                LDAP_EXOP_X_MODIFY_PASSWD, bv, 
>                NULL, NULL, &id );
>        ber_bvfree( bv );
>        if ( rc != LDAP_SUCCESS ) {
>                printf("Error\n");
>                } else {
>                printf("Succes\n");
>        }