diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sftp-client.c | 24 |
2 files changed, 21 insertions, 8 deletions
@@ -122,6 +122,9 @@ [sshd.c sshconnect.c packet.h misc.c misc.h packet.c] Make keepalive timeouts apply while waiting for a packet, particularly during key renegotiation (bz #1363). With djm and Matt Day, ok djm@ + - djm@cvs.openbsd.org 2008/06/12 20:47:04 + [sftp-client.c] + print extension revisions for extensions that we understand - (dtucker) [clientloop.c serverloop.c] channel_register_filter now takes 2 more args. with djm@ @@ -4286,4 +4289,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4988 2008/06/12 20:42:45 dtucker Exp $ +$Id: ChangeLog,v 1.4989 2008/06/12 21:01:29 dtucker Exp $ diff --git a/sftp-client.c b/sftp-client.c index 8d0666b85..2565a704d 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.84 2008/06/08 20:15:29 dtucker Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.85 2008/06/12 20:47:04 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -326,17 +326,27 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests) while (buffer_len(&msg) > 0) { char *name = buffer_get_string(&msg, NULL); char *value = buffer_get_string(&msg, NULL); + int known = 0; - debug2("Init extension: \"%s\"", name); if (strcmp(name, "posix-rename@openssh.com") == 0 && - strcmp(value, "1") == 0) + strcmp(value, "1") == 0) { exts |= SFTP_EXT_POSIX_RENAME; - if (strcmp(name, "statvfs@openssh.com") == 0 && - strcmp(value, "2") == 0) + known = 1; + } else if (strcmp(name, "statvfs@openssh.com") == 0 && + strcmp(value, "2") == 0) { exts |= SFTP_EXT_STATVFS; - if (strcmp(name, "fstatvfs@openssh.com") == 0 && - strcmp(value, "2") == 0) + known = 1; + } if (strcmp(name, "fstatvfs@openssh.com") == 0 && + strcmp(value, "2") == 0) { exts |= SFTP_EXT_FSTATVFS; + known = 1; + } + if (known) { + debug2("Server supports extension \"%s\" revision %s", + name, value); + } else { + debug2("Unrecognised server extension \"%s\"", name); + } xfree(name); xfree(value); } |