kiss: don't run as root

This commit is contained in:
Dylan Araps 2020-01-27 13:49:41 +02:00
parent 1376de2f31
commit 8240ae8fe0
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 4 additions and 0 deletions

4
kiss
View File

@ -1139,6 +1139,10 @@ main() {
# from leaking to stdout.
set +x
# Prevent the package manager from running as root. The package
# manager will elevate permissions where needed.
[ "$(id -u)" != 0 ] || die "kiss must be run as a normal user"
# Set the location to the repository and package database.
pkg_db=var/db/kiss/installed