-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep trailing delimiter with SFTP open
- Loading branch information
1 parent
3cabbdb
commit 52e4e32
Showing
7 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
# sshd local test | ||
|
||
PWD=`pwd` | ||
cd ../../.. | ||
|
||
TEST_SFTP_CLIENT="./examples/sftpclient/wolfsftp" | ||
USER=`whoami` | ||
PRIVATE_KEY="./keys/hansel-key-ecc.der" | ||
PUBLIC_KEY="./keys/hansel-key-ecc.pub" | ||
|
||
if [ -z "$1" ] || [ -z "$2" ]; then | ||
echo "expecting host and port as arguments" | ||
echo "./sshd_exec_test.sh 127.0.0.1 22222" | ||
exit 1 | ||
fi | ||
|
||
mkdir test-$$ | ||
mkdir test-$$/subfolder | ||
|
||
echo "$TEST_SFTP_CLIENT -u $USER -i $PRIVATE_KEY -j $PUBLIC_KEY -g -l configure -r `pwd`/test-$$/subfolder/ -h \"$1\" -p \"$2\"" | ||
"$TEST_SFTP_CLIENT -u $USER -i $PRIVATE_KEY -j $PUBLIC_KEY -g -l configure -r `pwd`/test-$$/subfolder/ -h $1 -p $2" | ||
|
||
RESULT=$? | ||
if [ "$RESULT" = "0" ]; then | ||
echo "Expecting to fail transfer to folder" | ||
exit 1 | ||
fi | ||
rm -rf test-$$ | ||
|
||
cd $PWD | ||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters