/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
}
*modtail = NULL;
- rc = slap_mods_check( modlist, 0, &text, textbuf, textlen, NULL );
+ rc = slap_mods_check( modlist, &text, textbuf, textlen, NULL );
if ( rc == LDAP_SUCCESS ) {
- rc = slap_mods_opattrs( &op, modlist, modtail, &text, textbuf,
- textlen, 1 );
- }
-
- if ( rc == LDAP_SUCCESS ) {
- op.o_hdr = conn->c_sasl_bindop->o_hdr;
- op.o_tag = LDAP_REQ_MODIFY;
- op.o_ndn = op.o_req_ndn;
- op.o_callback = &cb;
- op.o_time = slap_get_time();
- op.o_do_not_cache = 1;
- op.o_is_auth_check = 1;
- op.o_req_dn = op.o_req_ndn;
- op.orm_modlist = modlist;
-
- rc = op.o_bd->be_modify( &op, &rs );
+ rc = slap_mods_no_update_check( modlist, &text,
+ textbuf, textlen );
+
+ if ( rc == LDAP_SUCCESS ) {
+ rc = slap_mods_opattrs( &op, modlist, modtail,
+ &text, textbuf, textlen, 1 );
+
+ if ( rc == LDAP_SUCCESS ) {
+ op.o_hdr = conn->c_sasl_bindop->o_hdr;
+ op.o_tag = LDAP_REQ_MODIFY;
+ op.o_ndn = op.o_req_ndn;
+ op.o_callback = &cb;
+ op.o_time = slap_get_time();
+ op.o_do_not_cache = 1;
+ op.o_is_auth_check = 1;
+ op.o_req_dn = op.o_req_ndn;
+ op.orm_modlist = modlist;
+
+ rc = op.o_bd->be_modify( &op, &rs );
+ }
+ }
}
slap_mods_free( modlist );
- return rc ? SASL_FAIL : SASL_OK;
+ return rc != LDAP_SUCCESS ? SASL_FAIL : SASL_OK;
}
#endif /* SASL_VERSION_FULL >= 2.1.16 */
irdn = 0;
DN[ irdn ] = RDNs[ irdn ];
RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
- BER_BVSTR( &AVAs[ irdn ].la_attr, "uid" );
+ AVAs[ irdn ].la_attr = slap_schema.si_ad_uid->ad_cname;
AVAs[ irdn ].la_value = *dn;
AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
AVAs[ irdn ].la_private = NULL;
irdn++;
DN[ irdn ] = RDNs[ irdn ];
RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
- BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+ AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
ber_str2bv( user_realm, 0, 0, &AVAs[ irdn ].la_value );
AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
AVAs[ irdn ].la_private = NULL;
irdn++;
DN[ irdn ] = RDNs[ irdn ];
RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
- BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+ AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
AVAs[ irdn ].la_value = *mech;
AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
AVAs[ irdn ].la_private = NULL;
irdn++;
DN[ irdn ] = RDNs[ irdn ];
RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
- BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+ AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
BER_BVSTR( &AVAs[ irdn ].la_value, "auth" );
AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
AVAs[ irdn ].la_private = NULL;