From 7b9ed9a218d408390049c5e9618d4c9b90d33ccb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 21 Jun 2017 00:49:32 -0400 Subject: conf.sh: Don't look at SUDO_USER if it's root Fixes https://labs.parabola.nu/issues/1372 --- src/lib/conf.sh.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in index f2d515d..149e416 100644 --- a/src/lib/conf.sh.in +++ b/src/lib/conf.sh.in @@ -18,6 +18,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if [[ "$(id -u "${SUDO_USER:-root}")" == 0 ]]; then + unset SUDO_USER +fi LIBREUSER="${SUDO_USER:-$USER}" if [[ $LIBREUSER == "$USER" ]]; then LIBREHOME=$HOME -- cgit v1.2.2