From e4c752d39404a0c0c7be35d3f42049cad9b8260c Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 22 Nov 2017 23:40:29 +0000 Subject: [PATCH] config/options: check if the effective uid is root (and bail if so) --- config/options | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/options b/config/options index 99bc5c01da..e6676071bd 100644 --- a/config/options +++ b/config/options @@ -1,3 +1,9 @@ +# Do not build as root. Ever. +if [[ $EUID -eq 0 ]]; then + echo "Building as the root user is NOT supported. Use a regular user account for the build." 1>&2 + exit 1 +fi + # set default language for buildsystem export LC_ALL=C