-/*
- * ldap_negotiated_sasl_bind_s - bind to the ldap server (and X.500)
- * using SASL authentication.
- *
- * This routine attempts to authenticate the user referred by the
- * authentication id using the provided password. An optional
- * authorization identity may be provided. An DN is generally not
- * provided [see AuthMethod].
- *
- * If the mechanism negotiated does not require a password, the
- * passwd field is ignored. [A callback mechanism should really
- * be used].
- *
- * LDAP_SUCCESS is returned upon success, the ldap error code
- * otherwise.
- *
- * Examples:
- * ldap_negotiated_sasl_bind_s( ld, NULL,
- * "user@OPENLDAP.ORG", NULL, NULL,
- * "GSSAPI", NULL, NULL, NULL );
- *
- * ldap_negotiated_sasl_bind_s( ld, NULL,
- * "manager", "cn=user,dc=openldap,dc=org", NULL,
- * "DIGEST-MD5", NULL, NULL, NULL );
- *
- * ldap_negotiated_sasl_bind_s( ld, NULL,
- * "root@OPENLDAP.ORG", "u:user@OPENLDAP.ORG", NULL,
- * "GSSAPI", NULL, NULL, NULL );
- *
- * ldap_negotiated_sasl_bind_s( ld, NULL,
- * "manager", "dn:cn=user,dc=openldap,dc=org", NULL,
- * "DIGEST-MD5", NULL, NULL, NULL );
- */
-int
-ldap_negotiated_sasl_bind_s(
- LDAP *ld,
- LDAP_CONST char *dn, /* usually NULL */
- LDAP_CONST char *authenticationId,
- LDAP_CONST char *authorizationId, /* commonly NULL */
- LDAP_CONST char *saslMechanism,
- struct berval *passPhrase,
- LDAPControl **serverControls,
- LDAPControl **clientControls)
+Sockbuf_IO ldap_pvt_sockbuf_io_sasl_generic = {
+ sb_sasl_generic_setup, /* sbi_setup */
+ sb_sasl_generic_remove, /* sbi_remove */
+ sb_sasl_generic_ctrl, /* sbi_ctrl */
+ sb_sasl_generic_read, /* sbi_read */
+ sb_sasl_generic_write, /* sbi_write */
+ NULL /* sbi_close */
+};
+
+int ldap_pvt_sasl_generic_install(
+ Sockbuf *sb,
+ struct sb_sasl_generic_install *install_arg )