aboutsummaryrefslogtreecommitdiff
path: root/src/scp.c
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:29:22 +0100
commit22d6c36800f2ade82e030b9f1321c19cb5ce2db9 (patch)
treedfbc402f181de506069661ad81054237de49fe2e /src/scp.c
parentc28ad814d0a7a5279a31feea91aaa83762270ff3 (diff)
downloadlibssh-22d6c36800f2ade82e030b9f1321c19cb5ce2db9.tar.gz
libssh-22d6c36800f2ade82e030b9f1321c19cb5ce2db9.tar.xz
libssh-22d6c36800f2ade82e030b9f1321c19cb5ce2db9.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.
Diffstat (limited to 'src/scp.c')
-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);
}