Add root constraint to libexec/portzap/portzap-install

This commit is contained in:
0x1eef 2024-04-19 05:53:40 -03:00
parent 2ab35924c8
commit b688aa3f78
2 changed files with 4 additions and 1 deletions

View file

@ -60,7 +60,6 @@ case $1 in
doas -u _portzap "${libexec}"/portzap-erase "${gitdir}" "${installdir}"
;;
"install")
require_root
require_dependency "git doas"
"${libexec}"/portzap-install "${gitdir}" "${installdir}" "${revision}"
;;

View file

@ -57,6 +57,10 @@ run_install()
##
# main
if [ "$(id -u)" != "0" ]; then
echo "[-] This command must be run as root"
exit 1
fi
set -x
umask u=rwX,g=rwX,o=
cd "${gitdir}"