From: Todd C. Miller Date: Thu, 10 Jan 2002 18:00:58 +0000 (+0000) Subject: Fix case where neither whoami nor id are found X-Git-Tag: SUDO_1_6_4~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fe1bcd3de246d6608fd5042ae089e3c87df93b4;p=sudo Fix case where neither whoami nor id are found --- diff --git a/install-sh b/install-sh index 126b7953e..686626bf1 100755 --- a/install-sh +++ b/install-sh @@ -16,7 +16,7 @@ MKDIR=mkdir MV=mv RM=rm STRIP=strip -WHOAMI=whoami +WHOAMI="echo root" ## Some systems don't support -x, so we have to use -f. for d in /sbin /etc /usr/sbin /usr/etc; do @@ -34,10 +34,6 @@ for d in /usr/bin /bin /usr/ucb /usr/bsd; do WHOAMI=${d}/id | sed -n 's/^[^(]*(\([^)]*\)).*/\1/p' fi done -if [ X"$WHOAMI" = X"" ]; then - # neither whoami nor id, assume root - WHOAMI=echo root -fi for d in /usr/ccs/bin /usr/bin /bin; do if [ -f $d/strip ]; then