Lines Matching refs:op
51 Operation *op,
55 req_pwdexop_s *qpw = &op->oq_pwdexop;
56 req_extended_s qext = op->oq_extended;
69 if((op->o_conn->c_listener->sl_url.bv_len == strlen("ldapi://%2Fvar%2Frun%2Fldapi")) && (strncmp(op->o_conn->c_listener->sl_url.bv_val, "ldapi://%2Fvar%2Frun%2Fldapi", op->o_conn->c_listener->sl_url.bv_len) == 0)) {
74 assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 );
77 if( op->o_dn.bv_len == 0 ) {
79 op->o_log_prefix, 0, 0, 0, 0 );
92 rs->sr_err = slap_passwd_parse( op->ore_reqdata, &id,
101 op->o_log_prefix, id.bv_val,
106 op->o_log_prefix,
118 rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
125 op->o_req_dn = dn;
126 op->o_req_ndn = ndn;
127 op->o_bd = select_backend( &op->o_req_ndn, 1 );
130 ber_dupbv_x( &dn, &op->o_dn, op->o_tmpmemctx );
131 ber_dupbv_x( &ndn, &op->o_ndn, op->o_tmpmemctx );
132 op->o_req_dn = dn;
133 op->o_req_ndn = ndn;
134 ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
135 op->o_bd = op->o_conn->c_authz_backend;
136 ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
139 if( op->o_bd == NULL ) {
147 rc = slap_sasl_setpass( op, rs );
155 if ( op->o_req_ndn.bv_len == 0 ) {
162 op_be = op->o_bd;
163 if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
164 op->o_bd = select_backend( &op->o_req_ndn, 0 );
167 if (backend_check_restrictions( op, rs,
174 if ( backend_check_referrals( op, rs ) != LDAP_SUCCESS ) {
180 if(!( !SLAP_SINGLE_SHADOW( op->o_bd ) || be_isupdate( op ))) {
182 BerVarray defref = op->o_bd->be_update_refs
183 ? op->o_bd->be_update_refs : default_referral;
186 rs->sr_ref = referral_rewrite( op->o_bd->be_update_refs,
217 op->o_bd = op_be;
220 if ( op->o_bd->be_extended ) {
221 rs->sr_err = op->o_bd->be_extended( op, rs );
235 if( op->o_bd && !op->o_bd->be_modify ) {
245 rc = be_entry_get_rw( op, &op->o_req_ndn, NULL,
251 rc = slap_passwd_check( op, e, a, &qpw->rs_old, &rs->sr_text );
254 be_entry_release_r( op, e );
263 if( !isldapi && op->o_dn.bv_len == 0 ) {
265 char *recname = odusers_copy_recname(op);
269 op->o_conn->c_sasl_bindop = op;
270 rc = (DoPSAuth(recname, tmpoldpass, NULL, op->o_conn, op->o_req_dn.bv_val) == kAuthNoError) ? LDAP_SUCCESS : LDAP_INVALID_CREDENTIALS;
271 op->o_conn->c_sasl_bindop = NULL;
287 if(ber_bvstrcasecmp(&op->o_req_dn, &op->o_dn) == 0) {
330 slap_callback *sc = op->o_callback;
332 op->o_tag = LDAP_REQ_MODIFY;
333 op->o_callback = &cb;
334 op->orm_modlist = qpw->rs_mods;
335 op->orm_no_opattrs = 0;
340 rs->sr_err = op->o_bd->be_modify( op, rs );
343 qpw->rs_mods = op->orm_modlist;
352 op->o_tag = LDAP_REQ_EXTENDED;
353 op->o_callback = sc;
363 if(strnstr(op->o_req_dn.bv_val, "cn=computer", op->o_req_dn.bv_len) != NULL) {
373 if(op->o_dn.bv_len) {
374 policy = odusers_copy_effectiveuserpoldict(&op->o_conn->c_dn);
376 policy = odusers_copy_effectiveuserpoldict(&op->o_req_dn);
381 Debug(LDAP_DEBUG_ANY, "%s: Unable to retrieve policy for %s, failing password change for %s\n", __func__, op->o_conn->c_dn.bv_val, op->o_req_ndn.bv_val);
390 Debug(LDAP_DEBUG_ANY, "%s: User %s is disabled, denying password change for %s\n", __func__, op->o_conn->c_dn.bv_val, op->o_req_ndn.bv_val);
397 if( op->o_dn.bv_len && (ber_bvcmp(&op->o_req_ndn, &op->o_conn->c_dn) != 0) ) {
399 char *ownername = odusers_copy_owner(&op->o_req_ndn);
400 if(ownername && strncmp(ownername, op->o_conn->c_dn.bv_val, op->o_conn->c_dn.bv_len) == 0) {
403 Debug(LDAP_DEBUG_ANY, "%s: non-admin user %s denied attempt to change password for %s.\n", __func__, op->o_conn->c_dn.bv_val, op->o_req_ndn.bv_val);
420 Debug(LDAP_DEBUG_ANY, "%s: canModifyPasswordforSelf on %s denied attempt to change password for %s.\n", __func__, op->o_conn->c_dn.bv_val, op->o_req_ndn.bv_val);
427 Debug(LDAP_DEBUG_ANY, "%s: No canModifyPasswordforSelf policy found in user %s dictionary", __func__, op->o_req_ndn.bv_val, 0);
434 char *recname = odusers_copy_recname(op);
436 Debug(LDAP_DEBUG_ANY, "%s: Could not locate record name for %s\n", __func__, op->o_req_ndn.bv_val, 0);
444 Debug(LDAP_DEBUG_ANY, "%s: password quality check failed for %s\n", __func__, op->o_req_ndn.bv_val, 0);
452 if(odusers_check_history(&op->o_req_dn, tmppass, policy) != 0) {
453 Debug(LDAP_DEBUG_ANY, "%s: password history check failed for %s\n", __func__, op->o_req_dn.bv_val, 0);
461 if(odusers_set_password(&op->o_req_dn, tmppass, isChangingOwnPassword) != 0) {
462 Debug(LDAP_DEBUG_ANY, "%s: set password for user %s failed\n", __func__, op->o_req_ndn.bv_val, 0);
470 odusers_store_history(&op->o_req_dn, tmppass, policy);
472 Debug(LDAP_DEBUG_ANY, "%s: %s changed password for %s\n", __func__, op->o_conn->c_dn.bv_val, op->o_req_ndn.bv_val);
479 op->oq_extended = qext;
490 op->o_tmpfree( dn.bv_val, op->o_tmpmemctx );
491 BER_BVZERO( &op->o_req_dn );
494 op->o_tmpfree( ndn.bv_val, op->o_tmpmemctx );
495 BER_BVZERO( &op->o_req_ndn );
670 Operation *op,
684 ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
685 op->o_conn->c_sasl_authctx, 0, &old_authctx, NULL );
692 if ( e && access_allowed( op, e, a->a_desc, bv,
707 ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,