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

Lines Matching refs:op

45     Operation	*op,
61 op->o_log_prefix, 0, 0 );
73 if ( ber_scanf( op->o_ber, "{mmb", &dn, &newrdn, &deloldrdn )
77 op->o_log_prefix, 0, 0 );
78 send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding error" );
84 if ( ber_peek_tag( op->o_ber, &length ) == LDAP_TAG_NEWSUPERIOR ) {
85 if ( op->o_protocol < LDAP_VERSION3 ) {
91 op->o_log_prefix, 0, 0 );
93 send_ldap_discon( op, rs,
99 if ( ber_scanf( op->o_ber, "m", &newSuperior )
103 op->o_log_prefix, 0, 0 );
105 send_ldap_discon( op, rs,
110 op->orr_newSup = &pnewSuperior;
111 op->orr_nnewSup = &nnewSuperior;
119 if ( ber_scanf( op->o_ber, /*{*/ "}") == LBER_ERROR ) {
121 op->o_log_prefix, 0, 0 );
122 send_ldap_discon( op, rs,
128 if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
130 op->o_log_prefix, 0, 0 );
135 rs->sr_err = dnPrettyNormal( NULL, &dn, &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
138 op->o_log_prefix, dn.bv_val, 0 );
139 send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid DN" );
145 rs->sr_err = dnPrettyNormal( NULL, &newrdn, &op->orr_newrdn, &op->orr_nnewrdn, op->o_tmpmemctx );
148 op->o_log_prefix, newrdn.bv_val, 0 );
149 send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid new RDN" );
153 if( rdn_validate( &op->orr_newrdn ) != LDAP_SUCCESS ) {
155 op->o_log_prefix, op->orr_newrdn.bv_val, 0 );
156 send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid new RDN" );
160 if( op->orr_newSup ) {
162 &nnewSuperior, op->o_tmpmemctx );
166 op->o_log_prefix, newSuperior.bv_val, 0 );
167 send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid newSuperior" );
173 op->o_log_prefix, op->o_req_dn.bv_val, 0, 0, 0 );
175 op->orr_deleteoldrdn = deloldrdn;
176 op->orr_modlist = NULL;
179 rs->sr_err = slap_modrdn2mods( op, rs );
181 send_ldap_result( op, rs );
185 op->o_bd = frontendDB;
186 rs->sr_err = frontendDB->be_modrdn( op, rs );
195 op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
196 op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
198 op->o_tmpfree( op->orr_newrdn.bv_val, op->o_tmpmemctx );
199 op->o_tmpfree( op->orr_nnewrdn.bv_val, op->o_tmpmemctx );
201 if ( op->orr_modlist != NULL )
202 slap_mods_free( op->orr_modlist, 1 );
205 op->o_tmpfree( pnewSuperior.bv_val, op->o_tmpmemctx );
208 op->o_tmpfree( nnewSuperior.bv_val, op->o_tmpmemctx );
215 fe_op_modrdn( Operation *op, SlapReply *rs )
218 BackendDB *op_be, *bd = op->o_bd;
221 if( op->o_req_ndn.bv_len == 0 ) {
223 op->o_log_prefix, 0, 0 );
224 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
228 } else if ( bvmatch( &op->o_req_ndn, &frontendDB->be_schemandn ) ) {
230 op->o_log_prefix, frontendDB->be_schemandn.bv_val, (long)frontendDB->be_schemandn.bv_len );
232 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
237 if( op->orr_nnewSup ) {
238 dest_pndn = *op->orr_nnewSup;
240 dnParent( &op->o_req_ndn, &dest_pndn );
242 build_new_dn( &dest_ndn, &dest_pndn, &op->orr_nnewrdn, op->o_tmpmemctx );
244 diff = (ber_slen_t) dest_ndn.bv_len - (ber_slen_t) op->o_req_ndn.bv_len;
245 if ( diff > 0 ? dnIsSuffix( &dest_ndn, &op->o_req_ndn )
246 : diff < 0 && dnIsSuffix( &op->o_req_ndn, &dest_ndn ) )
248 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
259 op->o_bd = select_backend( &op->o_req_ndn, 1 );
260 if ( op->o_bd == NULL ) {
261 op->o_bd = bd;
263 NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
268 send_ldap_result( op, rs );
272 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
279 op_be = op->o_bd;
280 if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
281 op->o_bd = select_backend( &op->o_req_ndn, 0 );
285 if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
286 send_ldap_result( op, rs );
291 if ( backend_check_referrals( op, rs ) != LDAP_SUCCESS ) {
296 if ( select_backend( &dest_ndn, 0 ) != op->o_bd ) {
297 send_ldap_error( op, rs, LDAP_AFFECTS_MULTIPLE_DSAS,
308 if ( op->o_bd->be_modrdn ) {
310 int repl_user = be_isupdate( op );
311 if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user )
313 op->o_bd = op_be;
314 op->o_bd->be_modrdn( op, rs );
316 if ( op->o_bd->be_delete ) {
323 org_req_dn = op->o_req_dn;
324 org_req_ndn = op->o_req_ndn;
325 org_dn = op->o_dn;
326 org_ndn = op->o_ndn;
327 org_managedsait = get_manageDSAit( op );
328 op->o_dn = op->o_bd->be_rootdn;
329 op->o_ndn = op->o_bd->be_rootndn;
330 op->o_managedsait = SLAP_CONTROL_NONCRITICAL;
333 op->o_delete_glue_parent ) {
334 op->o_delete_glue_parent = 0;
335 if ( !be_issuffix( op->o_bd, &op->o_req_ndn )) {
338 dnParent( &op->o_req_ndn, &pdn );
339 op->o_req_dn = pdn;
340 op->o_req_ndn = pdn;
341 op->o_callback = &cb;
342 op->o_bd->be_delete( op, rs );
347 op->o_managedsait = org_managedsait;
348 op->o_dn = org_dn;
349 op->o_ndn = org_ndn;
350 op->o_req_dn = org_req_dn;
351 op->o_req_ndn = org_req_ndn;
352 op->o_delete_glue_parent = 0;
356 BerVarray defref = op->o_bd->be_update_refs
357 ? op->o_bd->be_update_refs : default_referral;
361 NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
365 send_ldap_result( op, rs );
369 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
374 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
380 ber_memfree_x( dest_ndn.bv_val, op->o_tmpmemctx );
381 op->o_bd = bd;
387 Operation *op,
394 assert( !BER_BVISEMPTY( &op->oq_modrdn.rs_newrdn ) );
397 if ( BER_BVISEMPTY( &op->o_req_dn ) ) op->orr_deleteoldrdn = 0;
399 if ( ldap_bv2rdn_x( &op->oq_modrdn.rs_newrdn, &new_rdn,
400 (char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) ) {
404 op->o_log_prefix, 0, 0 );
410 if ( op->oq_modrdn.rs_deleteoldrdn ) {
411 if ( ldap_bv2rdn_x( &op->o_req_dn, &old_rdn,
412 (char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) ) {
416 op->o_log_prefix, 0, 0 );
434 op->o_log_prefix,
469 mod_tmp->sml_next = op->orr_modlist;
470 op->orr_modlist = mod_tmp;
474 if ( op->orr_deleteoldrdn ) {
483 op->o_log_prefix,
511 mod_tmp->sml_next = op->orr_modlist;
512 op->orr_modlist = mod_tmp;
519 if ( rs->sr_err != LDAP_SUCCESS && op->orr_modlist != NULL ) {
522 for ( ; op->orr_modlist != NULL; op->orr_modlist = tmp ) {
523 tmp = op->orr_modlist->sml_next;
524 ch_free( op->orr_modlist );
529 ldap_rdnfree_x( new_rdn, op->o_tmpmemctx );
532 ldap_rdnfree_x( old_rdn, op->o_tmpmemctx );