nmav pushed to caml-crush (master). "pkcs11proxyd-softhsm-ctl: require admin access"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 2 11:01:51 UTC 2015
>From 22af75c576b6377a743e06ff76fedfe26d9ddf8e Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav at redhat.com>
Date: Thu, 2 Apr 2015 11:57:57 +0200
Subject: pkcs11proxyd-softhsm-ctl: require admin access
diff --git a/pkcs11proxyd-softhsm-ctl b/pkcs11proxyd-softhsm-ctl
index b77ba6d..a03d3fe 100755
--- a/pkcs11proxyd-softhsm-ctl
+++ b/pkcs11proxyd-softhsm-ctl
@@ -10,11 +10,23 @@ case "$1" in
fi
;;
"lock")
- ln -sf /etc/pkcs11proxyd/filter-softhsm-locked.conf /etc/pkcs11proxyd/filter-softhsm.conf
+ id|grep root >/dev/null 2>&1
+ if [ $? != 0 ];then
+ echo "This command can only be run by the administrator"
+ exit 1
+ fi
+
+ ln -sf /var/lib/pkcs11proxyd/filter-softhsm-locked.conf /etc/pkcs11proxyd/filter-softhsm.conf
systemctl restart pkcs11proxyd-softhsm
;;
"unlock")
- ln -sf /etc/pkcs11proxyd/filter-softhsm-unlocked.conf /etc/pkcs11proxyd/filter-softhsm.conf
+ id|grep root >/dev/null 2>&1
+ if [ $? != 0 ];then
+ echo "This command can only be run by the administrator"
+ exit 1
+ fi
+
+ ln -sf /var/lib/pkcs11proxyd/filter-softhsm-unlocked.conf /etc/pkcs11proxyd/filter-softhsm.conf
systemctl restart pkcs11proxyd-softhsm
;;
*)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/caml-crush.git/commit/?h=master&id=22af75c576b6377a743e06ff76fedfe26d9ddf8e
More information about the scm-commits
mailing list