summaryrefslogtreecommitdiff
path: root/security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in
diff options
context:
space:
mode:
Diffstat (limited to 'security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in')
-rw-r--r--security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in41
1 files changed, 41 insertions, 0 deletions
diff --git a/security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in b/security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in
new file mode 100644
index 000000000000..eab5c2b3b78a
--- /dev/null
+++ b/security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in
@@ -0,0 +1,41 @@
+--- usr/sbin/pkcs11_startup/pkcs11_startup.in.orig 2010-07-29 21:28:41.000000000 +0900
++++ usr/sbin/pkcs11_startup/pkcs11_startup.in 2010-10-22 00:57:35.508983672 +0900
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ #
+ #
+@@ -310,29 +310,20 @@
+
+
+ # Create the pkcs11 group if it does not exist...
+-cat /etc/group|grep pkcs11 >/dev/null 2>&1
++cat /etc/group|grep @PKCS11GROUP@ >/dev/null 2>&1
+ rc=$?
+ if [ $rc = 1 ]
+ then
+ if [ -x @GROUPADD@ ]
+ then
+- @GROUPADD@ pkcs11 >/dev/null 2>&1
++ @GROUPADD@ @PKCS11GROUP@ >/dev/null 2>&1
+
+ else
+- echo "Couldn't execute @GROUPADD@. Please add the group 'pkcs11' manually."
++ echo "Couldn't execute @GROUPADD@. Please add the group '@PKCS11GROUP@' manually."
+ fi
+ fi
+
+
+-if [ -x @USERMOD@ -a -x @ID@ ]
+-then
+- # add the pkcs group
+- # replace spaces by commas
+- @USERMOD@ -G $( @ID@ --groups --name root | @SED@ -e 'y/ /,/'),pkcs11 root
+-else
+- echo "Couldn't execute @USERMOD@. Please add root to the group 'pkcs11' manually."
+-fi
+-
+
+ # For each card run the status command and if successful
+ # create the odm stanza for the file