Lines Matching refs:op
532 slap_global_control( Operation *op, const char *oid, int *cid )
547 ( ( op->o_tag & LDAP_REQ_SEARCH ) &&
563 Operation *op,
569 op->o_tmpfree(ctrls[i], op->o_tmpmemctx );
571 op->o_tmpfree( ctrls, op->o_tmpmemctx );
575 Operation *op,
588 ctrlsp = op->o_tmpalloc(( i+j+1 )*sizeof(LDAPControl *), op->o_tmpmemctx );
599 op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );
606 Operation *op,
618 switch( op->o_tag ) {
648 assert( op->ore_reqoid.bv_val != NULL );
652 if( bvmatch( &op->ore_reqoid,
669 rc = sc->sc_parse( op, rs, control );
694 Operation *op,
702 BerElement *ber = op->o_ber;
734 if( op->o_protocol < LDAP_VERSION3 ) {
741 op->o_ctrls = op->o_tmpalloc( 2 * sizeof(LDAPControl *), op->o_tmpmemctx );
744 if( op->ctrls == NULL ) {
751 op->o_ctrls[nctrls] = NULL;
761 c = op->o_tmpalloc( sizeof(LDAPControl), op->o_tmpmemctx );
767 tctrls = op->o_tmprealloc( op->o_ctrls,
768 (nctrls+2) * sizeof(LDAPControl *), op->o_tmpmemctx );
773 ldap_controls_free(op->o_ctrls);
774 op->o_ctrls = NULL;
781 op->o_ctrls = tctrls;
783 op->o_ctrls[nctrls++] = c;
784 op->o_ctrls[nctrls] = NULL;
793 slap_free_ctrls( op, op->o_ctrls );
794 op->o_ctrls = NULL;
802 op->o_connid, 0, 0 );
804 slap_free_ctrls( op, op->o_ctrls );
805 op->o_ctrls = NULL;
820 slap_free_ctrls( op, op->o_ctrls );
821 op->o_ctrls = NULL;
837 op->o_connid, c->ldctl_oid,
839 slap_free_ctrls( op, op->o_ctrls );
840 op->o_ctrls = NULL;
851 rs->sr_err = slap_parse_ctrl( op, rs, c, &rs->sr_text );
868 send_ldap_disconnect( op, rs );
874 if ( !get_whatFailed( op ) ) {
886 slap_free_ctrls( op, op->o_ctrls );
887 op->o_ctrls = NULL;
891 slap_free_ctrls( op, op->o_ctrls );
892 op->o_ctrls = NULL;
901 slap_free_ctrls( op, op->o_ctrls );
902 op->o_ctrls = NULL;
913 slap_free_ctrls( op, op->o_ctrls );
914 op->o_ctrls = NULL;
921 slap_parse_ctrl( op, rs, &c, &text );
927 if ( get_whatFailed( op ) ) {
931 slap_ctrl_whatFailed_add( op, rs, oids );
936 send_ldap_result( op, rs );
945 Operation *op,
952 switch ( op->o_ctrlflag[ ctrl ] ) {
954 for ( i = 0, j = -1; op->o_ctrls[ i ] != NULL; i++ ) {
955 if ( strcmp( op->o_ctrls[ i ]->ldctl_oid,
968 (void)fnc( op, rs );
971 op->o_tmpfree( op->o_ctrls[ j ], op->o_tmpmemctx );
974 AC_MEMCPY( &op->o_ctrls[ j ], &op->o_ctrls[ j + 1 ],
978 op->o_tmpfree( op->o_ctrls, op->o_tmpmemctx );
979 op->o_ctrls = NULL;
982 op->o_ctrlflag[ ctrl ] = SLAP_CONTROL_IGNORED;
986 op->o_log_prefix, slap_known_controls[ ctrl ], 0 );
997 (void)fnc( op, rs );
1001 op->o_log_prefix, slap_known_controls[ ctrl ], 0 );
1013 Operation *op,
1017 if ( op->o_dontUseCopy != SLAP_CONTROL_NONE ) {
1034 op->o_dontUseCopy = ctrl->ldctl_iscritical
1042 Operation *op,
1046 if ( op->o_relax != SLAP_CONTROL_NONE ) {
1056 op->o_relax = ctrl->ldctl_iscritical
1064 Operation *op,
1068 if ( op->o_managedsait != SLAP_CONTROL_NONE ) {
1078 op->o_managedsait = ctrl->ldctl_iscritical
1086 Operation *op,
1093 if ( op->o_proxy_authz != SLAP_CONTROL_NONE ) {
1111 && BER_BVISEMPTY( &op->o_ndn ) )
1117 op->o_proxy_authz = ctrl->ldctl_iscritical
1123 op->o_connid,
1130 op->o_connid, 0, 0 );
1133 if ( !BER_BVISNULL( &op->o_ndn ) ) {
1134 op->o_ndn.bv_val[ 0 ] = '\0';
1136 op->o_ndn.bv_len = 0;
1138 if ( !BER_BVISNULL( &op->o_dn ) ) {
1139 op->o_dn.bv_val[ 0 ] = '\0';
1141 op->o_dn.bv_len = 0;
1146 rc = slap_sasl_getdn( op->o_conn, op, &ctrl->ldctl_value,
1160 op->o_connid,
1163 rc = slap_sasl_authorized( op, &op->o_ndn, &dn );
1171 ch_free( op->o_ndn.bv_val );
1175 * from now on op->o_dn is normalized
1177 op->o_ndn = dn;
1178 ber_bvreplace( &op->o_dn, &dn );
1181 op->o_log_prefix, dn.bv_val, 0, 0, 0 );
1187 Operation *op,
1191 if ( op->o_noop != SLAP_CONTROL_NONE ) {
1201 op->o_noop = ctrl->ldctl_iscritical
1209 Operation *op,
1221 if ( op->o_pagedresults != SLAP_CONTROL_NONE ) {
1260 ps = op->o_tmpalloc( sizeof(PagedResultsState), op->o_tmpmemctx );
1261 *ps = op->o_conn->c_pagedresults_state;
1264 op->o_pagedresults_state = ps;
1269 op->o_conn->c_pagedresults_state.ps_cookie = NOID;
1278 * NOTE: this assumes that the op->ors_slimit be set
1282 if ( op->ors_slimit > 0 && size >= op->ors_slimit ) {
1283 op->o_pagedresults = SLAP_CONTROL_IGNORED;
1286 op->o_pagedresults = SLAP_CONTROL_CRITICAL;
1289 op->o_pagedresults = SLAP_CONTROL_NONCRITICAL;
1298 Operation *op,
1304 if ( op->o_sortedresults != SLAP_CONTROL_NONE ) {
1321 op->o_sortedresults = ctrl->ldctl_iscritical
1330 Operation *op,
1337 if ( op->o_assert != SLAP_CONTROL_NONE ) {
1358 rs->sr_err = get_filter( op, ber, (Filter **)&(op->o_assertion),
1364 send_ldap_disconnect( op, rs );
1367 send_ldap_result( op, rs );
1369 if( op->o_assertion != NULL ) {
1370 filter_free_x( op, op->o_assertion, 1 );
1376 filter2bv_x( op, op->o_assertion, &fstr );
1379 op->o_connid, fstr.bv_len ? fstr.bv_val : "empty" , 0 );
1380 op->o_tmpfree( fstr.bv_val, op->o_tmpmemctx );
1383 op->o_assert = ctrl->ldctl_iscritical
1396 Operation *op,
1405 if ( ( post && op->o_postread != SLAP_CONTROL_NONE ) ||
1406 ( !post && op->o_preread != SLAP_CONTROL_NONE ) )
1423 if ( op->o_txnSpec ) { /* temporary limitation */
1482 op->o_postread_attrs = an;
1483 op->o_postread = ctrl->ldctl_iscritical
1487 op->o_preread_attrs = an;
1488 op->o_preread = ctrl->ldctl_iscritical
1499 Operation *op,
1503 return parseReadAttrs( op, rs, ctrl, 0 );
1507 Operation *op,
1511 return parseReadAttrs( op, rs, ctrl, 1 );
1515 Operation *op,
1522 if ( op->o_valuesreturnfilter != SLAP_CONTROL_NONE ) {
1543 rs->sr_err = get_vrFilter( op, ber,
1544 (ValuesReturnFilter **)&(op->o_vrFilter), &rs->sr_text);
1551 send_ldap_disconnect( op, rs );
1554 send_ldap_result( op, rs );
1556 if( op->o_vrFilter != NULL) vrFilter_free( op, op->o_vrFilter );
1560 vrFilter2bv( op, op->o_vrFilter, &fstr );
1565 op->o_tmpfree( fstr.bv_val, op->o_tmpmemctx );
1568 op->o_valuesreturnfilter = ctrl->ldctl_iscritical
1577 Operation *op,
1581 if ( op->o_subentries != SLAP_CONTROL_NONE ) {
1595 op->o_subentries = ctrl->ldctl_iscritical
1600 set_subentries_visibility( op );
1607 Operation *op,
1611 if ( op->o_permissive_modify != SLAP_CONTROL_NONE ) {
1621 op->o_permissive_modify = ctrl->ldctl_iscritical
1629 Operation *op,
1633 if ( op->o_domain_scope != SLAP_CONTROL_NONE ) {
1643 op->o_domain_scope = ctrl->ldctl_iscritical
1652 Operation *op,
1656 if ( op->o_tree_delete != SLAP_CONTROL_NONE ) {
1666 op->o_tree_delete = ctrl->ldctl_iscritical
1675 Operation *op,
1720 op->o_connid, (unsigned)search_flags, 0 );
1726 if ( op->o_domain_scope != SLAP_CONTROL_NONE ) {
1732 op->o_domain_scope = ctrl->ldctl_iscritical
1753 Operation *op,
1926 st_pos = strlen( op->o_log_prefix );
1928 if ( sizeof( op->o_log_prefix ) - st_pos > st_len ) {
1929 char *ptr = &op->o_log_prefix[ st_pos ];
1972 Operation *op,
2005 slap_ctrl_session_tracking_request_add( Operation *op, SlapReply *rs, LDAPControl *ctrl )
2012 if ( !BER_BVISNULL( &op->o_conn->c_peer_name ) &&
2013 memcmp( op->o_conn->c_peer_name.bv_val, "IP=", STRLENOF( "IP=" ) ) == 0 )
2017 ip.bv_val = op->o_conn->c_peer_name.bv_val + STRLENOF( "IP=" );
2018 ip.bv_len = op->o_conn->c_peer_name.bv_len - STRLENOF( "IP=" );
2026 if ( !BER_BVISNULL( &op->o_conn->c_peer_domain ) &&
2027 !bvmatch( &op->o_conn->c_peer_domain, &bv_unknown ) )
2029 name = op->o_conn->c_peer_domain;
2032 if ( !BER_BVISNULL( &op->o_dn ) && !BER_BVISEMPTY( &op->o_dn ) ) {
2033 id = op->o_dn;
2036 return slap_ctrl_session_tracking_add( op, rs, &ip, &name, &id, ctrl );
2042 Operation *op,
2046 if ( op->o_whatFailed != SLAP_CONTROL_NONE ) {
2056 op->o_whatFailed = ctrl->ldctl_iscritical
2065 Operation *op,
2076 ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
2098 ctrls = op->o_tmprealloc( rs->sr_ctrls,
2102 op->o_tmpmemctx );