Skip to content
Snippets Groups Projects
Commit 8788a2af authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Disallow pre/post reads in transactions (haven't yet specified

protocol mechanism to return update response controls).
parent e30be874
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment