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
David Barchiesi
OpenLDAP
Commits
1c952c8a
Commit
1c952c8a
authored
20 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
revert prevuos NULL o_bd commit
parent
dd1f2772
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/acl.c
+12
-16
12 additions, 16 deletions
servers/slapd/acl.c
with
12 additions
and
16 deletions
servers/slapd/acl.c
+
12
−
16
View file @
1c952c8a
...
...
@@ -151,7 +151,8 @@ access_allowed_mask(
int
ret
=
1
;
int
count
;
AccessControl
*
a
=
NULL
;
Backend
*
be
,
*
old_be
;
Backend
*
be
;
int
be_null
=
0
;
#ifdef LDAP_DEBUG
char
accessmaskbuf
[
ACCESSMASK_MAXLEN
];
...
...
@@ -214,15 +215,10 @@ access_allowed_mask(
goto
done
;
}
be
=
old_be
=
op
->
o_bd
;
be
=
op
->
o_bd
;
if
(
be
==
NULL
)
{
/*
* FIXME: is this needed by slapi only? We might find
* a better way to pass the appropriate information
* that is relevant at this stage, e.g. a fake BackendDB
* with global info
*/
be
=
&
backends
[
0
];
be_null
=
1
;
op
->
o_bd
=
be
;
}
assert
(
be
!=
NULL
);
...
...
@@ -236,10 +232,9 @@ access_allowed_mask(
}
}
#endif
/* LDAP_SLAPI */
op
->
o_bd
=
old_be
;
/* grant database root access */
if
(
old_be
&&
be_isroot
(
op
)
)
{
if
(
be
!=
NULL
&&
be_isroot
(
op
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
ACL
,
INFO
,
"access_allowed: conn %lu root access granted
\n
"
,
...
...
@@ -278,27 +273,27 @@ access_allowed_mask(
}
/* use backend default access if no backend acls */
if
(
old_
be
!=
NULL
&&
old_
be
->
be_acl
==
NULL
)
{
if
(
be
!=
NULL
&&
be
->
be_acl
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
ACL
,
DETAIL1
,
"access_allowed: backend default %s access %s to
\"
%s
\"\n
"
,
access2str
(
access
),
old_
be
->
be_dfltaccess
>=
access
?
"granted"
:
"denied"
,
be
->
be_dfltaccess
>=
access
?
"granted"
:
"denied"
,
op
->
o_dn
.
bv_val
?
op
->
o_dn
.
bv_val
:
"(anonymous)"
);
#else
Debug
(
LDAP_DEBUG_ACL
,
"=> access_allowed: backend default %s access %s to
\"
%s
\"\n
"
,
access2str
(
access
),
old_
be
->
be_dfltaccess
>=
access
?
"granted"
:
"denied"
,
be
->
be_dfltaccess
>=
access
?
"granted"
:
"denied"
,
op
->
o_dn
.
bv_val
?
op
->
o_dn
.
bv_val
:
"(anonymous)"
);
#endif
ret
=
old_
be
->
be_dfltaccess
>=
access
;
ret
=
be
->
be_dfltaccess
>=
access
;
if
(
maskp
)
{
int
i
;
mask
=
ACL_PRIV_LEVEL
;
for
(
i
=
ACL_NONE
;
i
<=
old_
be
->
be_dfltaccess
;
i
++
)
{
for
(
i
=
ACL_NONE
;
i
<=
be
->
be_dfltaccess
;
i
++
)
{
mask
|=
ACL_ACCESS2PRIV
(
i
);
}
}
...
...
@@ -308,7 +303,7 @@ access_allowed_mask(
#ifdef notdef
/* be is always non-NULL */
/* use global default access if no global acls */
}
else
if
(
old_
be
==
NULL
&&
global_acl
==
NULL
)
{
}
else
if
(
be
==
NULL
&&
global_acl
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
ACL
,
DETAIL1
,
"access_allowed: global default %s access %s to
\"
%s
\"\n
"
,
...
...
@@ -454,6 +449,7 @@ done:
}
state
->
as_recorded
|=
ACL_STATE_RECORDED
;
}
if
(
be_null
)
op
->
o_bd
=
NULL
;
if
(
maskp
)
*
maskp
=
mask
;
return
ret
;
}
...
...
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