diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 22:45:53 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-12-06 22:45:53 +1100 |
commit | e2f189a841c9beecae75a2df3784d73f9e6dd762 (patch) | |
tree | dea0adc141a29896e19ba529107fead4f0849cae | |
parent | 0133a727acc7db7bd5a733ca0bed8a06a112f389 (diff) |
- djm@cvs.openbsd.org 2004/11/29 07:41:24
[sftp-client.h sftp.c]
Some small fixes from moritz@jodeit.org. ok deraadt@
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sftp-client.h | 6 | ||||
-rw-r--r-- | sftp.c | 6 |
3 files changed, 11 insertions, 6 deletions
@@ -7,6 +7,9 @@ | |||
7 | - jmc@cvs.openbsd.org 2004/11/29 00:05:17 | 7 | - jmc@cvs.openbsd.org 2004/11/29 00:05:17 |
8 | [sftp.1] | 8 | [sftp.1] |
9 | missing full stop; | 9 | missing full stop; |
10 | - djm@cvs.openbsd.org 2004/11/29 07:41:24 | ||
11 | [sftp-client.h sftp.c] | ||
12 | Some small fixes from moritz@jodeit.org. ok deraadt@ | ||
10 | 13 | ||
11 | 20041203 | 14 | 20041203 |
12 | - (dtucker) OpenBSD CVS Sync | 15 | - (dtucker) OpenBSD CVS Sync |
@@ -1880,4 +1883,4 @@ | |||
1880 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1883 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1881 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1884 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1882 | 1885 | ||
1883 | $Id: ChangeLog,v 1.3587 2004/12/06 11:44:32 dtucker Exp $ | 1886 | $Id: ChangeLog,v 1.3588 2004/12/06 11:45:53 dtucker Exp $ |
diff --git a/sftp-client.h b/sftp-client.h index a0e8e44b3..991e05d33 100644 --- a/sftp-client.h +++ b/sftp-client.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.h,v 1.12 2004/02/17 05:39:51 djm Exp $ */ | 1 | /* $OpenBSD: sftp-client.h,v 1.13 2004/11/29 07:41:24 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 4 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
@@ -30,8 +30,8 @@ struct SFTP_DIRENT { | |||
30 | }; | 30 | }; |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Initialiase a SSH filexfer connection. Returns -1 on error or | 33 | * Initialiase a SSH filexfer connection. Returns NULL on error or |
34 | * protocol version on success. | 34 | * a pointer to a initialized sftp_conn struct on success. |
35 | */ | 35 | */ |
36 | struct sftp_conn *do_init(int, int, u_int, u_int); | 36 | struct sftp_conn *do_init(int, int, u_int, u_int); |
37 | 37 | ||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include "includes.h" | 17 | #include "includes.h" |
18 | 18 | ||
19 | RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $"); | 19 | RCSID("$OpenBSD: sftp.c,v 1.59 2004/11/29 07:41:24 djm Exp $"); |
20 | 20 | ||
21 | #ifdef USE_LIBEDIT | 21 | #ifdef USE_LIBEDIT |
22 | #include <histedit.h> | 22 | #include <histedit.h> |
@@ -160,9 +160,11 @@ static void | |||
160 | cmd_interrupt(int signo) | 160 | cmd_interrupt(int signo) |
161 | { | 161 | { |
162 | const char msg[] = "\rInterrupt \n"; | 162 | const char msg[] = "\rInterrupt \n"; |
163 | int olderrno = errno; | ||
163 | 164 | ||
164 | write(STDERR_FILENO, msg, sizeof(msg) - 1); | 165 | write(STDERR_FILENO, msg, sizeof(msg) - 1); |
165 | interrupted = 1; | 166 | interrupted = 1; |
167 | errno = olderrno; | ||
166 | } | 168 | } |
167 | 169 | ||
168 | static void | 170 | static void |
@@ -262,7 +264,7 @@ path_strip(char *path, char *strip) | |||
262 | return (xstrdup(path)); | 264 | return (xstrdup(path)); |
263 | 265 | ||
264 | len = strlen(strip); | 266 | len = strlen(strip); |
265 | if (strip != NULL && strncmp(path, strip, len) == 0) { | 267 | if (strncmp(path, strip, len) == 0) { |
266 | if (strip[len - 1] != '/' && path[len] == '/') | 268 | if (strip[len - 1] != '/' && path[len] == '/') |
267 | len++; | 269 | len++; |
268 | return (xstrdup(path + len)); | 270 | return (xstrdup(path + len)); |