Ensure that the permissions are right for the token-specific directories under $(localstatedir). Added macros to look for chown and chmod to configure script to we can use them safely.
Also remove execution bits from init_token.sh.in and ock_tests.sh.in, since they are being set upon processing. Signed-off-by: Klaus Heinrich Kiwi <[email protected]> --- configure.in | 1 + usr/lib/pkcs11/cca_stdll/Makefile.am | 2 ++ usr/lib/pkcs11/ica_s390_stdll/Makefile.am | 2 ++ usr/lib/pkcs11/soft_stdll/Makefile.am | 2 ++ usr/lib/pkcs11/tpm_stdll/Makefile.am | 2 ++ 5 files changed, 9 insertions(+), 0 deletions(-) mode change 100755 => 100644 testcases/init_token.sh.in mode change 100755 => 100644 testcases/ock_tests.sh.in diff --git a/configure.in b/configure.in index 12b06a3..522e5b6 100644 --- a/configure.in +++ b/configure.in @@ -37,6 +37,7 @@ AC_PATH_PROG([USERMOD], [usermod], [/usr/sbin/usermod]) AC_PATH_PROG([GROUPADD], [groupadd], [/usr/sbin/groupadd]) AC_PATH_PROG([CAT], [cat], [/bin/cat]) AC_PATH_PROG([CHMOD], [chmod], [/bin/chmod]) +AC_PATH_PROG([CHOWN], [chown], [/bin/chown]) AC_PATH_PROG([CHGRP], [chgrp], [/bin/chgrp]) AC_PROG_SED AC_PROG_MKDIR_P diff --git a/testcases/init_token.sh.in b/testcases/init_token.sh.in old mode 100755 new mode 100644 diff --git a/testcases/ock_tests.sh.in b/testcases/ock_tests.sh.in old mode 100755 new mode 100644 diff --git a/usr/lib/pkcs11/cca_stdll/Makefile.am b/usr/lib/pkcs11/cca_stdll/Makefile.am index f70ada9..07a7ed4 100644 --- a/usr/lib/pkcs11/cca_stdll/Makefile.am +++ b/usr/lib/pkcs11/cca_stdll/Makefile.am @@ -55,6 +55,8 @@ install-data-hook: cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && \ ln -sf libpkcs11_cca.so PKCS11_CCA.so $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/ccatok + $(CHOWN) :pkcs11 $(DESTDIR)$(localstatedir)/lib/opencryptoki/ccatok + $(CHMOD) g+rwX $(DESTDIR)$(localstatedir)/lib/opencryptoki/ccatok uninstall-hook: if test -d $(DESTDIR)/$(libdir)/opencryptoki/stdll; then \ diff --git a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am index c482290..177bc06 100644 --- a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am +++ b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am @@ -30,6 +30,8 @@ install-data-hook: cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \ ln -sf libpkcs11_ica.so PKCS11_ICA.so $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/lite + $(CHOWN) :pkcs11 $(DESTDIR)$(localstatedir)/lib/opencryptoki/lite + $(CHMOD) g+rwX $(DESTDIR)$(localstatedir)/lib/opencryptoki/lite uninstall-hook: if test -d $(DESTDIR)$(libdir)/opencryptoki/stdll; then \ diff --git a/usr/lib/pkcs11/soft_stdll/Makefile.am b/usr/lib/pkcs11/soft_stdll/Makefile.am index e074a50..99f1450 100644 --- a/usr/lib/pkcs11/soft_stdll/Makefile.am +++ b/usr/lib/pkcs11/soft_stdll/Makefile.am @@ -51,6 +51,8 @@ install-data-hook: cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \ ln -sf libpkcs11_sw.so PKCS11_SW.so $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/swtok + $(CHOWN) :pkcs11 $(DESTDIR)$(localstatedir)/lib/opencryptoki/swtok + $(CHMOD) g+rwX $(DESTDIR)$(localstatedir)/lib/opencryptoki/swtok uninstall-hook: if test -d $(DESTDIR)$(libdir)/opencryptoki/stdll; then \ diff --git a/usr/lib/pkcs11/tpm_stdll/Makefile.am b/usr/lib/pkcs11/tpm_stdll/Makefile.am index 3ce5ffe..0dba0e7 100644 --- a/usr/lib/pkcs11/tpm_stdll/Makefile.am +++ b/usr/lib/pkcs11/tpm_stdll/Makefile.am @@ -55,3 +55,5 @@ noinst_HEADERS = h_extern.h tok_spec_struct.h defs.h \ install-data-hook: $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/tpm + $(CHOWN) :pkcs11 $(DESTDIR)$(localstatedir)/lib/opencryptoki/tpm + $(CHMOD) g+rwX $(DESTDIR)$(localstatedir)/lib/opencryptoki/tpm -- 1.7.2.1 ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Opencryptoki-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech
