mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
Revert f2c2687ca6
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.
This commit is contained in:
@ -814,7 +814,7 @@ int ssh_scp_integer_mode(const char *mode){
|
|||||||
*/
|
*/
|
||||||
char *ssh_scp_string_mode(int mode){
|
char *ssh_scp_string_mode(int mode){
|
||||||
char buffer[16];
|
char buffer[16];
|
||||||
snprintf(buffer,sizeof(buffer),"%.4d",mode);
|
snprintf(buffer,sizeof(buffer),"%.4o",mode);
|
||||||
return strdup(buffer);
|
return strdup(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user