Merge pull request #12521 from Security-Onion-Solutions/jertel/status

gracefully handle status check failure on ubuntu
This commit is contained in:
Jason Ertel
2024-03-07 13:29:48 -05:00
committed by GitHub

View File

@@ -47,10 +47,14 @@ def check_for_fps():
fps = 1
except FileNotFoundError:
fn = '/proc/sys/crypto/' + feat_full + '_enabled'
with open(fn, 'r') as f:
contents = f.read()
if '1' in contents:
fps = 1
try:
with open(fn, 'r') as f:
contents = f.read()
if '1' in contents:
fps = 1
except:
# Unknown, so assume 0
fps = 0
with open('/opt/so/log/sostatus/lks_enabled', 'w') as f:
f.write(str(fps))