2014-01-06 15:50:07 -06:00
|
|
|
MAINTAINERCLEANFILES = *~ Makefile.in
|
OTP: emit a log message when LDAP entry for config record is not found
This patch proposes a fix to the following defect found by covscan of FreeIPA
master code:
"""
Error: CHECKED_RETURN (CWE-252):
/daemons/ipa-slapi-plugins/libotp/otp_config.c:239: check_return: Calling
"slapi_search_internal_get_entry" without checking return value (as is done
elsewhere 14 out of 16 times).
/daemons/ipa-slapi-plugins/ipa-enrollment/ipa_enrollment.c:402:
example_checked: Example 1: "slapi_search_internal_get_entry(sdn, NULL,
&config_entry, ipaenrollment_plugin_id)" has its value checked in "(rc =
slapi_search_internal_get_entry(sdn, NULL, &config_entry,
ipaenrollment_plugin_id)) != 0".
/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c:207: example_assign:
Example 2: Assigning: "ret" = return value from
"slapi_search_internal_get_entry(sdn, NULL, &config_entry, getPluginID())".
/daemons/ipa-slapi-plugins/ipa-lockout/ipa_lockout.c:212: example_checked:
Example 2 (cont.): "ret" has its value checked in "ret".
/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c:651: example_assign: Example
3: Assigning: "search_result" = return value from
"slapi_search_internal_get_entry(sdn, attrlist, e2, ipapwd_plugin_id)".
/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c:653: example_checked:
Example 3 (cont.): "search_result" has its value checked in "search_result !=
0". /daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c:1035: example_assign:
Example 4: Assigning: "ret" = return value from
"slapi_search_internal_get_entry(tmp_dn, NULL, &pwdop->pwdata.target,
ipapwd_plugin_id)".
/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c:1039:
example_checked: Example 4 (cont.): "ret" has its value checked in "ret != 0".
/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c:817: example_assign: Example 5:
Assigning: "ret" = return value from "slapi_search_internal_get_entry(tmp_dn,
NULL, &e, getPluginID())".
/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c:820: example_checked: Example 5
(cont.): "ret" has its value checked in "ret == 10".
"""
The patch is a part of series related to
https://fedorahosted.org/freeipa/ticket/4795
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2015-01-28 09:28:50 -06:00
|
|
|
PLUGIN_COMMON_DIR = ../common
|
|
|
|
AM_CPPFLAGS = -I/usr/include/dirsrv \
|
|
|
|
-I$(PLUGIN_COMMON_DIR)
|
2014-01-06 15:50:07 -06:00
|
|
|
|
2014-11-10 19:58:20 -06:00
|
|
|
noinst_LTLIBRARIES = libhotp.la libotp.la
|
|
|
|
libhotp_la_SOURCES = hotp.c hotp.h
|
2014-11-10 21:46:44 -06:00
|
|
|
libotp_la_SOURCES = otp_config.c otp_config.h otp_token.c otp_token.h
|
2014-11-10 19:58:20 -06:00
|
|
|
libotp_la_LIBADD = libhotp.la
|
2014-01-06 15:50:07 -06:00
|
|
|
|
2014-11-10 19:58:20 -06:00
|
|
|
check_PROGRAMS = t_hotp
|
2014-01-06 15:50:07 -06:00
|
|
|
TESTS = $(check_PROGRAMS)
|
2014-11-10 19:58:20 -06:00
|
|
|
t_hotp_LDADD = $(NSPR_LIBS) $(NSS_LIBS) libhotp.la
|