Xiang Xiao
43a31b81f2
examples/libssh_scp: Remove the duplication of free(loc->host)
...
and free sources at the end of program
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: Ia6a51d52439722b46547449e85350b3193e5ba28
2021-05-12 16:01:18 +02:00
Xiang Xiao
46624648f9
examples/libssh_scp: call ssh_init and ssh_finalize explicitly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: I4c80904d40b068f47334c3116576de07782162f6
2021-05-12 16:01:18 +02:00
Andreas Schneider
0938d397be
examples: Use SSH_STRING_FREE_CHAR()
...
Fixes T183
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
Andreas Schneider
8d62257172
examples: Fix integer types in libssh_scp.c
...
Fixes T188
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
Anderson Toshiyuki Sasaki
31202822a7
examples: Add null checks in libssh_scp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Anderson Toshiyuki Sasaki
6118628424
examples: Fix libssh_scp.c code style
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Anderson Toshiyuki Sasaki
00e5ef1b3c
examples: Fix possible memory leak in libssh_scp.c
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-27 15:21:30 +02:00
Andreas Schneider
96882cc58c
example: Fix a use after free in the scp example
...
CID: #1032343
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 11:27:09 +02:00
Andreas Schneider
351e4107ed
examples: Check return value of fstat().
...
CID #743297
2013-07-14 15:02:11 +02:00
Andreas Schneider
776ff528df
examples: Make sure we have a valid scp pointer.
...
CID #1032343
2013-07-14 15:02:11 +02:00
Andreas Schneider
89be6d0309
examples: Check return value of fileno().
2013-06-19 12:32:10 +02:00
Andreas Schneider
abb25861e5
examples: Fix a possible memory leak.
2013-06-19 12:14:25 +02:00
Andreas Schneider
a03d8f49fb
examples: Fix a use after free in scp example.
2013-06-13 10:55:12 +02:00
Andreas Schneider
c31004442a
examples: Make variables static in scp example.
...
Fixes sparse warnings.
2012-02-19 13:26:02 +01:00
Andreas Schneider
15ebbad146
examples: Fix permissions of the file we copy.
...
Thanks to Baptiste Marchand.
2011-08-03 22:21:43 +02:00
Andreas Schneider
dfa01d0862
examples: Use the src mode in scp do_copy function.
...
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
2011-01-06 10:15:01 +01:00
Aris Adamantiadis
e455f6f756
Make libssh_scp a little more consistant
2009-10-29 10:50:47 +01:00
Aris Adamantiadis
5223fa5740
Shut up warning in libssh_scp
2009-09-23 11:43:06 +02:00
Aris Adamantiadis
bdb32afa20
Cycle the fetchs, remove the ssh_connect function
2009-09-13 14:03:34 +03:00
Aris Adamantiadis
d5840aa1f0
add support for local output, scp input
...
Still needs to be debugged and improved but the idea it there
2009-09-13 14:03:34 +03:00
Aris Adamantiadis
86e6444656
Begin of scp reading in example
2009-09-13 14:03:33 +03:00
Aris Adamantiadis
1e1c13f756
some tweaks of scp example
2009-08-12 00:04:04 +02:00
Aris Adamantiadis
7e9f0803c5
Latest scp code
...
The sample is now able to scp a file
2009-08-10 22:59:35 +02:00
Aris Adamantiadis
b993579079
Got the scp sample to work
...
Problem was that the terminal was not needed, and some nul bytes were to be read.
2009-08-09 00:25:09 +02:00
Aris Adamantiadis
ba217dec1c
First implementation of a scp transfer tool
...
Doesn't work yet. I've got a headache and debugging doesn't help.
2009-07-25 22:29:12 +02:00
Aris Adamantiadis
a935ad1857
New example directory with the begining of a scp
2009-07-25 17:03:01 +02:00