Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
af27cd35
Commit
af27cd35
authored
Oct 26, 2006
by
Pierangelo Masarati
Browse files
import fix to ITS#4664
parent
77bcae65
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
af27cd35
OpenLDAP 2.3 Change Log
OpenLDAP 2.3.29 Engineering
Fixed slapo-dynlist leaks (ITS#4664)
Documentation
Fixed slapd-ldap/meta(5) rebind-as-user usage (ITS#4715)
Fixed slapd-ldap/meta(5) missing network-timeout (ITS#4718)
...
...
servers/slapd/overlays/dynlist.c
View file @
af27cd35
/* dynlist.c - dynamic list overlay */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2003-2006 The OpenLDAP Foundation.
...
...
@@ -24,7 +25,7 @@
#if LDAP_VENDOR_VERSION_MINOR != X && LDAP_VENDOR_VERSION_MINOR < 3
#define OL_2_2_COMPAT
#elif
defined(LDAP_DEVEL) &&
SLAPD_OVER_DYNGROUP != SLAPD_MOD_STATIC
#elif SLAPD_OVER_DYNGROUP != SLAPD_MOD_STATIC
#define TAKEOVER_DYNGROUP
#endif
...
...
@@ -350,7 +351,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
continue
;
}
if
(
lud
->
lud_host
)
{
if
(
lud
->
lud_host
!=
NULL
)
{
/* FIXME: host not allowed; reject as illegal? */
Debug
(
LDAP_DEBUG_ANY
,
"dynlist_send_entry(
\"
%s
\"
): "
"illegal URI
\"
%s
\"\n
"
,
...
...
@@ -365,6 +366,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
* this can be useful in case of a database serving
* the empty suffix */
BER_BVSTR
(
&
dn
,
""
);
}
else
{
ber_str2bv
(
lud
->
lud_dn
,
0
,
0
,
&
dn
);
}
...
...
@@ -435,6 +437,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
if
(
lud
->
lud_filter
==
NULL
)
{
ber_dupbv_x
(
&
o
.
ors_filterstr
,
&
dli
->
dli_default_filter
,
op
->
o_tmpmemctx
);
}
else
{
struct
berval
flt
;
ber_str2bv
(
lud
->
lud_filter
,
0
,
0
,
&
flt
);
...
...
@@ -471,13 +474,9 @@ cleanup:;
if
(
!
BER_BVISNULL
(
&
o
.
o_req_ndn
)
)
{
op
->
o_tmpfree
(
o
.
o_req_ndn
.
bv_val
,
op
->
o_tmpmemctx
);
}
if
(
o
.
ors_filterstr
.
bv_val
!=
lud
->
lud_filter
)
{
op
->
o_tmpfree
(
o
.
ors_filterstr
.
bv_val
,
op
->
o_tmpmemctx
);
lud
->
lud_filter
=
NULL
;
}
if
(
lud
)
{
ldap_free_urldesc
(
lud
);
}
assert
(
o
.
ors_filterstr
.
bv_val
!=
lud
->
lud_filter
);
op
->
o_tmpfree
(
o
.
ors_filterstr
.
bv_val
,
op
->
o_tmpmemctx
);
ldap_free_urldesc
(
lud
);
}
rs
->
sr_entry
=
e
;
...
...
@@ -696,7 +695,7 @@ dynlist_build_def_filter( dynlist_info_t *dli )
dli
->
dli_default_filter
.
bv_len
=
STRLENOF
(
"(!(objectClass="
"))"
)
+
dli
->
dli_oc
->
soc_cname
.
bv_len
;
dli
->
dli_default_filter
.
bv_val
=
SLAP_MALLOC
(
dli
->
dli_default_filter
.
bv_len
+
1
);
dli
->
dli_default_filter
.
bv_val
=
ch_malloc
(
dli
->
dli_default_filter
.
bv_len
+
1
);
if
(
dli
->
dli_default_filter
.
bv_val
==
NULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
"dynlist_db_open: malloc failed.
\n
"
,
0
,
0
,
0
);
...
...
@@ -1345,9 +1344,11 @@ dynlist_db_open(
dli
->
dli_ad
=
ad
;
}
rc
=
dynlist_build_def_filter
(
dli
);
if
(
rc
!=
0
)
{
return
rc
;
if
(
BER_BVISNULL
(
&
dli
->
dli_default_filter
)
)
{
rc
=
dynlist_build_def_filter
(
dli
);
if
(
rc
!=
0
)
{
return
rc
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment