[node-patches] Change in ovirt-node[master]: Add function to check for fips_enabled mode
Ryan Harper
ryanh at us.ibm.com
Tue Apr 9 16:05:07 UTC 2013
Ryan Harper has uploaded a new change for review.
Change subject: Add function to check for fips_enabled mode
......................................................................
Add function to check for fips_enabled mode
Helper function to control behavior when system is booted in fips=1 mode
Change-Id: I7ac901817a2b7b8685ee77c2ffb515c65e60a94c
Signed-off-by: Ryan Harper <ryanh at us.ibm.com>
---
M scripts/ovirtnode/ovirtfunctions.py
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/57/13757/1
diff --git a/scripts/ovirtnode/ovirtfunctions.py b/scripts/ovirtnode/ovirtfunctions.py
index d7cdde9..e7be5d9 100644
--- a/scripts/ovirtnode/ovirtfunctions.py
+++ b/scripts/ovirtnode/ovirtfunctions.py
@@ -335,6 +335,14 @@
return False
return False
+def is_fips_enabled():
+ fips_path = "/proc/sys/crypto/fips_enabled"
+ if os.path.exists(fips_path):
+ with open(fips_path) as fips_enabled:
+ if str(fips_enabled) == "1":
+ return True
+ return False
+
def is_stateless():
# check if theres a key first
if OVIRT_VARS.has_key("OVIRT_STATELESS"):
--
To view, visit http://gerrit.ovirt.org/13757
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ac901817a2b7b8685ee77c2ffb515c65e60a94c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh at us.ibm.com>
More information about the node-patches
mailing list