From eb0ffe7a8ae67e75ea7806da90ef7fc6c4122ad5 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Wed, 25 Nov 2015 12:19:09 +0100 Subject: abuild: use id instead of whoami Furthermore compare the UID instead of the username. --- abuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'abuild.in') diff --git a/abuild.in b/abuild.in index 1f330b1..937c8e8 100644 --- a/abuild.in +++ b/abuild.in @@ -2148,7 +2148,7 @@ done shift $(( $OPTIND - 1 )) # check so we are not root -if [ "$(whoami)" = "root" ] && [ -z "$FAKEROOTKEY" ]; then +if [ $(id -u) -eq 0 ] && [ -z "$FAKEROOTKEY" ]; then [ -z "$forceroot" ] && die "Do not run abuild as root" FAKEROOT= fi -- cgit v1.2.3-70-g09d2