From bdb80424adb6a3d0b37285f817118592f4e21b18 Mon Sep 17 00:00:00 2001 From: Minteck Date: Mon, 9 Aug 2021 15:39:56 +0200 Subject: Securing the security --- admin/api/getUbuntuUpgrades.php | 2 +- admin/api/getUpdates.php | 2 +- admin/api/refreshUpdates.php | 2 +- admin/panes/uptime.php | 2 +- admin/private/permissions.json | 8 +++++++- admin/private/permissions.php | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) (limited to 'admin') diff --git a/admin/api/getUbuntuUpgrades.php b/admin/api/getUbuntuUpgrades.php index 8273036..ca49f38 100644 --- a/admin/api/getUbuntuUpgrades.php +++ b/admin/api/getUbuntuUpgrades.php @@ -2,7 +2,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; -exec("bash -c \"sudo do-release-upgrade -c | grep 'New release'\"", $ret); +exec("bash -c \"sudo mtsp-do-release-upgrade | grep 'New release'\"", $ret); if (count($ret) === 1) { echo(l("Ubuntu " . explode("'", $ret[0])[1] . " is available, use do-release-upgrade to upgrade", "Ubuntu " . explode("'", $ret[0])[1] . " est disponible, exécutez la commande do-release-upgrade pour effectuer la mise à niveau")); } else { diff --git a/admin/api/getUpdates.php b/admin/api/getUpdates.php index 099dd67..5d9c373 100644 --- a/admin/api/getUpdates.php +++ b/admin/api/getUpdates.php @@ -3,7 +3,7 @@ header("Content-Type: application/json"); require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; -exec("bash -c \"sudo apt-get upgrade -s| grep ^Inst\"", $ret); +exec("bash -c \"sudo mtsp-apt-get-2| grep ^Inst\"", $ret); $data = []; $data["count"] = count($ret); $data["packages"] = []; diff --git a/admin/api/refreshUpdates.php b/admin/api/refreshUpdates.php index 39ac9ed..ec4c707 100644 --- a/admin/api/refreshUpdates.php +++ b/admin/api/refreshUpdates.php @@ -1,4 +1,4 @@
  • - Calcul en cours... +