Skip to content

Commit

Permalink
Merge pull request #12521 from Security-Onion-Solutions/jertel/status
Browse files Browse the repository at this point in the history
gracefully handle status check failure on ubuntu
  • Loading branch information
jertel authored Mar 7, 2024
2 parents 1633527 + fffef9b commit e2567dc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions salt/common/tools/sbin/so-common-status-check
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e2567dc

Please sign in to comment.