opencryptoki/opencryptoki-2.4.2-locks.patch
Dan Horák 18aa734070 new upstream release 2.4.2
- add pkcs_slot man page
- don't add root to the pkcs11 group
2012-06-21 13:49:09 +02:00

31 lines
899 B
Diff

diff --git a/usr/Makefile.am b/usr/Makefile.am
index bced120..20352d5 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -5,6 +5,6 @@ endif
SUBDIRS = lib $(DAEMONDIRS)
install-data-hook:
- $(MKDIR_P) $(lockdir)
- $(CHGRP) pkcs11 $(lockdir)
- $(CHMOD) 0770 $(lockdir)
+ $(MKDIR_P) $(DESTDIR)$(lockdir)
+ $(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
+ $(CHMOD) 0770 $(DESTDIR)$(lockdir)
diff --git a/usr/Makefile.am b/usr/Makefile.am
index 20352d5..5d42b0f 100644
--- a/usr/Makefile.am
+++ b/usr/Makefile.am
@@ -6,5 +6,9 @@ SUBDIRS = lib $(DAEMONDIRS)
install-data-hook:
$(MKDIR_P) $(DESTDIR)$(lockdir)
- $(CHGRP) pkcs11 $(DESTDIR)$(lockdir)
- $(CHMOD) 0770 $(DESTDIR)$(lockdir)
+ if test `id` = 0; then \
+ $(CHGRP) pkcs11 $(DESTDIR)$(lockdir); \
+ $(CHMOD) 0770 $(DESTDIR)$(lockdir); \
+ else \
+ echo "Not running as root, you must set the correct group and mode manually!"; \
+ fi