From db74b7e34fea42c6b230203fa92b42e1b661bd65 Mon Sep 17 00:00:00 2001 From: iVAN <88724353+ivan-hc@users.noreply.github.com> Date: Thu, 27 Jun 2024 03:49:27 +0200 Subject: [PATCH] Stop patching the "remove" script --- APP-MANAGER | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/APP-MANAGER b/APP-MANAGER index 6ce176dc6..c6d5633d1 100755 --- a/APP-MANAGER +++ b/APP-MANAGER @@ -281,25 +281,6 @@ function _online_check() { fi } -####################### -# SECURE INSTALLED APPS -####################### - -function _prevent_apps_from_being_removed_by_third_parties() { - # Add a security layer to scripts named "remove" of installed apps to prevent file removal by non-privileged users - if [ "$AMCLI" == am ] 2>/dev/null; then - for r in /opt/*/; do - if test -f "$r"/remove; then - if ! grep -q '"$SUDO_COMMAND"' "$r"/remove 2> /dev/null; then - if [[ "$r" != "/opt/am/" ]]; then - sed -i '1 a if [ -z "$SUDO_COMMAND" ]; then echo "Permission denied"; exit 1; fi' "$r"/remove 2> /dev/null - fi - fi - fi - done - fi -} - ########################################### # FUNCTIONS RELATED TO THE DATABASE OF APPS ########################################### @@ -985,7 +966,6 @@ function _use_module() { } _am_security_check -_prevent_apps_from_being_removed_by_third_parties 2> /dev/null _am_databases_check "$@" case "$1" in