]> granicus.if.org Git - sudo/commitdiff
Fix case where neither whoami nor id are found
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Jan 2002 18:00:58 +0000 (18:00 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Jan 2002 18:00:58 +0000 (18:00 +0000)
install-sh

index 126b7953e163b378a80a89790f3af881b9c309ac..686626bf1c5a409cf4799a814a87d7d95da12029 100755 (executable)
@@ -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