• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/servers/slapd/overlays/

Lines Matching refs:op

264 	switch ( c->op ) {
320 account_locked( Operation *op, Entry *e,
375 create_passcontrol( Operation *op, int exptime, int grace, LDAPPasswordPolicyError err )
411 cp = op->o_tmpalloc( sizeof( LDAPControl ) + c.ldctl_value.bv_len, op->o_tmpmemctx );
423 add_passcontrol( Operation *op, SlapReply *rs, LDAPControl *ctrl )
435 ctrls = op->o_tmpcalloc( sizeof( LDAPControl * ), n, op->o_tmpmemctx );
452 ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
454 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
487 op->o_bd->bd_info = (BackendInfo *)on->on_info;
488 rc = be_entry_get_rw( op, vals, NULL, NULL, 0, &pe );
489 op->o_bd->bd_info = (BackendInfo *)on;
544 op->o_bd->bd_info = (BackendInfo *)on->on_info;
545 be_entry_release_r( op, pe );
546 op->o_bd->bd_info = (BackendInfo *)on;
866 ctrls_cleanup( Operation *op, SlapReply *rs, LDAPControl **oldctrls )
875 op->o_tmpfree( rs->sr_ctrls[n], op->o_tmpmemctx );
885 op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );
891 ppolicy_ctrls_cleanup( Operation *op, SlapReply *rs )
893 ppbind *ppb = op->o_callback->sc_private;
895 ctrls_cleanup( op, rs, ppb->oldctrls );
901 ppolicy_bind_response( Operation *op, SlapReply *rs )
903 ppbind *ppb = op->o_callback->sc_private;
912 BackendInfo *bi = op->o_bd->bd_info;
920 op->o_bd->bd_info = (BackendInfo *)on->on_info;
921 rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
922 op->o_bd->bd_info = bi;
1028 ber_dupbv( &pwcons[op->o_conn->c_conn_idx].dn,
1029 &op->o_conn->c_ndn );
1125 op->o_req_dn.bv_val, warn, 0 );
1130 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1131 be_entry_release_r( op, e );
1135 Operation op2 = *op;
1145 op2.o_dn = op->o_bd->be_rootdn;
1146 op2.o_ndn = op->o_bd->be_rootndn;
1154 if ( SLAP_SHADOW( op->o_bd ) && pi->forward_updates ) {
1167 if ( SLAP_SINGLE_SHADOW( op->o_bd )) {
1185 ctrl = create_passcontrol( op, warn, ngut, ppb->pErr );
1186 ppb->oldctrls = add_passcontrol( op, rs, ctrl );
1187 op->o_callback->sc_cleanup = ppolicy_ctrls_cleanup;
1189 op->o_bd->bd_info = bi;
1194 ppolicy_bind( Operation *op, SlapReply *rs )
1196 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1199 if ( !BER_BVISEMPTY( &pwcons[op->o_conn->c_conn_idx].dn )) {
1200 ch_free( pwcons[op->o_conn->c_conn_idx].dn.bv_val );
1201 BER_BVZERO( &pwcons[op->o_conn->c_conn_idx].dn );
1205 if ( !be_isroot_dn( op->o_bd, &op->o_req_ndn )) {
1211 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1212 rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
1218 cb = op->o_tmpcalloc( sizeof(ppbind)+sizeof(slap_callback),
1219 1, op->o_tmpmemctx );
1228 cb->sc_next = op->o_callback->sc_next;
1230 op->o_callback->sc_next = cb;
1233 if ( op->o_ctrlflag[ppolicy_cid] ) {
1237 op->o_bd->bd_info = (BackendInfo *)on;
1238 ppolicy_get( op, e, &ppb->pp );
1240 rc = account_locked( op, e, &ppb->pp, &ppb->mod );
1242 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1243 be_entry_release_r( op, e );
1247 send_ldap_error( op, rs, LDAP_INVALID_CREDENTIALS, NULL );
1270 Operation *op,
1273 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1277 if ( op->o_ctrlflag[ppolicy_cid] ) {
1281 if ( op->o_conn && !BER_BVISEMPTY( &pwcons[op->o_conn->c_conn_idx].dn )) {
1287 if ( !dn_match( &op->o_conn->c_ndn,
1288 &pwcons[op->o_conn->c_conn_idx].dn )) {
1289 ch_free( pwcons[op->o_conn->c_conn_idx].dn.bv_val );
1290 BER_BVZERO( &pwcons[op->o_conn->c_conn_idx].dn );
1298 ctrl = create_passcontrol( op, -1, -1, PP_changeAfterReset );
1299 oldctrls = add_passcontrol( op, rs, ctrl );
1301 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1302 send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
1305 ctrls_cleanup( op, rs, oldctrls );
1315 Operation *op,
1324 ppolicy_bind_response( op, rs );
1337 Operation *op,
1340 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1342 if ( ppolicy_restrict( op, rs ) != SLAP_CB_CONTINUE )
1348 if ( op->o_ctrlflag[ppolicy_cid] &&
1349 op->orc_ava->aa_desc == slap_schema.si_ad_userPassword ) {
1355 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1356 rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
1362 cb = op->o_tmpcalloc( sizeof(ppbind)+sizeof(slap_callback),
1363 1, op->o_tmpmemctx );
1374 cb->sc_next = op->o_callback->sc_next;
1376 op->o_callback->sc_next = cb;
1378 op->o_bd->bd_info = (BackendInfo *)on;
1379 ppolicy_get( op, e, &ppb->pp );
1381 rc = account_locked( op, e, &ppb->pp, &ppb->mod );
1383 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1384 be_entry_release_r( op, e );
1388 send_ldap_error( op, rs, LDAP_COMPARE_FALSE, NULL );
1397 Operation *op,
1400 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1406 if ( ppolicy_restrict( op, rs ) != SLAP_CB_CONTINUE )
1410 if ( be_shadow_update( op ))
1414 if ((pa = attr_find( op->oq_add.rs_e->e_attrs,
1421 send_ldap_error( op, rs, LDAP_CONSTRAINT_VIOLATION, "Password policy only allows one password value" );
1430 ppolicy_get( op, op->ora_e, &pp );
1431 if (pp.pwdCheckQuality > 0 && !be_isroot( op )) {
1438 if ( op->o_ctrlflag[ppolicy_cid] ) {
1441 rc = check_password_quality( bv, &pp, &pErr, op->ora_e, &txt );
1444 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1447 ctrl = create_passcontrol( op, -1, -1, pErr );
1448 oldctrls = add_passcontrol( op, rs, ctrl );
1450 send_ldap_error( op, rs, rc, txt ? txt : "Password fails quality checking policy" );
1455 ctrls_cleanup( op, rs, oldctrls );
1482 send_ldap_error( op, rs, LDAP_OTHER, "Password hashing failed" );
1502 attr_merge_one( op->ora_e, ad_pwdChangedTime, &timestamp, &timestamp );
1509 ppolicy_mod_cb( Operation *op, SlapReply *rs )
1511 slap_callback *sc = op->o_callback;
1512 op->o_callback = sc->sc_next;
1514 ch_free( pwcons[op->o_conn->c_conn_idx].dn.bv_val );
1515 BER_BVZERO( &pwcons[op->o_conn->c_conn_idx].dn );
1517 op->o_tmpfree( sc, op->o_tmpmemctx );
1522 ppolicy_modify( Operation *op, SlapReply *rs )
1524 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1543 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1544 rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
1545 op->o_bd->bd_info = (BackendInfo *)on;
1552 if ( be_shadow_update( op )) {
1561 for( prev = &op->orm_modlist, ml = *prev; ml; ml = *prev ) {
1567 * drop this delete op
1639 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1640 be_entry_release_r( op, e );
1645 if ( op->o_ctrlflag[ppolicy_cid] ) {
1655 for ( sc = op->o_callback; sc; sc=sc->sc_next ) {
1667 ppolicy_get( op, e, &pp );
1669 for ( ml = op->orm_modlist,
1739 if (!BER_BVISEMPTY( &pwcons[op->o_conn->c_conn_idx].dn ) && !mod_pw_only ) {
1740 if ( dn_match( &op->o_conn->c_ndn,
1741 &pwcons[op->o_conn->c_conn_idx].dn )) {
1749 ch_free( pwcons[op->o_conn->c_conn_idx].dn.bv_val );
1750 BER_BVZERO( &pwcons[op->o_conn->c_conn_idx].dn );
1789 if (be_isroot( op )) goto do_modify;
1794 if (!pp.pwdAllowUserChange && dn_match(&op->o_req_ndn, &op->o_ndn)) {
1822 ml->sml_next = op->orm_modlist;
1823 op->orm_modlist = ml;
1864 rc = slap_passwd_check( op, NULL, pa, bv, &txt );
1914 if (slap_passwd_check( op, NULL, pa, bv, &txt ) == LDAP_SUCCESS) {
1935 rc = slap_passwd_check( op, NULL, &at, bv, &txt );
1955 if (!BER_BVISEMPTY( &pwcons[op->o_conn->c_conn_idx].dn )) {
1956 slap_callback *sc = op->o_tmpcalloc( 1, sizeof( slap_callback ),
1957 op->o_tmpmemctx );
1958 sc->sc_next = op->o_callback;
1965 op->o_callback = sc;
2146 op->o_bd->bd_info = (BackendInfo *)on->on_info;
2147 be_entry_release_r( op, e );
2152 op->o_bd->bd_info = (BackendInfo *)on->on_info;
2153 be_entry_release_r( op, e );
2155 ctrl = create_passcontrol( op, -1, -1, pErr );
2156 oldctrls = add_passcontrol( op, rs, ctrl );
2158 send_ldap_result( op, rs );
2166 op->o_tmpfree( oldctrls, op->o_tmpmemctx );
2172 ctrls_cleanup( op, rs, oldctrls );
2180 Operation *op,
2188 op->o_ctrlflag[ppolicy_cid] = ctrl->ldctl_iscritical