diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2014-02-05 22:29:22 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2014-02-05 22:30:10 +0100 |
commit | da5fa4ef66ae97dfab36c9d67f156fcc234af30c (patch) | |
tree | 859b6d6d4dd94dd9447f1b38ce3c325326ea4173 | |
parent | dca415a38e571bd4f4f289ad5be3f299903461e9 (diff) | |
download | libssh-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |