diff options
Diffstat (limited to 'src/checksum')
-rw-r--r-- | src/checksum/Makefile.am | 106 | ||||
-rw-r--r-- | src/checksum/Makefile.in | 179 | ||||
-rw-r--r-- | src/checksum/checksum_builder.c | 41 |
3 files changed, 226 insertions, 100 deletions
diff --git a/src/checksum/Makefile.am b/src/checksum/Makefile.am index 3aded1d9e..58292a45a 100644 --- a/src/checksum/Makefile.am +++ b/src/checksum/Makefile.am @@ -1,9 +1,10 @@ -ipsec_LTLIBRARIES = libchecksum.la -noinst_PROGRAMS = checksum_builder - +# this lib is not built until make install is called (see rules at the bottom) +EXTRA_LTLIBRARIES = libchecksum.la +ipseclib_LTLIBRARIES = $(LIBCHECKSUM_LIBS) nodist_libchecksum_la_SOURCES = checksum.c -libchecksum_la_LDFLAGS = -module -avoid-version +libchecksum_la_LDFLAGS = -module -avoid-version -rpath '$(ipseclibdir)' +noinst_PROGRAMS = checksum_builder checksum_builder_SOURCES = checksum_builder.c checksum_builder_LDADD = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ @@ -11,39 +12,100 @@ checksum_builder_LDADD = \ $(top_builddir)/src/libcharon/libcharon.la \ $(DLLIB) -BUILT_SOURCES = checksum.c CLEANFILES = checksum.c -INCLUDES = -I$(top_srcdir)/src/libstrongswan -AM_CFLAGS = -rdynamic \ - -DS_PLUGINS=\""${s_plugins}\"" -DS_PATH=\""${top_builddir}/src/libstrongswan/plugins\"" \ - -DH_PLUGINS=\""${h_plugins}\"" -DH_PATH=\""${top_builddir}/src/libhydra/plugins\"" \ - -DP_PLUGINS=\""${p_plugins}\"" -DP_PATH=\""${top_builddir}/src/pluto/plugins\"" \ - -DC_PLUGINS=\""${c_plugins}\"" -DC_PATH=\""${top_builddir}/src/libcharon/plugins\"" +INCLUDES = \ + -I$(top_srcdir)/src/libstrongswan \ + -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libcharon +AM_CFLAGS = \ + -DPLUGINDIR=\"${plugindir}\" \ + -rdynamic -libs = $(top_builddir)/src/libstrongswan/.libs/libstrongswan.so +# we keep track of build dependencies in deps and use libs to store the paths +# to the installed libraries. for executables we use the built files directly +# as these are not relinked during installation. +deps = $(top_builddir)/src/libstrongswan/libstrongswan.la +libs = $(DESTDIR)$(ipseclibdir)/libstrongswan.so +exes = + +if !MONOLITHIC + AM_CFLAGS += -DS_PLUGINS=\""${s_plugins}\"" +endif if USE_LIBHYDRA - libs += $(top_builddir)/src/libhydra/.libs/libhydra.so + deps += $(top_builddir)/src/libhydra/libhydra.la + libs += $(DESTDIR)$(ipseclibdir)/libhydra.so +if !MONOLITHIC + AM_CFLAGS += -DH_PLUGINS=\""${h_plugins}\"" +endif +endif + +if USE_TLS + deps += $(top_builddir)/src/libtls/libtls.la + libs += $(DESTDIR)$(ipseclibdir)/libtls.so +endif + +if USE_RADIUS + deps += $(top_builddir)/src/libradius/libradius.la + libs += $(DESTDIR)$(ipseclibdir)/libradius.so +endif + +if USE_LIBTNCCS + deps += $(top_builddir)/src/libtnccs/libtnccs.la + libs += $(DESTDIR)$(ipseclibdir)/libtnccs.so +endif + +if USE_SIMAKA + deps += $(top_builddir)/src/libsimaka/libsimaka.la + libs += $(DESTDIR)$(ipseclibdir)/libsimaka.so +endif + +if USE_IMCV + deps += $(top_builddir)/src/libimcv/libimcv.la + libs += $(DESTDIR)$(ipseclibdir)/libimcv.so +endif + +if USE_PTS + deps += $(top_builddir)/src/libpts/libpts.la + libs += $(DESTDIR)$(ipseclibdir)/libpts.so endif if USE_CHARON - libs += $(top_builddir)/src/libcharon/.libs/libcharon.so - libs += $(top_builddir)/src/charon/.libs/charon + deps += $(top_builddir)/src/libcharon/libcharon.la + libs += $(DESTDIR)$(ipseclibdir)/libcharon.so + exes += $(top_builddir)/src/charon/.libs/charon +if !MONOLITHIC + AM_CFLAGS += -DC_PLUGINS=\""${c_plugins}\"" +endif endif if USE_PLUTO - libs += $(top_builddir)/src/pluto/.libs/pluto + exes += $(top_builddir)/src/pluto/.libs/pluto + AM_CFLAGS += -DP_PLUGINS=\""${p_plugins}\"" endif if USE_TOOLS - libs += $(top_builddir)/src/openac/.libs/openac - libs += $(top_builddir)/src/pki/.libs/pki - libs += $(top_builddir)/src/scepclient/.libs/scepclient + exes += $(top_builddir)/src/openac/.libs/openac + exes += $(top_builddir)/src/pki/.libs/pki + exes += $(top_builddir)/src/scepclient/.libs/scepclient endif if USE_ATTR_SQL - libs += $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool + exes += $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool +endif + +if USE_IMV_ATTESTATION + exes += $(top_builddir)/src/libpts/plugins/imv_attestation/.libs/attest endif -checksum.c : checksum_builder $(libs) - ./checksum_builder $(libs) > checksum.c +checksum.c : checksum_builder $(deps) $(exes) + ./checksum_builder $(libs) $(exes) > checksum.c + +install-data-hook : $(EXTRA_LTLIBRARIES) + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES + +uninstall-hook : + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES + +clean-local : + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES diff --git a/src/checksum/Makefile.in b/src/checksum/Makefile.in index 2e11fe1f5..8c89fc615 100644 --- a/src/checksum/Makefile.in +++ b/src/checksum/Makefile.in @@ -36,15 +36,34 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = checksum_builder$(EXEEXT) -@USE_LIBHYDRA_TRUE@am__append_1 = $(top_builddir)/src/libhydra/.libs/libhydra.so -@USE_CHARON_TRUE@am__append_2 = $(top_builddir)/src/libcharon/.libs/libcharon.so \ -@USE_CHARON_TRUE@ $(top_builddir)/src/charon/.libs/charon -@USE_PLUTO_TRUE@am__append_3 = $(top_builddir)/src/pluto/.libs/pluto -@USE_TOOLS_TRUE@am__append_4 = \ +@MONOLITHIC_FALSE@am__append_1 = -DS_PLUGINS=\""${s_plugins}\"" +@USE_LIBHYDRA_TRUE@am__append_2 = $(top_builddir)/src/libhydra/libhydra.la +@USE_LIBHYDRA_TRUE@am__append_3 = $(DESTDIR)$(ipseclibdir)/libhydra.so +@MONOLITHIC_FALSE@@USE_LIBHYDRA_TRUE@am__append_4 = -DH_PLUGINS=\""${h_plugins}\"" +@USE_TLS_TRUE@am__append_5 = $(top_builddir)/src/libtls/libtls.la +@USE_TLS_TRUE@am__append_6 = $(DESTDIR)$(ipseclibdir)/libtls.so +@USE_RADIUS_TRUE@am__append_7 = $(top_builddir)/src/libradius/libradius.la +@USE_RADIUS_TRUE@am__append_8 = $(DESTDIR)$(ipseclibdir)/libradius.so +@USE_LIBTNCCS_TRUE@am__append_9 = $(top_builddir)/src/libtnccs/libtnccs.la +@USE_LIBTNCCS_TRUE@am__append_10 = $(DESTDIR)$(ipseclibdir)/libtnccs.so +@USE_SIMAKA_TRUE@am__append_11 = $(top_builddir)/src/libsimaka/libsimaka.la +@USE_SIMAKA_TRUE@am__append_12 = $(DESTDIR)$(ipseclibdir)/libsimaka.so +@USE_IMCV_TRUE@am__append_13 = $(top_builddir)/src/libimcv/libimcv.la +@USE_IMCV_TRUE@am__append_14 = $(DESTDIR)$(ipseclibdir)/libimcv.so +@USE_PTS_TRUE@am__append_15 = $(top_builddir)/src/libpts/libpts.la +@USE_PTS_TRUE@am__append_16 = $(DESTDIR)$(ipseclibdir)/libpts.so +@USE_CHARON_TRUE@am__append_17 = $(top_builddir)/src/libcharon/libcharon.la +@USE_CHARON_TRUE@am__append_18 = $(DESTDIR)$(ipseclibdir)/libcharon.so +@USE_CHARON_TRUE@am__append_19 = $(top_builddir)/src/charon/.libs/charon +@MONOLITHIC_FALSE@@USE_CHARON_TRUE@am__append_20 = -DC_PLUGINS=\""${c_plugins}\"" +@USE_PLUTO_TRUE@am__append_21 = $(top_builddir)/src/pluto/.libs/pluto +@USE_PLUTO_TRUE@am__append_22 = -DP_PLUGINS=\""${p_plugins}\"" +@USE_TOOLS_TRUE@am__append_23 = \ @USE_TOOLS_TRUE@ $(top_builddir)/src/openac/.libs/openac \ @USE_TOOLS_TRUE@ $(top_builddir)/src/pki/.libs/pki \ @USE_TOOLS_TRUE@ $(top_builddir)/src/scepclient/.libs/scepclient -@USE_ATTR_SQL_TRUE@am__append_5 = $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool +@USE_ATTR_SQL_TRUE@am__append_24 = $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool +@USE_IMV_ATTESTATION_TRUE@am__append_25 = $(top_builddir)/src/libpts/plugins/imv_attestation/.libs/attest subdir = src/checksum DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -83,8 +102,8 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(ipsecdir)" -LTLIBRARIES = $(ipsec_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(ipseclibdir)" +LTLIBRARIES = $(ipseclib_LTLIBRARIES) libchecksum_la_LIBADD = nodist_libchecksum_la_OBJECTS = checksum.lo libchecksum_la_OBJECTS = $(nodist_libchecksum_la_OBJECTS) @@ -209,6 +228,9 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +attest_plugins = @attest_plugins@ +axis2c_CFLAGS = @axis2c_CFLAGS@ +axis2c_LIBS = @axis2c_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -217,6 +239,7 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ c_plugins = @c_plugins@ +clearsilver_LIBS = @clearsilver_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ dbusservicedir = @dbusservicedir@ @@ -233,11 +256,13 @@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ +imcvdir = @imcvdir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ipsecdir = @ipsecdir@ ipsecgroup = @ipsecgroup@ +ipseclibdir = @ipseclibdir@ ipsecuser = @ipsecuser@ libcharon_plugins = @libcharon_plugins@ libdir = @libdir@ @@ -281,6 +306,7 @@ sharedstatedir = @sharedstatedir@ soup_CFLAGS = @soup_CFLAGS@ soup_LIBS = @soup_LIBS@ srcdir = @srcdir@ +starter_plugins = @starter_plugins@ strongswan_conf = @strongswan_conf@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ @@ -291,9 +317,12 @@ top_srcdir = @top_srcdir@ urandom_device = @urandom_device@ xml_CFLAGS = @xml_CFLAGS@ xml_LIBS = @xml_LIBS@ -ipsec_LTLIBRARIES = libchecksum.la + +# this lib is not built until make install is called (see rules at the bottom) +EXTRA_LTLIBRARIES = libchecksum.la +ipseclib_LTLIBRARIES = $(LIBCHECKSUM_LIBS) nodist_libchecksum_la_SOURCES = checksum.c -libchecksum_la_LDFLAGS = -module -avoid-version +libchecksum_la_LDFLAGS = -module -avoid-version -rpath '$(ipseclibdir)' checksum_builder_SOURCES = checksum_builder.c checksum_builder_LDADD = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ @@ -301,20 +330,29 @@ checksum_builder_LDADD = \ $(top_builddir)/src/libcharon/libcharon.la \ $(DLLIB) -BUILT_SOURCES = checksum.c CLEANFILES = checksum.c -INCLUDES = -I$(top_srcdir)/src/libstrongswan -AM_CFLAGS = -rdynamic \ - -DS_PLUGINS=\""${s_plugins}\"" -DS_PATH=\""${top_builddir}/src/libstrongswan/plugins\"" \ - -DH_PLUGINS=\""${h_plugins}\"" -DH_PATH=\""${top_builddir}/src/libhydra/plugins\"" \ - -DP_PLUGINS=\""${p_plugins}\"" -DP_PATH=\""${top_builddir}/src/pluto/plugins\"" \ - -DC_PLUGINS=\""${c_plugins}\"" -DC_PATH=\""${top_builddir}/src/libcharon/plugins\"" - -libs = $(top_builddir)/src/libstrongswan/.libs/libstrongswan.so \ - $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am +INCLUDES = \ + -I$(top_srcdir)/src/libstrongswan \ + -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libcharon + +AM_CFLAGS = -DPLUGINDIR=\"${plugindir}\" -rdynamic $(am__append_1) \ + $(am__append_4) $(am__append_20) $(am__append_22) + +# we keep track of build dependencies in deps and use libs to store the paths +# to the installed libraries. for executables we use the built files directly +# as these are not relinked during installation. +deps = $(top_builddir)/src/libstrongswan/libstrongswan.la \ + $(am__append_2) $(am__append_5) $(am__append_7) \ + $(am__append_9) $(am__append_11) $(am__append_13) \ + $(am__append_15) $(am__append_17) +libs = $(DESTDIR)$(ipseclibdir)/libstrongswan.so $(am__append_3) \ + $(am__append_6) $(am__append_8) $(am__append_10) \ + $(am__append_12) $(am__append_14) $(am__append_16) \ + $(am__append_18) +exes = $(am__append_19) $(am__append_21) $(am__append_23) \ + $(am__append_24) $(am__append_25) +all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -348,39 +386,39 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-ipsecLTLIBRARIES: $(ipsec_LTLIBRARIES) +install-ipseclibLTLIBRARIES: $(ipseclib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(ipsecdir)" || $(MKDIR_P) "$(DESTDIR)$(ipsecdir)" - @list='$(ipsec_LTLIBRARIES)'; test -n "$(ipsecdir)" || list=; \ + test -z "$(ipseclibdir)" || $(MKDIR_P) "$(DESTDIR)$(ipseclibdir)" + @list='$(ipseclib_LTLIBRARIES)'; test -n "$(ipseclibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ipsecdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ipsecdir)"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ipseclibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ipseclibdir)"; \ } -uninstall-ipsecLTLIBRARIES: +uninstall-ipseclibLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(ipsec_LTLIBRARIES)'; test -n "$(ipsecdir)" || list=; \ + @list='$(ipseclib_LTLIBRARIES)'; test -n "$(ipseclibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ipsecdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ipsecdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ipseclibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ipseclibdir)/$$f"; \ done -clean-ipsecLTLIBRARIES: - -test -z "$(ipsec_LTLIBRARIES)" || rm -f $(ipsec_LTLIBRARIES) - @list='$(ipsec_LTLIBRARIES)'; for p in $$list; do \ +clean-ipseclibLTLIBRARIES: + -test -z "$(ipseclib_LTLIBRARIES)" || rm -f $(ipseclib_LTLIBRARIES) + @list='$(ipseclib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libchecksum.la: $(libchecksum_la_OBJECTS) $(libchecksum_la_DEPENDENCIES) - $(libchecksum_la_LINK) -rpath $(ipsecdir) $(libchecksum_la_OBJECTS) $(libchecksum_la_LIBADD) $(LIBS) + $(libchecksum_la_LINK) $(libchecksum_la_OBJECTS) $(libchecksum_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -513,15 +551,13 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am +check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: - for dir in "$(DESTDIR)$(ipsecdir)"; do \ + for dir in "$(DESTDIR)$(ipseclibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am +install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -547,11 +583,10 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-generic clean-ipsecLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am +clean-am: clean-generic clean-ipseclibLTLIBRARIES clean-libtool \ + clean-local clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -571,8 +606,9 @@ info: info-am info-am: -install-data-am: install-ipsecLTLIBRARIES - +install-data-am: install-ipseclibLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: @@ -617,28 +653,39 @@ ps: ps-am ps-am: -uninstall-am: uninstall-ipsecLTLIBRARIES - -.MAKE: all check install install-am install-strip +uninstall-am: uninstall-ipseclibLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: install-am install-data-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-ipsecLTLIBRARIES clean-libtool clean-noinstPROGRAMS \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-ipsecLTLIBRARIES install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-ipsecLTLIBRARIES - - -checksum.c : checksum_builder $(libs) - ./checksum_builder $(libs) > checksum.c + clean-ipseclibLTLIBRARIES clean-libtool clean-local \ + clean-noinstPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-ipseclibLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-hook \ + uninstall-ipseclibLTLIBRARIES + + +checksum.c : checksum_builder $(deps) $(exes) + ./checksum_builder $(libs) $(exes) > checksum.c + +install-data-hook : $(EXTRA_LTLIBRARIES) + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES + +uninstall-hook : + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES + +clean-local : + $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/checksum/checksum_builder.c b/src/checksum/checksum_builder.c index dc1de99c3..670ec76bd 100644 --- a/src/checksum/checksum_builder.c +++ b/src/checksum/checksum_builder.c @@ -19,6 +19,8 @@ #include <dlfcn.h> #include <library.h> +#include <hydra.h> +#include <daemon.h> #include <utils/enumerator.h> /* we need to fake the pluto symbol to dlopen() the xauth plugin */ @@ -62,16 +64,16 @@ static void build_checksum(char *path, char *name, char *sname) fprintf(stderr, "dlopen failed: %s\n", dlerror()); } } - printf("\t{\"%-20s%7u, 0x%08x, %6u, 0x%08x},\n", + printf("\t{\"%-25s%7u, 0x%08x, %6u, 0x%08x},\n", name, fsize, fsum, ssize, ssum); - fprintf(stderr, "\"%-20s%7u / 0x%08x %6u / 0x%08x\n", + fprintf(stderr, "\"%-25s%7u / 0x%08x %6u / 0x%08x\n", name, fsize, fsum, ssize, ssum); } /** - * Build checksums for a set of plugins in a given path prefix + * Build checksums for a set of plugins */ -static void build_plugin_checksums(char *plugins, char *prefix) +static void build_plugin_checksums(char *plugins) { enumerator_t *enumerator; char *plugin, path[256], under[128], sname[128], name[128]; @@ -81,8 +83,8 @@ static void build_plugin_checksums(char *plugins, char *prefix) { snprintf(under, sizeof(under), "%s", plugin); translate(under, "-", "_"); - snprintf(path, sizeof(path), "%s/%s/.libs/libstrongswan-%s.so", - prefix, under, plugin); + snprintf(path, sizeof(path), "%s/libstrongswan-%s.so", + PLUGINDIR, plugin); snprintf(sname, sizeof(sname), "%s_plugin_create", under); snprintf(name, sizeof(name), "%s\",", plugin); build_checksum(path, name, sname); @@ -127,9 +129,15 @@ int main(int argc, char* argv[]) { int i; + /* forces link against libhydra/libcharon, imports symbols needed to + * dlopen plugins */ + hydra = NULL; + charon = NULL; + /* avoid confusing leak reports in build process */ setenv("LEAK_DETECTIVE_DISABLE", "1", 0); - library_init(NULL); + /* don't use a strongswan.conf, forces integrity check to disabled */ + library_init(""); atexit(library_deinit); integrity = integrity_checker_create(NULL); @@ -143,15 +151,24 @@ int main(int argc, char* argv[]) printf("\n"); printf("integrity_checksum_t checksums[] = {\n"); fprintf(stderr, "integrity test data:\n"); - fprintf(stderr, "module name, file size / checksum segment size / checksum\n"); + fprintf(stderr, "module name, file size / checksum " + "segment size / checksum\n"); for (i = 1; i < argc; i++) { build_binary_checksum(argv[i]); } - build_plugin_checksums(S_PLUGINS, S_PATH); - build_plugin_checksums(H_PLUGINS, H_PATH); - build_plugin_checksums(P_PLUGINS, P_PATH); - build_plugin_checksums(C_PLUGINS, C_PATH); +#ifdef S_PLUGINS + build_plugin_checksums(S_PLUGINS); +#endif +#ifdef H_PLUGINS + build_plugin_checksums(H_PLUGINS); +#endif +#ifdef P_PLUGINS + build_plugin_checksums(P_PLUGINS); +#endif +#ifdef C_PLUGINS + build_plugin_checksums(C_PLUGINS); +#endif printf("};\n"); printf("\n"); |