summaryrefslogtreecommitdiff
path: root/regress/scp-ssh-wrapper.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-01-04 13:07:27 +0000
committerColin Watson <cjwatson@debian.org>2005-01-04 13:07:27 +0000
commitfd0f611b70a83d80fe8793af785542ee5541b7cd (patch)
treebededd22bb7eeec52e20083237ab7e4113445a16 /regress/scp-ssh-wrapper.sh
parentc44fe9a5b9d3db96a7249b04d915f17e4a3a3b04 (diff)
parentebd2ce335af5861020c79fddb1ae35c03bf036cf (diff)
Merge 3.9p1 to the trunk.
Diffstat (limited to 'regress/scp-ssh-wrapper.sh')
-rw-r--r--regress/scp-ssh-wrapper.sh54
1 files changed, 54 insertions, 0 deletions
diff --git a/regress/scp-ssh-wrapper.sh b/regress/scp-ssh-wrapper.sh
new file mode 100644
index 000000000..8e4314773
--- /dev/null
+++ b/regress/scp-ssh-wrapper.sh
@@ -0,0 +1,54 @@
1#!/bin/sh
2# $OpenBSD: scp-ssh-wrapper.sh,v 1.1 2004/06/13 13:51:02 dtucker Exp $
3# Placed in the Public Domain.
4
5printname () {
6 NAME=$1
7 save_IFS=$IFS
8 IFS=/
9 set -- `echo "$NAME"`
10 IFS="$save_IFS"
11 while [ $# -ge 1 ] ; do
12 if [ "x$1" != "x" ]; then
13 echo "D0755 0 $1"
14 fi
15 shift;
16 done
17}
18
19# discard first 5 args
20shift; shift; shift; shift; shift
21
22BAD="../../../../../../../../../../../../../${DIR}/dotpathdir"
23
24case "$SCPTESTMODE" in
25badserver_0)
26 echo "D0755 0 /${DIR}/rootpathdir"
27 echo "C755 2 rootpathfile"
28 echo "X"
29 ;;
30badserver_1)
31 echo "D0755 0 $BAD"
32 echo "C755 2 file"
33 echo "X"
34 ;;
35badserver_2)
36 echo "D0755 0 $BAD"
37 echo "C755 2 file"
38 echo "X"
39 ;;
40badserver_3)
41 printname $BAD
42 echo "C755 2 file"
43 echo "X"
44 ;;
45badserver_4)
46 printname $BAD
47 echo "D0755 0 .."
48 echo "C755 2 file"
49 echo "X"
50 ;;
51*)
52 exec $1
53 ;;
54esac