mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-10 11:12:51 +01:00
Update telegraf script
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -80,10 +80,13 @@ def main():
|
||||
proc = subprocess.run(['id', '-u'], stdout=subprocess.PIPE, encoding="utf-8")
|
||||
if proc.stdout.strip() != "0":
|
||||
fail("This program must be run as root")
|
||||
|
||||
# Ensure that umask is 0022 so that files created by this script have rw-r-r permissions
|
||||
org_umask = os.umask(0o022)
|
||||
check_needs_restarted()
|
||||
check_for_fips()
|
||||
check_for_luks()
|
||||
# Restore umask to whatever value was set before this script was run. STIG sets to 0077 rw---
|
||||
os.umask(org_umask)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
|
||||
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
||||
|
||||
cat /var/log/sostatus/features-check.log
|
||||
FIPS_ENABLED=$(cat /var/log/sostatus/fips_enabled)
|
||||
LUKS_ENABLED=$(cat /var/log/sostatus/luks_enabled)
|
||||
|
||||
echo "features fips=$FIPS_ENABLED"
|
||||
echo "features luks=$LUKS_ENABLED"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user