Skip to content

[device/juniper] Mitigation for security vulnerability #11838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 22, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@
# components is subject to the terms and conditions of the respective license
# as noted in the Third-Party source code file.

import binascii
import os
import sys
import binascii
import subprocess
from sonic_eeprom import eeprom_tlvinfo

if sys.version_info[0] < 3:
import commands
else:
import subprocess as commands


def fantype_detect():

Expand All @@ -56,11 +51,9 @@ def fantype_detect():
for filename in os.listdir(refpgaTMC_path):
if filename.endswith('_type'):
fantype_path = os.path.join(refpgaTMC_path, filename)
cat_string = "cat "
fantype_string = cat_string + fantype_path
status, fan_type = commands.getstatusoutput(fantype_string)
if ((fan_type == AFO) or (fan_type == AFI)):
return fan_type
p = subprocess.run(["cat", fantype_path])
if ((p.stdout == AFO) or (p.stdout == AFI)):
return p.stdout
else:
pass

Expand Down