Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Jaak Ristioja
OpenLDAP
Commits
4ccd44af
Commit
4ccd44af
authored
21 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
improvements
parent
1a906479
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/overlays/rwm.c
+17
-9
17 additions, 9 deletions
servers/slapd/overlays/rwm.c
servers/slapd/overlays/rwmconf.c
+3
-3
3 additions, 3 deletions
servers/slapd/overlays/rwmconf.c
with
20 additions
and
12 deletions
servers/slapd/overlays/rwm.c
+
17
−
9
View file @
4ccd44af
...
...
@@ -60,6 +60,10 @@ rwm_op_dn_massage( Operation *op, SlapReply *rs, void *cookie )
return
rc
;
}
if
(
mdn
.
bv_val
==
op
->
o_req_dn
.
bv_val
)
{
return
LDAP_SUCCESS
;
}
rc
=
dnPrettyNormal
(
NULL
,
&
mdn
,
&
dn
,
&
ndn
,
op
->
o_tmpmemctx
);
if
(
rc
!=
LDAP_SUCCESS
)
{
return
rc
;
...
...
@@ -121,7 +125,7 @@ rwm_delete( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
add
Dn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
delete
Dn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -139,7 +143,7 @@ rwm_modrdn( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
add
Dn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
rename
Dn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -158,7 +162,7 @@ rwm_modify( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
add
Dn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
modify
Dn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -177,7 +181,7 @@ rwm_compare( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
add
Dn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
compare
Dn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -196,7 +200,7 @@ rwm_search( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
add
Dn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
search
Dn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -215,7 +219,7 @@ rwm_extended( Operation *op, SlapReply *rs )
int
rc
;
#ifdef ENABLE_REWRITE
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
ad
dDn"
);
rc
=
rwm_op_dn_massage
(
op
,
rs
,
"
extende
dDn"
);
#else
rc
=
1
;
rc
=
rwm_op_dn_massage
(
op
,
rs
,
&
rc
);
...
...
@@ -256,7 +260,7 @@ rwm_matched( Operation *op, SlapReply *rs )
if
(
mdn
.
bv_val
!=
dn
.
bv_val
)
{
if
(
rs
->
sr_flags
&
REP_MATCHED_MUSTBEFREED
)
{
free
(
rs
->
sr_matched
);
ch_
free
(
(
void
*
)
rs
->
sr_matched
);
}
else
{
rs
->
sr_flags
|=
REP_MATCHED_MUSTBEFREED
;
}
...
...
@@ -289,7 +293,7 @@ rwm_send_entry( Operation *op, SlapReply *rs )
#ifdef ENABLE_REWRITE
dc
.
conn
=
op
->
o_conn
;
dc
.
rs
=
NULL
;
dc
.
ctx
=
"searchResult"
;
dc
.
ctx
=
"searchResult
DN
"
;
#else
dc
.
tofrom
=
0
;
dc
.
normalized
=
0
;
...
...
@@ -298,6 +302,10 @@ rwm_send_entry( Operation *op, SlapReply *rs )
return
LDAP_OTHER
;
}
if
(
e
->
e_name
.
bv_val
==
dn
.
bv_val
)
{
return
SLAP_CB_CONTINUE
;
}
/*
* Note: this may fail if the target host(s) schema differs
* from the one known to the meta, and a DN with unknown
...
...
@@ -311,7 +319,7 @@ rwm_send_entry( Operation *op, SlapReply *rs )
goto
fail
;
}
if
(
!
rs
->
sr_flags
&
REP_ENTRY_MODIFIABLE
)
{
if
(
!
(
rs
->
sr_flags
&
REP_ENTRY_MODIFIABLE
)
)
{
e
=
entry_dup
(
e
);
if
(
e
==
NULL
)
{
goto
fail
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/overlays/rwmconf.c
+
3
−
3
View file @
4ccd44af
...
...
@@ -298,7 +298,7 @@ suffix_massage_config(
ch_free
(
rargv
[
2
]
);
rargv
[
0
]
=
"rewriteContext"
;
rargv
[
1
]
=
"searchResult"
;
rargv
[
1
]
=
"searchResult
DN
"
;
rargv
[
2
]
=
NULL
;
rewrite_parse
(
info
,
"<suffix massage>"
,
++
line
,
2
,
rargv
);
...
...
@@ -314,14 +314,14 @@ suffix_massage_config(
rargv
[
0
]
=
"rewriteContext"
;
rargv
[
1
]
=
"matchedDN"
;
rargv
[
2
]
=
"alias"
;
rargv
[
3
]
=
"searchResult"
;
rargv
[
3
]
=
"searchResult
DN
"
;
rargv
[
4
]
=
NULL
;
rewrite_parse
(
info
,
"<suffix massage>"
,
++
line
,
4
,
rargv
);
rargv
[
0
]
=
"rewriteContext"
;
rargv
[
1
]
=
"searchAttrDN"
;
rargv
[
2
]
=
"alias"
;
rargv
[
3
]
=
"searchResult"
;
rargv
[
3
]
=
"searchResult
DN
"
;
rargv
[
4
]
=
NULL
;
rewrite_parse
(
info
,
"<suffix massage>"
,
++
line
,
4
,
rargv
);
...
...
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