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
Dragoș Haiduc
OpenLDAP
Commits
43ba1a98
Commit
43ba1a98
authored
20 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
ITS#3579 fixes
parent
9507a115
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/back-bdb/compare.c
+19
-12
19 additions, 12 deletions
servers/slapd/back-bdb/compare.c
servers/slapd/back-bdb/init.c
+5
-6
5 additions, 6 deletions
servers/slapd/back-bdb/init.c
with
24 additions
and
18 deletions
servers/slapd/back-bdb/compare.c
+
19
−
12
View file @
43ba1a98
...
...
@@ -44,7 +44,8 @@ bdb_compare( Operation *op, SlapReply *rs )
dn2entry_retry:
/* get entry */
rs
->
sr_err
=
bdb_dn2entry
(
op
,
NULL
,
&
op
->
o_req_ndn
,
&
ei
,
1
,
locker
,
&
lock
);
rs
->
sr_err
=
bdb_dn2entry
(
op
,
NULL
,
&
op
->
o_req_ndn
,
&
ei
,
1
,
locker
,
&
lock
);
switch
(
rs
->
sr_err
)
{
case
DB_NOTFOUND
:
...
...
@@ -66,10 +67,9 @@ dn2entry_retry:
if
(
rs
->
sr_err
==
DB_NOTFOUND
)
{
if
(
e
!=
NULL
)
{
#ifdef SLAP_ACL_HONOR_DISCLOSE
/* return referral only if "disclose"
* is granted on the object */
/* return referral only if "disclose" is granted on the object */
if
(
!
access_allowed
(
op
,
e
,
slap_schema
.
si_ad_entry
,
NULL
,
ACL_DISCLOSE
,
NULL
)
)
NULL
,
ACL_DISCLOSE
,
NULL
)
)
{
rs
->
sr_err
=
LDAP_NO_SUCH_OBJECT
;
...
...
@@ -104,10 +104,9 @@ dn2entry_retry:
if
(
!
manageDSAit
&&
is_entry_referral
(
e
)
)
{
#ifdef SLAP_ACL_HONOR_DISCLOSE
/* return referral only if "disclose"
* is granted on the object */
/* return referral only if "disclose" is granted on the object */
if
(
!
access_allowed
(
op
,
e
,
slap_schema
.
si_ad_entry
,
NULL
,
ACL_DISCLOSE
,
NULL
)
)
NULL
,
ACL_DISCLOSE
,
NULL
)
)
{
rs
->
sr_err
=
LDAP_NO_SUCH_OBJECT
;
}
else
...
...
@@ -119,8 +118,7 @@ dn2entry_retry:
rs
->
sr_matched
=
e
->
e_name
.
bv_val
;
}
Debug
(
LDAP_DEBUG_TRACE
,
"entry is referral
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_TRACE
,
"entry is referral
\n
"
,
0
,
0
,
0
);
send_ldap_result
(
op
,
rs
);
...
...
@@ -133,7 +131,16 @@ dn2entry_retry:
if
(
get_assert
(
op
)
&&
(
test_filter
(
op
,
e
,
get_assertion
(
op
))
!=
LDAP_COMPARE_TRUE
))
{
rs
->
sr_err
=
LDAP_ASSERTION_FAILED
;
#ifdef SLAP_ACL_HONOR_DISCLOSE
if
(
!
access_allowed
(
op
,
e
,
slap_schema
.
si_ad_entry
,
NULL
,
ACL_DISCLOSE
,
NULL
)
)
{
rs
->
sr_err
=
LDAP_NO_SUCH_OBJECT
;
}
else
#endif
{
rs
->
sr_err
=
LDAP_ASSERTION_FAILED
;
}
goto
return_results
;
}
...
...
@@ -166,7 +173,8 @@ dn2entry_retry:
if
(
value_find_ex
(
op
->
oq_compare
.
rs_ava
->
aa_desc
,
SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH
|
SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH
,
a
->
a_nvals
,
&
op
->
oq_compare
.
rs_ava
->
aa_value
,
op
->
o_tmpmemctx
)
==
0
)
a
->
a_nvals
,
&
op
->
oq_compare
.
rs_ava
->
aa_value
,
op
->
o_tmpmemctx
)
==
0
)
{
rs
->
sr_err
=
LDAP_COMPARE_TRUE
;
break
;
...
...
@@ -191,6 +199,5 @@ done:
}
LOCK_ID_FREE
(
bdb
->
bi_dbenv
,
locker
);
return
rs
->
sr_err
;
}
This diff is collapsed.
Click to expand it.
servers/slapd/back-bdb/init.c
+
5
−
6
View file @
43ba1a98
...
...
@@ -44,9 +44,9 @@ bdb_db_init( BackendDB *be )
{
struct
bdb_info
*
bdb
;
Debug
(
LDAP_DEBUG_
ANY
,
LDAP_XSTRING
(
bdb_db_init
)
": Initializing "
BDB_UCTYPE
" database
\n
"
,
0
,
0
,
0
);
Debug
(
LDAP_DEBUG_
TRACE
,
LDAP_XSTRING
(
bdb_db_init
)
": Initializing "
BDB_UCTYPE
" database
\n
"
,
0
,
0
,
0
);
/* allocate backend-database-specific stuff */
bdb
=
(
struct
bdb_info
*
)
ch_calloc
(
1
,
sizeof
(
struct
bdb_info
)
);
...
...
@@ -507,9 +507,8 @@ bdb_back_initialize(
#endif
ver
=
(
major
<<
24
)
|
(
minor
<<
16
)
|
patch
;
if
(
ver
<
DB_VERSION_FULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
if
(
ver
<
DB_VERSION_FULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_back_initialize
)
": "
"BDB library version mismatch:"
" expected "
DB_VERSION_STRING
","
...
...
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