summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-06-07 21:52:47 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-06-07 21:52:47 +0000
commit1ce9b7ba2e7a3d4545b02585c6b847fb75d1c740 (patch)
treeb215d601d457c9c7c7bc79fb3704c3ffb2c39460 /usr.bin
parentb5f86686db014965d088bc62907e49a2e136b0ea (diff)
statvfs member fsid needs to be wider, increase it to 64 bits and
crank extension revision number to 2; prodded and ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/PROTOCOL7
-rw-r--r--usr.bin/ssh/sftp-client.c8
-rw-r--r--usr.bin/ssh/sftp-server.c8
3 files changed, 13 insertions, 10 deletions
diff --git a/usr.bin/ssh/PROTOCOL b/usr.bin/ssh/PROTOCOL
index 6527bd02508..2cb45cfaa81 100644
--- a/usr.bin/ssh/PROTOCOL
+++ b/usr.bin/ssh/PROTOCOL
@@ -141,7 +141,7 @@ return the following SSH_FXP_EXTENDED_REPLY reply:
uint64 f_files /* total file inodes */
uint64 f_ffree /* free file inodes */
uint64 f_favail /* free file inodes for to non-root */
- uint32 f_fsid /* file system id */
+ uint64 f_fsid /* file system id */
uint32 f_flag /* bit mask of f_flag values */
uint32 f_namemax /* maximum filename length */
@@ -150,5 +150,8 @@ The values of the f_flag bitmask are as follows:
#define SSH_FXE_STATVFS_ST_RDONLY 0x1 /* read-only */
#define SSH_FXE_STATVFS_ST_NOSUID 0x2 /* no setuid */
-$Id: PROTOCOL,v 1.2 2008/05/17 01:31:56 djm Exp $
+This extension is advertised in the SSH_FXP_VERSION hello with version
+"2".
+
+$Id: PROTOCOL,v 1.3 2008/06/07 21:52:46 djm Exp $
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c
index 25b27714c5f..b414219d948 100644
--- a/usr.bin/ssh/sftp-client.c
+++ b/usr.bin/ssh/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.82 2008/04/18 12:32:11 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.83 2008/06/07 21:52:46 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -273,7 +273,7 @@ get_decode_statvfs(int fd, struct statvfs *st, u_int expected_id, int quiet)
st->f_files = buffer_get_int64(&msg);
st->f_ffree = buffer_get_int64(&msg);
st->f_favail = buffer_get_int64(&msg);
- st->f_fsid = buffer_get_int(&msg);
+ st->f_fsid = buffer_get_int64(&msg);
flag = buffer_get_int(&msg);
st->f_namemax = buffer_get_int(&msg);
@@ -323,10 +323,10 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests)
strcmp(value, "1") == 0)
exts |= SFTP_EXT_POSIX_RENAME;
if (strcmp(name, "statvfs@openssh.com") == 0 &&
- strcmp(value, "1") == 0)
+ strcmp(value, "2") == 0)
exts |= SFTP_EXT_STATVFS;
if (strcmp(name, "fstatvfs@openssh.com") == 0 &&
- strcmp(value, "1") == 0)
+ strcmp(value, "2") == 0)
exts |= SFTP_EXT_FSTATVFS;
xfree(name);
xfree(value);
diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c
index 39e72376240..b68db4347c4 100644
--- a/usr.bin/ssh/sftp-server.c
+++ b/usr.bin/ssh/sftp-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.80 2008/05/18 21:29:05 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.81 2008/06/07 21:52:46 djm Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
@@ -492,7 +492,7 @@ send_statvfs(u_int32_t id, struct statvfs *st)
buffer_put_int64(&msg, st->f_files);
buffer_put_int64(&msg, st->f_ffree);
buffer_put_int64(&msg, st->f_favail);
- buffer_put_int(&msg, st->f_fsid);
+ buffer_put_int64(&msg, st->f_fsid);
buffer_put_int(&msg, flag);
buffer_put_int(&msg, st->f_namemax);
send_msg(&msg);
@@ -516,10 +516,10 @@ process_init(void)
buffer_put_cstring(&msg, "1"); /* version */
/* statvfs extension */
buffer_put_cstring(&msg, "statvfs@openssh.com");
- buffer_put_cstring(&msg, "1"); /* version */
+ buffer_put_cstring(&msg, "2"); /* version */
/* fstatvfs extension */
buffer_put_cstring(&msg, "fstatvfs@openssh.com");
- buffer_put_cstring(&msg, "1"); /* version */
+ buffer_put_cstring(&msg, "2"); /* version */
send_msg(&msg);
buffer_free(&msg);
}