- djm@cvs.openbsd.org 2004/11/29 07:41:24

[sftp-client.h sftp.c]
     Some small fixes from moritz@jodeit.org. ok deraadt@
This commit is contained in:
Darren Tucker 2004-12-06 22:45:53 +11:00
parent 0133a727ac
commit e2f189a841
3 changed files with 11 additions and 6 deletions

View File

@ -7,6 +7,9 @@
- jmc@cvs.openbsd.org 2004/11/29 00:05:17
[sftp.1]
missing full stop;
- djm@cvs.openbsd.org 2004/11/29 07:41:24
[sftp-client.h sftp.c]
Some small fixes from moritz@jodeit.org. ok deraadt@
20041203
- (dtucker) OpenBSD CVS Sync
@ -1880,4 +1883,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3587 2004/12/06 11:44:32 dtucker Exp $
$Id: ChangeLog,v 1.3588 2004/12/06 11:45:53 dtucker Exp $

View File

@ -1,4 +1,4 @@
/* $OpenBSD: sftp-client.h,v 1.12 2004/02/17 05:39:51 djm Exp $ */
/* $OpenBSD: sftp-client.h,v 1.13 2004/11/29 07:41:24 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@ -30,8 +30,8 @@ struct SFTP_DIRENT {
};
/*
* Initialiase a SSH filexfer connection. Returns -1 on error or
* protocol version on success.
* Initialiase a SSH filexfer connection. Returns NULL on error or
* a pointer to a initialized sftp_conn struct on success.
*/
struct sftp_conn *do_init(int, int, u_int, u_int);

6
sftp.c
View File

@ -16,7 +16,7 @@
#include "includes.h"
RCSID("$OpenBSD: sftp.c,v 1.58 2004/11/25 22:22:14 markus Exp $");
RCSID("$OpenBSD: sftp.c,v 1.59 2004/11/29 07:41:24 djm Exp $");
#ifdef USE_LIBEDIT
#include <histedit.h>
@ -160,9 +160,11 @@ static void
cmd_interrupt(int signo)
{
const char msg[] = "\rInterrupt \n";
int olderrno = errno;
write(STDERR_FILENO, msg, sizeof(msg) - 1);
interrupted = 1;
errno = olderrno;
}
static void
@ -262,7 +264,7 @@ path_strip(char *path, char *strip)
return (xstrdup(path));
len = strlen(strip);
if (strip != NULL && strncmp(path, strip, len) == 0) {
if (strncmp(path, strip, len) == 0) {
if (strip[len - 1] != '/' && path[len] == '/')
len++;
return (xstrdup(path + len));