diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-12 23:01:29 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-12 23:01:29 +0200 |
commit | a64ab33f048fd8649c35e1142592d448e0d9eb6a (patch) | |
tree | 640b5368b043190827c292bcec59d641e2106300 /sftp-client.c | |
parent | - dtucker@cvs.openbsd.org 2008/06/12 20:38:28 (diff) | |
download | openssh-a64ab33f048fd8649c35e1142592d448e0d9eb6a.tar.xz openssh-a64ab33f048fd8649c35e1142592d448e0d9eb6a.zip |
- djm@cvs.openbsd.org 2008/06/12 20:47:04
[sftp-client.c]
print extension revisions for extensions that we understand
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 24 |
1 files changed, 17 insertions, 7 deletions
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); } |