Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
7e7ce79b
Commit
7e7ce79b
authored
Jul 21, 2014
by
Howard Chu
Browse files
ITS
#6970
more error checks in add_group
parent
4a1b7556
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/slapd-modules/autogroup/autogroup.c
View file @
7e7ce79b
...
...
@@ -604,7 +604,11 @@ autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd,
if
(
lud
->
lud_filter
!=
NULL
)
{
ber_str2bv
(
lud
->
lud_filter
,
0
,
1
,
&
agf
->
agf_filterstr
);
agf
->
agf_filter
=
str2filter
(
lud
->
lud_filter
);
}
}
else
{
Debug
(
LDAP_DEBUG_TRACE
,
"autogroup_add_group: URL filter is missing <%s>
\n
"
,
bv
->
bv_val
,
0
,
0
);
/* FIXME: error? */
goto
cleanup
;
}
if
(
lud
->
lud_attrs
!=
NULL
)
{
int
i
;
...
...
@@ -617,26 +621,33 @@ autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd,
Debug
(
LDAP_DEBUG_ANY
,
"autogroup_add_group: too many attributes specified in url <%s>
\n
"
,
bv
->
bv_val
,
0
,
0
);
/* FIXME: error? */
filter_free
(
agf
->
agf_filter
);
ch_free
(
agf
->
agf_filterstr
.
bv_val
);
ch_free
(
agf
->
agf_dn
.
bv_val
);
ch_free
(
agf
->
agf_ndn
.
bv_val
);
ldap_free_urldesc
(
lud
);
ch_free
(
agf
);
ch_free
(
agf
);
continue
;
}
agf
->
agf_anlist
=
str2anlist
(
NULL
,
lud
->
lud_attrs
[
0
],
","
);
if
(
agf
->
agf_anlist
==
NULL
)
{
Debug
(
LDAP_DEBUG_ANY
,
"autogroup_add_group: unable to find AttributeDescription
\"
%s
\"
.
\n
"
,
lud
->
lud_attrs
[
0
],
0
,
0
);
lud
->
lud_attrs
[
0
],
0
,
0
);
/* FIXME: error? */
filter_free
(
agf
->
agf_filter
);
ch_free
(
agf
->
agf_filterstr
.
bv_val
);
ch_free
(
agf
->
agf_dn
.
bv_val
);
ch_free
(
agf
->
agf_ndn
.
bv_val
);
ldap_free_urldesc
(
lud
);
ch_free
(
agf
);
ch_free
(
agf
);
continue
;
}
}
agf
->
agf_next
=
NULL
;
if
(
(
*
agep
)
->
age_filter
==
NULL
)
{
(
*
agep
)
->
age_filter
=
agf
;
}
...
...
@@ -661,6 +672,8 @@ autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd,
cleanup:
;
ch_free
(
agf
->
agf_ndn
.
bv_val
);
ch_free
(
agf
->
agf_dn
.
bv_val
);
ldap_free_urldesc
(
lud
);
ch_free
(
agf
);
}
...
...
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