Prevent root using clone|pull|checkout commands

This commit is contained in:
0x1eef 2024-05-22 20:48:51 -03:00
parent f125413729
commit 20e095019a
3 changed files with 15 additions and 0 deletions

View file

@ -24,6 +24,11 @@ printerr() {
## ##
# main # main
if [ "$(id -u)" = "0" ]; then
printerr "you must be a user other than root"
exit 1
fi
if ! "${libexec}"/isportzap-member; then if ! "${libexec}"/isportzap-member; then
printerr "$(id -un) is not a member of _portzap" printerr "$(id -un) is not a member of _portzap"
exit 1 exit 1

View file

@ -25,6 +25,11 @@ printerr() {
## ##
# main # main
if [ "$(id -u)" = "0" ]; then
printerr "you must be a user other than root"
exit 1
fi
if ! "${libexec}"/isportzap-member; then if ! "${libexec}"/isportzap-member; then
printerr "$(id -un) is not a member of _portzap" printerr "$(id -un) is not a member of _portzap"
exit 1 exit 1

View file

@ -23,6 +23,11 @@ printerr() {
## ##
# main # main
if [ "$(id -u)" = "0" ]; then
printerr "you must be a user other than root"
exit 1
fi
if ! "${libexec}"/isportzap-member; then if ! "${libexec}"/isportzap-member; then
printerr "$(id -un) is not a member of _portzap" printerr "$(id -un) is not a member of _portzap"
exit 1 exit 1