Author: rmeggins
Update of /cvs/dirsec/adminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11511/adminutil
Modified Files:
Makefile.am aclocal.m4 configure missing install-sh compile
Makefile.in depcomp config.sub config.guess
Log Message:
Resolves: bug 245396
Bug Description: adminutil: retrieveISIEs returns bogus data
Reviewed by: nkinder (Thanks!)
Fix Description: retrieveISIEs creates a list of id + DN pairs using
the ListNodePtr interface. Each node has a name (the id) and a value
(a char ** with the DN as the first char *) and forms a linked list of
all of the values. It then flattens the list into an array of name/value
pairs for returning. However, instead of passing val[0] to the
addSingleValueAttribute() function for the value, it was passing val cast
to a (char *), which is entirely bogus.
The fix is to pass in ((char**)node->val)[0] which is a char * value. Yet
another lesson in why void * is bad, and why you should not defeat the
compiler's type checker . . .
I also fixed another minor mem leak, and added @nss_inc@ to the list of include
directories - I guess it works because pkg-config mozldap[6] always returns the
nss include directory in its output . . .
Platforms tested: RHEL4
Flag day: Yes - autotool file changes
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/adminutil/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Makefile.am 21 Jun 2007 23:05:05 -0000 1.6
+++ Makefile.am 22 Jun 2007 21:06:44 -0000 1.7
@@ -43,7 +43,7 @@
check_PROGRAMS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite
TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite
-TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nspr_inc@ @ldapsdk_inc@ @icu_inc@
+TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nss_inc@ @nspr_inc@ @ldapsdk_inc@
@icu_inc@
TEST_LDADD = libadmsslutil.la libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK)
$(SASL_LINK) $(ICU_LINK)
retrieveSIE_SOURCES = tests/retrieveSIE.c
@@ -142,7 +142,7 @@
lib/libadmsslutil/sslerror.c \
lib/libadmsslutil/uginfossl.c
-libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nspr_inc@ @ldapsdk_inc@ @icu_inc@
+libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@
libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK)
$(SASL_LINK) $(ICU_LINK)
libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION))
if CXXLINK_REQUIRED
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/adminutil/Makefile.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.in 21 Jun 2007 23:05:05 -0000 1.7
+++ Makefile.in 22 Jun 2007 21:06:44 -0000 1.8
@@ -339,7 +339,7 @@
@CXXLINK_REQUIRED_TRUE@dummy_SOURCES = lib/dummy.cpp
@CXXLINK_REQUIRED_TRUE@dummy_LINK = $(CXXLINK)
@enable_tests_TRUE@TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite
-@enable_tests_TRUE@TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nspr_inc@
@ldapsdk_inc@ @icu_inc@
+@enable_tests_TRUE@TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nss_inc@
@nspr_inc@ @ldapsdk_inc@ @icu_inc@
@enable_tests_TRUE@TEST_LDADD = libadmsslutil.la libadminutil.la $(NSPR_LINK) $(NSS_LINK)
$(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK)
@enable_tests_TRUE@retrieveSIE_SOURCES = tests/retrieveSIE.c
@enable_tests_TRUE@retrieveSIE_CPPFLAGS = $(TEST_CPPFLAGS)
@@ -416,7 +416,7 @@
lib/libadmsslutil/sslerror.c \
lib/libadmsslutil/uginfossl.c
-libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nspr_inc@ @ldapsdk_inc@ @icu_inc@
+libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@
libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK)
$(SASL_LINK) $(ICU_LINK)
libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION))
@CXXLINK_REQUIRED_FALSE@libadmsslutil_la_LINK = $(LINK)