Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
8788a2af
Commit
8788a2af
authored
19 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
Disallow pre/post reads in transactions (haven't yet specified
protocol mechanism to return update response controls).
parent
e30be874
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/controls.c
+10
-0
10 additions, 0 deletions
servers/slapd/controls.c
servers/slapd/txn.c
+9
-0
9 additions, 0 deletions
servers/slapd/txn.c
with
19 additions
and
0 deletions
servers/slapd/controls.c
+
10
−
0
View file @
8788a2af
...
...
@@ -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"
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/txn.c
+
9
−
0
View file @
8788a2af
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment