#!/bin/bash

## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

set -x
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace
shopt -s inherit_errexit
shopt -s shift_verbose

file_list=(
  /usr/bin/su
  /usr/bin/sudo
  /usr/bin/sudoedit
  /usr/bin/pkexec
  /usr/bin/doas
  /usr/bin/su-to-root
)

for file_item in "${file_list[@]}"; do
  if test -f "${file_item}"; then
    if test -x "${file_item}"; then
      chmod --verbose o+x -- "${file_item}"
    fi
  fi
done
