From 94def6ae92b7f5098b06553762c68da4ff19e11f Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 29 Jul 2021 16:21:50 +0500 Subject: [PATCH] security fix: CP-05: Command Line Tools --- install/install.py | 9 +++++++++ plogical/upgrade.py | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/install/install.py b/install/install.py index a26b2dbc4..732486032 100755 --- a/install/install.py +++ b/install/install.py @@ -657,6 +657,15 @@ class preFlightsChecks: ### + WriteToFile = open('/etc/fstab', 'a') + WriteToFile.write('proc /proc proc defaults,hidepid=2 0 0\n') + WriteToFile.close() + + command = 'mount -o remount,rw,hidepid=2 /proc' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + ### + def install_unzip(self): self.stdOut("Install unzip") try: diff --git a/plogical/upgrade.py b/plogical/upgrade.py index c5ea437cc..4184f4c82 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2073,6 +2073,17 @@ echo $oConfig->Save() ? 'Done' : 'Error'; command = 'chmod 600 /usr/local/CyberCP/public/rainloop.php' Upgrade.executioner(command, 0) + ### + + WriteToFile = open('/etc/fstab', 'a') + WriteToFile.write('proc /proc proc defaults,hidepid=2 0 0\n') + WriteToFile.close() + + command = 'mount -o remount,rw,hidepid=2 /proc' + Upgrade.executioner(command, 0) + + ### + Upgrade.stdOut("Permissions updated.") except BaseException as msg: