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
2430af4e
Commit
2430af4e
authored
20 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
fix slapacl when doing cross-database access checking
parent
da69eca7
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/acl.c
+3
-2
3 additions, 2 deletions
servers/slapd/acl.c
servers/slapd/slapacl.c
+22
-1
22 additions, 1 deletion
servers/slapd/slapacl.c
with
25 additions
and
3 deletions
servers/slapd/acl.c
+
3
−
2
View file @
2430af4e
...
...
@@ -427,8 +427,9 @@ access_allowed_mask(
}
if
(
op
->
o_bd
==
NULL
)
{
op
->
o_bd
=
LDAP_STAILQ_FIRST
(
&
backendDB
);
op
->
o_bd
=
LDAP_STAILQ_FIRST
(
&
backendDB
);
be_null
=
1
;
#ifdef LDAP_DEVEL
/*
* FIXME: experimental; use first backend rules
...
...
@@ -436,7 +437,7 @@ access_allowed_mask(
if
(
frontendDB
->
be_acl
!=
NULL
)
{
op
->
o_bd
=
frontendDB
;
}
#endif
#endif
/* LDAP_DEVEL */
}
assert
(
op
->
o_bd
!=
NULL
);
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slapacl.c
+
22
−
1
View file @
2430af4e
...
...
@@ -45,7 +45,6 @@ print_access(
int
rc
;
slap_mask_t
mask
;
char
accessmaskbuf
[
ACCESSMASK_MAXLEN
];
slap_access_t
access
=
ACL_AUTH
;
rc
=
access_allowed_mask
(
op
,
e
,
desc
,
nval
,
ACL_AUTH
,
NULL
,
&
mask
);
...
...
@@ -71,9 +70,25 @@ slapacl( int argc, char **argv )
Entry
e
=
{
0
},
*
ep
=
&
e
;
char
*
attr
=
NULL
;
int
doclose
=
0
;
BackendDB
*
bd
;
slap_tool_init
(
progname
,
SLAPACL
,
argc
,
argv
);
if
(
!
dryrun
)
{
int
i
=
0
;
LDAP_STAILQ_FOREACH
(
bd
,
&
backendDB
,
be_next
)
{
if
(
bd
!=
be
&&
backend_startup
(
bd
)
)
{
fprintf
(
stderr
,
"backend_startup(#%d%s%s) failed
\n
"
,
i
,
bd
->
be_suffix
?
": "
:
""
,
bd
->
be_suffix
?
bd
->
be_suffix
[
0
].
bv_val
:
""
);
rc
=
1
;
goto
destroy
;
}
}
}
argv
=
&
argv
[
optind
];
argc
-=
optind
;
...
...
@@ -339,6 +354,12 @@ destroy:;
if
(
doclose
)
{
be
->
be_entry_close
(
be
);
}
LDAP_STAILQ_FOREACH
(
bd
,
&
backendDB
,
be_next
)
{
if
(
bd
!=
be
)
{
backend_shutdown
(
bd
);
}
}
}
slap_tool_destroy
();
...
...
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