diff --git a/.etckeeper b/.etckeeper index 273ba7b..e2210bf 100755 --- a/.etckeeper +++ b/.etckeeper @@ -4781,6 +4781,7 @@ maybe chmod 0755 'qemu-kvm' maybe chmod 0755 'rc.d' maybe chmod 0755 'rc.d/init.d' maybe chmod 0644 'rc.d/init.d/README' +maybe chmod 0755 'rc.d/init.d/bestcrypt' maybe chmod 0644 'rc.d/init.d/functions' maybe chmod 0755 'rc.d/init.d/network' maybe chmod 0755 'rc.d/init.d/rundeckd' @@ -5351,6 +5352,7 @@ maybe chmod 0644 'udev/rules.d/70-persistent-ipoib.rules' maybe chmod 0644 'udev/rules.d/70-snap.snapd.rules' maybe chmod 0644 'udev/rules.d/75-cd-aliases-generator.rules' maybe chmod 0644 'udev/rules.d/75-persistent-net-generator.rules' +maybe chmod 0644 'udev/rules.d/90-bcrypt-device-permissions.rules' maybe chmod 0644 'udev/udev.conf' maybe chmod 0755 'unbound' maybe chmod 0644 'unbound/icannbundle.pem' diff --git a/rc.d/init.d/bestcrypt b/rc.d/init.d/bestcrypt new file mode 100755 index 0000000..2d7efbf --- /dev/null +++ b/rc.d/init.d/bestcrypt @@ -0,0 +1,93 @@ +#!/bin/sh +# Copyright 2010-2016 Jetico Inc. Oy +# All rights reserved. + +# chkconfig: 345 99 01 +# description: BestCrypt for Linux +# +### BEGIN INIT INFO +# Provides: bestcrypt +# Required-Start: dkms +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: BestCrypt for Linux +# Description: BestCrypt for Linux +### END INIT INFO + + +KERNEL_VERSION=`uname -r|sed 's/\(.\..\).*/\1/'` + +case "$1" in + start) + echo "Starting BestCrypt..." + rm -rf /dev/bcrypt?* 2>/dev/null + + depmod -a + + modprobe bestcrypt + modprobe bc_blowfish + modprobe bc_des + modprobe bc_gost + modprobe bc_camellia + modprobe bc_twofish + modprobe bc_bf448 + modprobe bc_bf128 + modprobe bc_3des + modprobe bc_idea + modprobe bc_rijn + modprobe bc_cast + modprobe bc_serpent + modprobe bc_rc6 + +#modprobe bc_noop + + echo "Started." + ;; + + stop) + echo "Stopping BestCrypt..." + + if bctool is_guard_on ; then + echo "on" > "$HOME"/.config/Jetico/guard_status + else + echo "off" > "$HOME"/.config/Jetico/guard_status + fi + + bctool umountall + + for i in `lsmod | egrep "^\"?bc_.*\"?" | awk '{print $1}' `; do + rmmod $i; + done + + rmmod bestcrypt + + echo "Stopped." + ;; + + status) + if [ -f /sys/class/misc/bestcrypt ] ; then + echo "BestCrypt driver is loaded. List of loaded algorithms:\n" + ls /sys/class/misc/bectcrypt/plugins + else + echo "SysFS entry unavailable, possibly driver is not running." + fi + + if bctool is_guard_on ; then + echo "BestCrypt container file guard is on" + fi + + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit 0 + diff --git a/rc.d/rc0.d/K01bestcrypt b/rc.d/rc0.d/K01bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc0.d/K01bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc1.d/K01bestcrypt b/rc.d/rc1.d/K01bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc1.d/K01bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc2.d/S99bestcrypt b/rc.d/rc2.d/S99bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc2.d/S99bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc3.d/S99bestcrypt b/rc.d/rc3.d/S99bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc3.d/S99bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc4.d/S99bestcrypt b/rc.d/rc4.d/S99bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc4.d/S99bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc5.d/S99bestcrypt b/rc.d/rc5.d/S99bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc5.d/S99bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/rc.d/rc6.d/K01bestcrypt b/rc.d/rc6.d/K01bestcrypt new file mode 120000 index 0000000..3e0e04e --- /dev/null +++ b/rc.d/rc6.d/K01bestcrypt @@ -0,0 +1 @@ +../init.d/bestcrypt \ No newline at end of file diff --git a/udev/rules.d/90-bcrypt-device-permissions.rules b/udev/rules.d/90-bcrypt-device-permissions.rules new file mode 100644 index 0000000..9011a7d --- /dev/null +++ b/udev/rules.d/90-bcrypt-device-permissions.rules @@ -0,0 +1,2 @@ +KERNEL=="bcrypt*", MODE="0666", ENV{UDISKS_PRESENTATION_NOPOLICY}="1" +KERNEL=="bestcrypt", MODE="0755"