mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Disallow pre/post reads in transactions (haven't yet specified
protocol mechanism to return update response controls).
This commit is contained in:
parent
e30be8748a
commit
8788a2af36
@ -1208,6 +1208,11 @@ static int parsePreRead (
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
if ( op->o_txnSpec ) { /* temporary limitation */
|
||||
rs->sr_text = "cannot perform pre-read in transaction";
|
||||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
ber = ber_init( &(ctrl->ldctl_value) );
|
||||
if (ber == NULL) {
|
||||
rs->sr_text = "preread control: internal error";
|
||||
@ -1266,6 +1271,11 @@ static int parsePostRead (
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
if ( op->o_txnSpec ) { /* temporary limitation */
|
||||
rs->sr_text = "cannot perform post-read in transaction";
|
||||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
ber = ber_init( &(ctrl->ldctl_value) );
|
||||
if (ber == NULL) {
|
||||
rs->sr_text = "postread control: internal error";
|
||||
|
@ -99,6 +99,15 @@ int txn_spec_ctrl(
|
||||
return LDAP_X_TXN_ID_INVALID;
|
||||
}
|
||||
|
||||
if ( op->o_preread ) { /* temporary limitation */
|
||||
rs->sr_text = "cannot perform pre-read in transaction";
|
||||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
if ( op->o_postread ) { /* temporary limitation */
|
||||
rs->sr_text = "cannot perform post-read in transaction";
|
||||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
op->o_txnSpec = SLAP_CONTROL_CRITICAL;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user