diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-09 15:39:56 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-09 15:39:56 +0200 |
commit | bdb80424adb6a3d0b37285f817118592f4e21b18 (patch) | |
tree | f447005becd79b0d2c1e5dee557428f9a66772eb /admin | |
parent | 94c57fa247ba107fce8fc1d1fc355191229dbddc (diff) | |
download | main-bdb80424adb6a3d0b37285f817118592f4e21b18.tar.gz main-bdb80424adb6a3d0b37285f817118592f4e21b18.tar.bz2 main-bdb80424adb6a3d0b37285f817118592f4e21b18.zip |
Securing the security
Diffstat (limited to 'admin')
-rw-r--r-- | admin/api/getUbuntuUpgrades.php | 2 | ||||
-rw-r--r-- | admin/api/getUpdates.php | 2 | ||||
-rw-r--r-- | admin/api/refreshUpdates.php | 2 | ||||
-rw-r--r-- | admin/panes/uptime.php | 2 | ||||
-rw-r--r-- | admin/private/permissions.json | 8 | ||||
-rw-r--r-- | admin/private/permissions.php | 2 |
6 files changed, 12 insertions, 6 deletions
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("<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> is available, use <code>do-release-upgrade</code> to upgrade", "<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> est disponible, exécutez la commande <code>do-release-upgrade</code> 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 @@ <?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-exec("bash -c \"sudo apt-get update", $ret);
\ No newline at end of file +exec("bash -c \"sudo mtsp-apt-get-1", $ret);
\ No newline at end of file diff --git a/admin/panes/uptime.php b/admin/panes/uptime.php index f0d0e7c..199df52 100644 --- a/admin/panes/uptime.php +++ b/admin/panes/uptime.php @@ -57,7 +57,7 @@ ?></b> <?= l("of data has been collected to ensure easy system maintenance and audit", "de données ont été recueillies pour faciliter la maintenance du système et les audits de sécurité") ?>
</li>
<li class="list-group-item" id="logsummary">
- Calcul en cours...
+ <?= l("Calculating...", "Calcul en cours...") ?>
</li>
<!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
<script>
diff --git a/admin/private/permissions.json b/admin/private/permissions.json index 32be506..10c9362 100644 --- a/admin/private/permissions.json +++ b/admin/private/permissions.json @@ -1,5 +1,5 @@ { - "74bca7d2-4694-477c-8bc1-9003315abbee": [ + "51daefd0-656d-4cf7-8ac1-ea94d8b17780": [ "login", "home", "serverTemp", @@ -18,5 +18,11 @@ "quotas", "getQuota", "neutroning" + ], + "74bca7d2-4694-477c-8bc1-9003315abbee": [ + "*", + "neutron", + "addresses", + "login" ] }
\ No newline at end of file diff --git a/admin/private/permissions.php b/admin/private/permissions.php index 6ad7057..8e6f456 100644 --- a/admin/private/permissions.php +++ b/admin/private/permissions.php @@ -11,7 +11,7 @@ if (isset($_OVERRIDEPERMISSION)) { $permsOkay = false; foreach ($perms as $user => $uperms) { if ($user === $_DATA['id']) { - if (in_array($requested, $uperms)) { + if (in_array($requested, $uperms) || in_array("*", $uperms)) { $permsOkay = true; } } |