1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-09-28 12:22:39 -06:00

kiss: Allow user to force kiss to run as root

This commit is contained in:
Dylan Araps 2020-01-29 09:03:23 +02:00
parent 0e2a452203
commit 1210dae5dd
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

5
kiss
View File

@ -1352,7 +1352,7 @@ args() {
;; ;;
v|version|-v|--version) v|version|-v|--version)
log kiss 1.0.0 log kiss 1.0.1
;; ;;
h|help|-h|--help|'') h|help|-h|--help|'')
@ -1379,7 +1379,8 @@ main() {
# Prevent the package manager from running as root. The package # Prevent the package manager from running as root. The package
# manager will elevate permissions where needed. # manager will elevate permissions where needed.
[ "$(id -u)" != 0 ] || die "kiss must be run as a normal user" [ "$(id -u)" != 0 ] || [ "$KISS_ASROOT" ] ||
die "kiss must be run as a normal user"
# Use the most secure method of sending data over stdin based on # Use the most secure method of sending data over stdin based on
# whether or not the 'printf' command is built into the shell. # whether or not the 'printf' command is built into the shell.