* kbind.c
*/
+/*
+ * BindRequest ::= SEQUENCE {
+ * version INTEGER,
+ * name DistinguishedName, -- who
+ * authentication CHOICE {
+ * simple [0] OCTET STRING -- passwd
+#ifdef HAVE_KERBEROS
+ * krbv42ldap [1] OCTET STRING
+ * krbv42dsa [2] OCTET STRING
+#endif
+ * sasl [3] SaslCredentials -- LDAPv3
+ * }
+ * }
+ *
+ * BindResponse ::= SEQUENCE {
+ * COMPONENTS OF LDAPResult,
+ * serverSaslCreds OCTET STRING OPTIONAL -- LDAPv3
+ * }
+ *
+ */
+
#include "portable.h"
#ifdef HAVE_KERBEROS
{
BerElement *ber;
char *cred;
- int rc, credlen;
+ int rc;
+ ber_len_t credlen;
#ifdef STR_TRANSLATION
int str_translation_on;
#endif /* STR_TRANSLATION */
- /*
- * The bind request looks like this:
- * BindRequest ::= SEQUENCE {
- * version INTEGER,
- * name DistinguishedName,
- * authentication CHOICE {
- * krbv42ldap [1] OCTET STRING
- * krbv42dsa [2] OCTET STRING
- * }
- * }
- * all wrapped up in an LDAPMessage sequence.
- */
-
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1\n", 0, 0, 0 );
if ( dn == NULL )
}
/* create a message to send */
- if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
+ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
LDAP_FREE( cred );
return( -1 );
}
{
BerElement *ber;
char *cred;
- int rc, credlen;
+ int rc;
+ ber_len_t credlen;
#ifdef STR_TRANSLATION
int str_translation_on;
#endif /* STR_TRANSLATION */
}
/* create a message to send */
- if ( (ber = ldap_alloc_ber_with_options( ld )) == NULLBER ) {
+ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
LDAP_FREE( cred );
return( -1 );
}
LDAP *ld,
LDAP_CONST char *who,
LDAP_CONST char *service,
- int *len )
+ ber_len_t *len )
{
KTEXT_ST ktxt;
int err;