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
17294602
Commit
17294602
authored
17 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
fix ITS#5286 (NULL + set = NULL); add more verbose set logging if requested
parent
63e0046e
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/sets.c
+24
-21
24 additions, 21 deletions
servers/slapd/sets.c
with
24 additions
and
21 deletions
servers/slapd/sets.c
+
24
−
21
View file @
17294602
...
...
@@ -151,16 +151,19 @@ slap_set_join(
sizeof
(
struct
berval
),
cp
->
set_op
->
o_tmpmemctx
);
BER_BVZERO
(
&
set
[
0
]
);
return
set
;
goto
done2
;
}
return
set_dup
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
set
=
set_dup
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
goto
done2
;
}
slap_set_dispose
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
return
set_dup
(
cp
,
rset
,
SLAP_SET_RREF2REF
(
op_flags
)
);
set
=
set_dup
(
cp
,
rset
,
SLAP_SET_RREF2REF
(
op_flags
)
);
goto
done2
;
}
if
(
rset
==
NULL
||
BER_BVISNULL
(
&
rset
[
0
]
)
)
{
slap_set_dispose
(
cp
,
rset
,
SLAP_SET_RREF2REF
(
op_flags
)
);
return
set_dup
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
set
=
set_dup
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
goto
done2
;
}
/* worst scenario: no duplicates */
...
...
@@ -277,25 +280,13 @@ slap_set_join(
j
=
slap_set_size
(
lset
);
/* handle empty set cases */
if
(
i
==
0
)
{
if
(
j
==
0
)
{
set
=
cp
->
set_op
->
o_tmpcalloc
(
i
*
j
+
1
,
sizeof
(
struct
berval
),
cp
->
set_op
->
o_tmpmemctx
);
if
(
set
==
NULL
)
{
break
;
}
BER_BVZERO
(
&
set
[
0
]
);
break
;
}
else
{
set
=
set_dup
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
lset
=
NULL
;
if
(
i
==
0
||
j
==
0
)
{
set
=
cp
->
set_op
->
o_tmpcalloc
(
1
,
sizeof
(
struct
berval
),
cp
->
set_op
->
o_tmpmemctx
);
if
(
set
==
NULL
)
{
break
;
}
}
else
if
(
j
==
0
)
{
set
=
set_dup
(
cp
,
rset
,
SLAP_SET_RREF2REF
(
op_flags
)
);
rset
=
NULL
;
BER_BVZERO
(
&
set
[
0
]
);
break
;
}
...
...
@@ -364,6 +355,18 @@ done:;
if
(
lset
)
slap_set_dispose
(
cp
,
lset
,
SLAP_SET_LREF2REF
(
op_flags
)
);
if
(
rset
)
slap_set_dispose
(
cp
,
rset
,
SLAP_SET_RREF2REF
(
op_flags
)
);
done2:
;
if
(
LogTest
(
LDAP_DEBUG_ACL
)
)
{
if
(
BER_BVISNULL
(
set
)
)
{
Debug
(
LDAP_DEBUG_ACL
,
" ACL set: empty
\n
"
,
0
,
0
,
0
);
}
else
{
for
(
i
=
0
;
!
BER_BVISNULL
(
&
set
[
i
]
);
i
++
)
{
Debug
(
LDAP_DEBUG_ACL
,
" ACL set[%d]=%s
\n
"
,
i
,
set
[
i
].
bv_val
,
0
);
}
}
}
return
set
;
}
...
...
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