version 1.64, 2006/02/14 22:18:12
|
version 1.64.2.4, 2008/02/11 23:26:41
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.63 2006/01/03 22:12:09 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.64.2.3 2008/02/08 20:51:42 quanah Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2006 The OpenLDAP Foundation. |
* Copyright 1998-2008 The OpenLDAP Foundation. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
Line 12
|
Line 12
|
* top-level directory of the distribution or, alternatively, at |
* top-level directory of the distribution or, alternatively, at |
* <http://www.OpenLDAP.org/license.html>. |
* <http://www.OpenLDAP.org/license.html>. |
*/ |
*/ |
/* Portions Copyright (C) The Internet Society (1997) |
|
* ASN.1 fragments are from RFC 2251; see RFC for full legal notices. |
|
*/ |
|
|
|
/* |
/* |
* BindRequest ::= SEQUENCE { |
* BindRequest ::= SEQUENCE { |
Line 22
|
Line 19
|
* name DistinguishedName, -- who |
* name DistinguishedName, -- who |
* authentication CHOICE { |
* authentication CHOICE { |
* simple [0] OCTET STRING -- passwd |
* simple [0] OCTET STRING -- passwd |
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND |
* krbv42ldap [1] OCTET STRING -- OBSOLETE |
* krbv42ldap [1] OCTET STRING |
* krbv42dsa [2] OCTET STRING -- OBSOLETE |
* krbv42dsa [2] OCTET STRING |
|
#endif |
|
* sasl [3] SaslCredentials -- LDAPv3 |
* sasl [3] SaslCredentials -- LDAPv3 |
* } |
* } |
* } |
* } |
Line 196 ldap_sasl_bind_s(
|
Line 191 ldap_sasl_bind_s(
|
} |
} |
#endif |
#endif |
|
|
if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 ) { |
if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) { |
return( ld->ld_errno ); /* ldap_result sets ld_errno */ |
return( ld->ld_errno ); /* ldap_result sets ld_errno */ |
} |
} |
|
|
Line 206 ldap_sasl_bind_s(
|
Line 201 ldap_sasl_bind_s(
|
rc = ldap_parse_sasl_bind_result( ld, result, &scredp, 0 ); |
rc = ldap_parse_sasl_bind_result( ld, result, &scredp, 0 ); |
} |
} |
|
|
if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) { |
if ( rc != LDAP_SUCCESS ) { |
ldap_msgfree( result ); |
ldap_msgfree( result ); |
return( rc ); |
return( rc ); |
} |
} |
Line 352 ldap_parse_sasl_bind_result(
|
Line 347 ldap_parse_sasl_bind_result(
|
ldap_msgfree( res ); |
ldap_msgfree( res ); |
} |
} |
|
|
return( ld->ld_errno ); |
return( LDAP_SUCCESS ); |
} |
} |
|
|
int |
int |