aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2014-02-05 22:29:22 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2014-02-05 22:30:10 +0100
commitda5fa4ef66ae97dfab36c9d67f156fcc234af30c (patch)
tree859b6d6d4dd94dd9447f1b38ce3c325326ea4173
parentdca415a38e571bd4f4f289ad5be3f299903461e9 (diff)
downloadlibssh-da5fa4ef66ae97dfab36c9d67f156fcc234af30c.tar.gz
libssh-da5fa4ef66ae97dfab36c9d67f156fcc234af30c.tar.xz
libssh-da5fa4ef66ae97dfab36c9d67f156fcc234af30c.zip
Revert f2c2687ca6c6c7e25c9a547227027ab28eb4fc16
Fix bug #142 The mode does need to be an octal numeric string. Mode 0600 now gets sent on the wire as 0384, triggering a "scp: protocol error: bad mode" response, and an "scp status code 1d not valid" message from libssh.
-rw-r--r--src/scp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scp.c b/src/scp.c
index a245402a..0208ddc5 100644
--- a/src/scp.c
+++ b/src/scp.c
@@ -814,7 +814,7 @@ int ssh_scp_integer_mode(const char *mode){
*/
char *ssh_scp_string_mode(int mode){
char buffer[16];
- snprintf(buffer,sizeof(buffer),"%.4d",mode);
+ snprintf(buffer,sizeof(buffer),"%.4o",mode);
return strdup(buffer);
}