]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Move xpg4 'id' handling into test-exec.sh.
authorDarren Tucker <dtucker@dtucker.net>
Mon, 25 Mar 2024 03:05:40 +0000 (14:05 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Mon, 25 Mar 2024 03:05:40 +0000 (14:05 +1100)
Handle replacement of 'id' the same way as we do other Portable specific
replacements in test-exec.sh.  This brings percent.sh back into sync
with upstream.

regress/percent.sh
regress/test-exec.sh

index 44561d413bb3c278f7704c6aecbc347836a88f8e..354854f97d5551192d1ef90d745a85c23b6c55f2 100644 (file)
@@ -3,11 +3,6 @@
 
 tid="percent expansions"
 
-if [ -x "/usr/xpg4/bin/id" ]; then
-       PATH=/usr/xpg4/bin:$PATH
-       export PATH
-fi
-
 USER=`id -u -n`
 USERID=`id -u`
 HOST=`hostname | cut -f1 -d.`
index ad627941f4d2bf12e71a08dc8264f6d90db28959..f4c363d847f6ee14b71e60038bd3d4138ece350b 100644 (file)
@@ -392,6 +392,7 @@ have_prog()
 jot() {
        awk "BEGIN { for (i = $2; i < $2 + $1; i++) { printf \"%d\n\", i } exit }"
 }
+
 if [ ! -x "`which rev`" ]; then
 rev()
 {
@@ -399,6 +400,13 @@ rev()
 }
 fi
 
+if [ -x "/usr/xpg4/bin/id" ]; then
+id()
+{
+       /usr/xpg4/bin/id
+}
+fi
+
 # Check whether preprocessor symbols are defined in config.h.
 config_defined ()
 {