summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sftp-client.h6
-rw-r--r--sftp.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a925d505..520b9b485 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
1120041203 1420041203
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 */
36struct sftp_conn *do_init(int, int, u_int, u_int); 36struct sftp_conn *do_init(int, int, u_int, u_int);
37 37
diff --git a/sftp.c b/sftp.c
index b37c36b71..2c7b546f7 100644
--- a/sftp.c
+++ b/sftp.c
@@ -16,7 +16,7 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $"); 19RCSID("$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
160cmd_interrupt(int signo) 160cmd_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
168static void 170static 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));