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:29:22 +0100 |
commit | 22d6c36800f2ade82e030b9f1321c19cb5ce2db9 (patch) | |
tree | dfbc402f181de506069661ad81054237de49fe2e /src/scp.c | |
parent | c28ad814d0a7a5279a31feea91aaa83762270ff3 (diff) | |
download | libssh-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.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); } |