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
Oren Tirosh
OpenLDAP
Commits
d8cb33eb
Commit
d8cb33eb
authored
23 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
added acl check for added/removed rdn attrs
parent
50223981
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-ldbm/modrdn.c
+46
-1
46 additions, 1 deletion
servers/slapd/back-ldbm/modrdn.c
with
46 additions
and
1 deletion
servers/slapd/back-ldbm/modrdn.c
+
46
−
1
View file @
d8cb33eb
...
...
@@ -486,6 +486,7 @@ ldbm_back_modrdn(
for
(
a_cnt
=
0
;
new_rdn_types
[
a_cnt
];
a_cnt
++
)
{
int
rc
;
Modifications
*
mod_tmp
;
struct
berval
val
;
mod_tmp
=
(
Modifications
*
)
ch_malloc
(
sizeof
(
Modifications
)
);
...
...
@@ -510,6 +511,28 @@ ldbm_back_modrdn(
goto
return_results
;
}
val
.
bv_val
=
new_rdn_vals
[
a_cnt
];
val
.
bv_len
=
strlen
(
val
.
bv_val
);
if
(
!
access_allowed
(
be
,
conn
,
op
,
p
,
mod_tmp
->
sml_desc
,
&
val
,
ACL_WRITE
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"backend"
,
LDAP_LEVEL_INFO
,
"ldbm_back_modrdn: access "
"not allowed to attr
\"
%s
\"\n
"
,
new_rdn_types
[
a_cnt
]
));
#else
Debug
(
LDAP_DEBUG_TRACE
,
"ldbm_back_modrdn: access not allowed "
"to attr
\"
%s
\"\n
%s%s"
,
new_rdn_types
[
a_cnt
],
""
,
""
);
#endif
send_ldap_result
(
conn
,
op
,
LDAP_INSUFFICIENT_ACCESS
,
NULL
,
NULL
,
NULL
,
NULL
);
goto
return_results
;
}
mod_tmp
->
sml_bvalues
=
(
struct
berval
**
)
ch_malloc
(
2
*
sizeof
(
struct
berval
*
)
);
mod_tmp
->
sml_bvalues
[
0
]
=
ber_bvstrdup
(
new_rdn_vals
[
a_cnt
]
);
mod_tmp
->
sml_bvalues
[
1
]
=
NULL
;
...
...
@@ -539,10 +562,10 @@ ldbm_back_modrdn(
for
(
d_cnt
=
0
;
old_rdn_types
[
d_cnt
];
d_cnt
++
)
{
int
rc
;
Modifications
*
mod_tmp
;
struct
berval
val
;
mod_tmp
=
(
Modifications
*
)
ch_malloc
(
sizeof
(
Modifications
)
);
mod_tmp
->
sml_desc
=
NULL
;
rc
=
slap_str2ad
(
old_rdn_types
[
d_cnt
],
&
mod_tmp
->
sml_desc
,
&
text
);
...
...
@@ -564,6 +587,28 @@ ldbm_back_modrdn(
goto
return_results
;
}
val
.
bv_val
=
old_rdn_vals
[
a_cnt
];
val
.
bv_len
=
strlen
(
val
.
bv_val
);
if
(
!
access_allowed
(
be
,
conn
,
op
,
p
,
mod_tmp
->
sml_desc
,
&
val
,
ACL_WRITE
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
((
"backend"
,
LDAP_LEVEL_INFO
,
"ldbm_back_modrdn: access "
"not allowed to attr
\"
%s
\"\n
"
,
old_rdn_types
[
a_cnt
]
));
#else
Debug
(
LDAP_DEBUG_TRACE
,
"ldbm_back_modrdn: access not allowed "
"to attr
\"
%s
\"\n
%s%s"
,
old_rdn_types
[
a_cnt
],
""
,
""
);
#endif
send_ldap_result
(
conn
,
op
,
LDAP_INSUFFICIENT_ACCESS
,
NULL
,
NULL
,
NULL
,
NULL
);
goto
return_results
;
}
/* Remove old value of rdn as an attribute. */
mod_tmp
->
sml_bvalues
=
(
struct
berval
**
)
ch_malloc
(
2
*
sizeof
(
struct
berval
*
)
);
mod_tmp
->
sml_bvalues
[
0
]
=
ber_bvstrdup
(
old_rdn_vals
[
d_cnt
]
);
...
...
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