|
Jakub Jelen |
4feb6a |
diff --git a/regress/scp-ssh-wrapper.sh b/regress/scp-ssh-wrapper.sh
|
|
Jakub Jelen |
4feb6a |
index 59f1ff63..dd48a482 100644
|
|
Jakub Jelen |
4feb6a |
--- a/regress/scp-ssh-wrapper.sh
|
|
Jakub Jelen |
4feb6a |
+++ b/regress/scp-ssh-wrapper.sh
|
|
Jakub Jelen |
4feb6a |
@@ -51,6 +51,18 @@ badserver_4)
|
|
Jakub Jelen |
4feb6a |
echo "C755 2 file"
|
|
Jakub Jelen |
4feb6a |
echo "X"
|
|
Jakub Jelen |
4feb6a |
;;
|
|
Jakub Jelen |
4feb6a |
+badserver_5)
|
|
Jakub Jelen |
4feb6a |
+ echo "D0555 0 "
|
|
Jakub Jelen |
4feb6a |
+ echo "X"
|
|
Jakub Jelen |
4feb6a |
+ ;;
|
|
Jakub Jelen |
4feb6a |
+badserver_6)
|
|
Jakub Jelen |
4feb6a |
+ echo "D0555 0 ."
|
|
Jakub Jelen |
4feb6a |
+ echo "X"
|
|
Jakub Jelen |
4feb6a |
+ ;;
|
|
Jakub Jelen |
4feb6a |
+badserver_7)
|
|
Jakub Jelen |
4feb6a |
+ echo "C0755 2 extrafile"
|
|
Jakub Jelen |
4feb6a |
+ echo "X"
|
|
Jakub Jelen |
4feb6a |
+ ;;
|
|
Jakub Jelen |
4feb6a |
*)
|
|
Jakub Jelen |
4feb6a |
set -- $arg
|
|
Jakub Jelen |
4feb6a |
shift
|
|
Jakub Jelen |
4feb6a |
diff --git a/regress/scp.sh b/regress/scp.sh
|
|
Jakub Jelen |
4feb6a |
index 57cc7706..104c89e1 100644
|
|
Jakub Jelen |
4feb6a |
--- a/regress/scp.sh
|
|
Jakub Jelen |
4feb6a |
+++ b/regress/scp.sh
|
|
Jakub Jelen |
4feb6a |
@@ -25,6 +25,7 @@ export SCP # used in scp-ssh-wrapper.scp
|
|
Jakub Jelen |
4feb6a |
scpclean() {
|
|
Jakub Jelen |
4feb6a |
rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2}
|
|
Jakub Jelen |
4feb6a |
mkdir ${DIR} ${DIR2}
|
|
Jakub Jelen |
4feb6a |
+ chmod 755 ${DIR} ${DIR2}
|
|
Jakub Jelen |
4feb6a |
}
|
|
Jakub Jelen |
4feb6a |
|
|
Jakub Jelen |
4feb6a |
verbose "$tid: simple copy local file to local file"
|
|
Jakub Jelen |
4feb6a |
@@ -101,7 +102,7 @@ if [ ! -z "$SUDO" ]; then
|
|
Jakub Jelen |
4feb6a |
$SUDO rm ${DIR2}/copy
|
|
Jakub Jelen |
4feb6a |
fi
|
|
Jakub Jelen |
4feb6a |
|
|
Jakub Jelen |
4feb6a |
-for i in 0 1 2 3 4; do
|
|
Jakub Jelen |
4feb6a |
+for i in 0 1 2 3 4 5 6 7; do
|
|
Jakub Jelen |
4feb6a |
verbose "$tid: disallow bad server #$i"
|
|
Jakub Jelen |
4feb6a |
SCPTESTMODE=badserver_$i
|
|
Jakub Jelen |
4feb6a |
export DIR SCPTESTMODE
|
|
Jakub Jelen |
4feb6a |
@@ -113,6 +114,15 @@ for i in 0 1 2 3 4; do
|
|
Jakub Jelen |
4feb6a |
scpclean
|
|
Jakub Jelen |
4feb6a |
$SCP -r $scpopts somehost:${DATA} ${DIR2} >/dev/null 2>/dev/null
|
|
Jakub Jelen |
4feb6a |
[ -d ${DIR}/dotpathdir ] && fail "allows dir creation outside of subdir"
|
|
Jakub Jelen |
4feb6a |
+
|
|
Jakub Jelen |
4feb6a |
+ scpclean
|
|
Jakub Jelen |
4feb6a |
+ $SCP -pr $scpopts somehost:${DATA} ${DIR2} >/dev/null 2>/dev/null
|
|
Jakub Jelen |
4feb6a |
+ [ ! -w ${DIR2} ] && fail "allows target root attribute change"
|
|
Jakub Jelen |
4feb6a |
+
|
|
Jakub Jelen |
4feb6a |
+ scpclean
|
|
Jakub Jelen |
4feb6a |
+ $SCP $scpopts somehost:${DATA} ${DIR2} >/dev/null 2>/dev/null
|
|
Jakub Jelen |
4feb6a |
+ [ -e ${DIR2}/extrafile ] && fail "allows extranous object creation"
|
|
Jakub Jelen |
4feb6a |
+ rm -f ${DIR2}/extrafile
|
|
Jakub Jelen |
4feb6a |
done
|
|
Jakub Jelen |
4feb6a |
|
|
Jakub Jelen |
4feb6a |
verbose "$tid: detect non-directory target"
|
|
Jakub Jelen |
4feb6a |
|