--- usr/sbin/pkcs_slot/pkcs_slot.in.orig 2010-07-29 21:28:41.000000000 +0900 +++ usr/sbin/pkcs_slot/pkcs_slot.in 2010-10-22 00:42:38.286985256 +0900 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # @@ -360,7 +360,7 @@ if [ ! -d @localstatedir@/lib/opencryptoki ] then @MKDIR_P@ @localstatedir@/lib/opencryptoki - @CHGRP@ pkcs11 @localstatedir@/lib/opencryptoki + @CHGRP@ @PKCS11GROUP@ @localstatedir@/lib/opencryptoki @CHMOD@ -R g+rwX @localstatedir@/lib/opencryptoki fi @@ -372,9 +372,9 @@ if [ $? -ne 0 ] then mkdir $SOFT_DIR - @CHGRP@ pkcs11 $SOFT_DIR + @CHGRP@ @PKCS11GROUP@ $SOFT_DIR mkdir "$SOFT_DIR"/TOK_OBJ - @CHGRP@ pkcs11 "$SOFT_DIR"/TOK_OBJ + @CHGRP@ @PKCS11GROUP@ "$SOFT_DIR"/TOK_OBJ fi SYS_SLOT="Soft" fi @@ -386,7 +386,7 @@ if [ $? -ne 0 ] then mkdir $TPM_DIR - @CHGRP@ pkcs11 $TPM_DIR + @CHGRP@ @PKCS11GROUP@ $TPM_DIR fi SYS_SLOT="TPM" fi @@ -397,7 +397,7 @@ if [ $? -ne 0 ] then mkdir $CCA_DIR - @CHGRP@ pkcs11 $CCA_DIR + @CHGRP@ @PKCS11GROUP@ $CCA_DIR mkdir "$CCA_DIR"/TOK_OBJ @CHGRP@ pkcs11 "$CCA_DIR"/TOK_OBJ fi @@ -406,7 +406,7 @@ # If we are using a shallow device, make sure that the directory # to store token objects is available, if not create it and change -# the ownership to the pkcs11 group +# the ownership to the @PKCS11GROUP@ group if [ $DEPTH = "ica" ] @@ -415,9 +415,9 @@ if [ $? -ne 0 ] then mkdir $ICA_DIR - @CHGRP@ pkcs11 $ICA_DIR + @CHGRP@ @PKCS11GROUP@ $ICA_DIR mkdir "$ICA_DIR"/TOK_OBJ - @CHGRP@ pkcs11 "$ICA_DIR"/TOK_OBJ + @CHGRP@ @PKCS11GROUP@ "$ICA_DIR"/TOK_OBJ fi SYS_SLOT="ICA" fi @@ -428,9 +428,9 @@ if [ $? -ne 0 ] then mkdir $BCOM_DIR - @CHGRP@ pkcs11 $BCOM_DIR + @CHGRP@ @PKCS11GROUP@ $BCOM_DIR mkdir "$BCOM_DIR"/TOK_OBJ - @CHGRP@ pkcs11 "$BCOM_DIR"/TOK_OBJ + @CHGRP@ @PKCS11GROUP@ "$BCOM_DIR"/TOK_OBJ fi SYS_SLOT="BCOM" fi @@ -441,9 +441,9 @@ if [ $? -ne 0 ] then mkdir $AEP_DIR - @CHGRP@ pkcs11 $AEP_DIR + @CHGRP@ @PKCS11GROUP@ $AEP_DIR mkdir "$AEP_DIR"/TOK_OBJ - @CHGRP@ pkcs11 "$AEP_DIR"/TOK_OBJ + @CHGRP@ @PKCS11GROUP@ "$AEP_DIR"/TOK_OBJ fi SYS_SLOT="AEP" fi @@ -454,9 +454,9 @@ if [ $? -ne 0 ] then mkdir $CR_DIR - @CHGRP@ pkcs11 $CR_DIR + @CHGRP@ @PKCS11GROUP@ $CR_DIR mkdir "$CR_DIR"/TOK_OBJ - @CHGRP@ pkcs11 "$CR_DIR"/TOK_OBJ + @CHGRP@ @PKCS11GROUP@ "$CR_DIR"/TOK_OBJ fi SYS_SLOT="CRNT" fi @@ -477,29 +477,29 @@ if [ $DEPTH = "deep" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|$DEVICE|$DEEP4758_DLL_FN|$DEEP4758_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|$DEVICE|$DEEP4758_DLL|$DEEP4758_INIT" >>$CFGFILE elif [ $DEPTH = "ica" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$ICA_DLL_FN|$ICA_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$ICA_DLL|$ICA_INIT" >>$CFGFILE elif [ $DEPTH = "bcom" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$BCOM_DLL_FN|$BCOM_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$BCOM_DLL|$BCOM_INIT" >>$CFGFILE elif [ $DEPTH = "aep" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$AEP_DLL_FN|$AEP_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$AEP_DLL|$AEP_INIT" >>$CFGFILE elif [ $DEPTH = "cr" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CR_DLL_FN|$CR_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CR_DLL|$CR_INIT" >>$CFGFILE elif [ $DEPTH = "soft" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|FALSE|0|0|1|1|NONE|$SOFT_DLL_FN|$SOFT_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|FALSE|0|0|1|1|NONE|$SOFT_DLL|$SOFT_INIT" >>$CFGFILE elif [ $DEPTH = "tpm" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$TPM_DLL_FN|$TPM_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$TPM_DLL|$TPM_INIT" >>$CFGFILE elif [ $DEPTH = "cca" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL_FN|$CCA_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL|$CCA_INIT" >>$CFGFILE fi @CHMOD@ -R g+wrX @localstatedir@/lib/opencryptoki