From 0229a0518eebbd03e8b78702745dc99db3fcfe88 Mon Sep 17 00:00:00 2001 From: rrelyea Date: Wed, 14 Feb 2007 00:46:29 +0000 Subject: Make file clean up: don't distribute .a and .la files. fix build problem when --enable-pk11install is not set. Add dist values so make dist includes the correct files. git-svn-id: http://svn.fedorahosted.org/svn/coolkey/trunk@49 fba4d07e-fe0f-4d7f-8147-e0026e666dc0 --- src/coolkey/Makefile.am | 6 +++++- src/coolkey/Makefile.in | 26 +++++++++++++++++--------- src/coolkey/machdep.cpp | 2 ++ src/coolkey/slot.cpp | 14 ++++++-------- src/libckyapplet/Makefile.am | 11 +++++++++++ src/libckyapplet/Makefile.in | 23 ++++++++++++++++++----- 6 files changed, 59 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/coolkey/Makefile.am b/src/coolkey/Makefile.am index 36545bf..f3011df 100644 --- a/src/coolkey/Makefile.am +++ b/src/coolkey/Makefile.am @@ -21,6 +21,7 @@ SUBDIRS = AM_CPP_FLAGS = +EXTRA_DIST = coolkeypk11.def pkcs11dir = $(libdir)/pkcs11 pkcs11_LTLIBRARIES = libcoolkeypk11.la @@ -33,7 +34,6 @@ libcoolkeypk11_la_SOURCES = \ object.cpp \ PKCS11Exception.cpp \ slot.cpp \ - config.h \ locking.h \ log.h \ machdep.h \ @@ -65,6 +65,10 @@ coolkeypk11.sym: coolkeypk11.def clean-generic: rm -f coolkeypk11.sym +# remove the static and libtool libraries if necessary +install-data-hook: + rm -f $(DESTDIR)$(pkcs11dir)/libcoolkeypk11.a + rm -f $(DESTDIR)$(pkcs11dir)/libcoolkeypk11.la #MODULE = coolkeypk11 diff --git a/src/coolkey/Makefile.in b/src/coolkey/Makefile.in index f6a1899..908371b 100644 --- a/src/coolkey/Makefile.in +++ b/src/coolkey/Makefile.in @@ -234,6 +234,7 @@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = AM_CPP_FLAGS = +EXTRA_DIST = coolkeypk11.def pkcs11dir = $(libdir)/pkcs11 pkcs11_LTLIBRARIES = libcoolkeypk11.la libcoolkeypk11_la_SOURCES = \ @@ -245,7 +246,6 @@ libcoolkeypk11_la_SOURCES = \ object.cpp \ PKCS11Exception.cpp \ slot.cpp \ - config.h \ locking.h \ log.h \ machdep.h \ @@ -655,6 +655,8 @@ info: info-recursive info-am: install-data-am: install-pkcs11LTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: @@ -692,14 +694,15 @@ uninstall-info: uninstall-info-recursive distclean-compile distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-pkcs11LTLIBRARIES \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-info-am uninstall-pkcs11LTLIBRARIES + install-data-am install-data-hook install-exec install-exec-am \ + install-info install-info-am install-man \ + install-pkcs11LTLIBRARIES install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am \ + uninstall-pkcs11LTLIBRARIES # @@ -713,6 +716,11 @@ coolkeypk11.sym: coolkeypk11.def clean-generic: rm -f coolkeypk11.sym +# remove the static and libtool libraries if necessary +install-data-hook: + rm -f $(DESTDIR)$(pkcs11dir)/libcoolkeypk11.a + rm -f $(DESTDIR)$(pkcs11dir)/libcoolkeypk11.la + #MODULE = coolkeypk11 #REQUIRES = ckyapplet zlib #USE_STATIC_RTL=1 diff --git a/src/coolkey/machdep.cpp b/src/coolkey/machdep.cpp index 773b2c3..180f6f4 100644 --- a/src/coolkey/machdep.cpp +++ b/src/coolkey/machdep.cpp @@ -247,7 +247,9 @@ SHMem::initSegment(const char *name, int size, bool &init) // from getSHMemAddr. return NULL; } + int mask = umask(0); int ret = mkdir (MEMSEGPATH, 0777); + umask(mask); if ((ret == -1) && (errno != EEXIST)) { delete shmemData; return NULL; diff --git a/src/coolkey/slot.cpp b/src/coolkey/slot.cpp index ef18e83..af151c3 100644 --- a/src/coolkey/slot.cpp +++ b/src/coolkey/slot.cpp @@ -625,14 +625,10 @@ Slot::connectToToken() return; } state |= CAC_CARD | APPLET_SELECTABLE | APPLET_PERSONALIZED; - /* ARG CAC is evil. once you've selected an applet, you cannot - * select the card manager unless you reset the card... - * ... even removing and reinserting the card does not change the - * applet selection, - * do so reset the card now so we can get the CUID - * NOTE: this will cause other apps to loose login state! - CKYCardConnection_Reset(conn); - readCUID(); /* get the CUID before we loose the ability to */ + /* skip the read of the cuid. We really don't need it and, + * the only way to get it from the cac is to reset it. + * other apps may be running now, so resetting the cac is a bit + * unfriendly */ isVersion1Key = 0; needLogin = 1; @@ -692,6 +688,8 @@ Slot::invalidateLogin(bool hard) { if (isVersion1Key) { if (hard) { + reverify = false; /* no need to revalidate in the future, + * we're clearing the nonce now */ nonceValid = false; CKYBuffer_Zero(&nonce); CKYBuffer_Resize(&nonce,8); diff --git a/src/libckyapplet/Makefile.am b/src/libckyapplet/Makefile.am index c23d1c1..e1e93e4 100644 --- a/src/libckyapplet/Makefile.am +++ b/src/libckyapplet/Makefile.am @@ -23,6 +23,12 @@ SUBDIRS = AM_CFLAGS = +EXTRA_DIST = \ + cky_list.i \ + dynlink_win.c \ + dynlink_unix.c \ + dynlink_mac.c + # bleh what do I add just to get static but pic libraries? bogusdir = $(libdir)/bogus lib_LTLIBRARIES = libckyapplet.la @@ -50,5 +56,10 @@ noinst_HEADERS = \ cky_basei.h \ dynlink.h +# remove the static and libtool libraries +install-data-hook: + rm -f $(DESTDIR)$(libdir)/libckyapplet.a + rm -f $(DESTDIR)$(libdir)/libckyapplet.la + pcdir = $(libdir)/pkgconfig pc_DATA = libckyapplet.pc diff --git a/src/libckyapplet/Makefile.in b/src/libckyapplet/Makefile.in index bc1cccf..f2254b3 100644 --- a/src/libckyapplet/Makefile.in +++ b/src/libckyapplet/Makefile.in @@ -233,6 +233,12 @@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = AM_CFLAGS = +EXTRA_DIST = \ + cky_list.i \ + dynlink_win.c \ + dynlink_unix.c \ + dynlink_mac.c + # bleh what do I add just to get static but pic libraries? bogusdir = $(libdir)/bogus @@ -667,6 +673,8 @@ info: info-recursive info-am: install-data-am: install-nobase_includeHEADERS install-pcDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-libLTLIBRARIES @@ -705,17 +713,22 @@ uninstall-info: uninstall-info-recursive distclean-compile distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-libLTLIBRARIES install-man \ - install-nobase_includeHEADERS install-pcDATA install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ + install-data-am install-data-hook install-exec install-exec-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-nobase_includeHEADERS install-pcDATA \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-libLTLIBRARIES \ uninstall-nobase_includeHEADERS uninstall-pcDATA + +# remove the static and libtool libraries +install-data-hook: + rm -f $(DESTDIR)$(libdir)/libckyapplet.a + rm -f $(DESTDIR)$(libdir)/libckyapplet.la # 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. .NOEXPORT: -- cgit v1.2.3