summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-09 03:32:29 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-09 03:32:29 +1000
commit598eaa6c0c36c3169963c7e6505d53b4073590f5 (patch)
tree52872f9bfe82fd5a3e1b1a059bd063351bfbadd7 /sftp-server.c
parent294b84183265a9be32971fce856e578160e1a825 (diff)
- (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c
openbsd-compat/Makefile.in openbsd-compat/openbsd-compat.h openbsd-compat/bsd-statvfs.{c,h}] Add a null implementation of statvfs and fstatvfs and remove #defines around statvfs code. ok djm@
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sftp-server.c b/sftp-server.c
index 2c25df9de..9c3128347 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -481,7 +481,6 @@ send_attrib(u_int32_t id, const Attrib *a)
481 buffer_free(&msg); 481 buffer_free(&msg);
482} 482}
483 483
484#ifdef USE_STATVFS
485static void 484static void
486send_statvfs(u_int32_t id, struct statvfs *st) 485send_statvfs(u_int32_t id, struct statvfs *st)
487{ 486{
@@ -508,7 +507,6 @@ send_statvfs(u_int32_t id, struct statvfs *st)
508 send_msg(&msg); 507 send_msg(&msg);
509 buffer_free(&msg); 508 buffer_free(&msg);
510} 509}
511#endif
512 510
513/* parse incoming */ 511/* parse incoming */
514 512
@@ -525,14 +523,12 @@ process_init(void)
525 /* POSIX rename extension */ 523 /* POSIX rename extension */
526 buffer_put_cstring(&msg, "posix-rename@openssh.com"); 524 buffer_put_cstring(&msg, "posix-rename@openssh.com");
527 buffer_put_cstring(&msg, "1"); /* version */ 525 buffer_put_cstring(&msg, "1"); /* version */
528#ifdef USEE_STATVFS
529 /* statvfs extension */ 526 /* statvfs extension */
530 buffer_put_cstring(&msg, "statvfs@openssh.com"); 527 buffer_put_cstring(&msg, "statvfs@openssh.com");
531 buffer_put_cstring(&msg, "2"); /* version */ 528 buffer_put_cstring(&msg, "2"); /* version */
532 /* fstatvfs extension */ 529 /* fstatvfs extension */
533 buffer_put_cstring(&msg, "fstatvfs@openssh.com"); 530 buffer_put_cstring(&msg, "fstatvfs@openssh.com");
534 buffer_put_cstring(&msg, "2"); /* version */ 531 buffer_put_cstring(&msg, "2"); /* version */
535#endif
536 send_msg(&msg); 532 send_msg(&msg);
537 buffer_free(&msg); 533 buffer_free(&msg);
538} 534}
@@ -1142,7 +1138,6 @@ process_extended_posix_rename(u_int32_t id)
1142 xfree(newpath); 1138 xfree(newpath);
1143} 1139}
1144 1140
1145#ifdef USE_STATVFS
1146static void 1141static void
1147process_extended_statvfs(u_int32_t id) 1142process_extended_statvfs(u_int32_t id)
1148{ 1143{
@@ -1178,7 +1173,6 @@ process_extended_fstatvfs(u_int32_t id)
1178 else 1173 else
1179 send_statvfs(id, &st); 1174 send_statvfs(id, &st);
1180} 1175}
1181#endif
1182 1176
1183static void 1177static void
1184process_extended(void) 1178process_extended(void)
@@ -1190,12 +1184,10 @@ process_extended(void)
1190 request = get_string(NULL); 1184 request = get_string(NULL);
1191 if (strcmp(request, "posix-rename@openssh.com") == 0) 1185 if (strcmp(request, "posix-rename@openssh.com") == 0)
1192 process_extended_posix_rename(id); 1186 process_extended_posix_rename(id);
1193#ifdef USE_STATVFS
1194 else if (strcmp(request, "statvfs@openssh.com") == 0) 1187 else if (strcmp(request, "statvfs@openssh.com") == 0)
1195 process_extended_statvfs(id); 1188 process_extended_statvfs(id);
1196 else if (strcmp(request, "fstatvfs@openssh.com") == 0) 1189 else if (strcmp(request, "fstatvfs@openssh.com") == 0)
1197 process_extended_fstatvfs(id); 1190 process_extended_fstatvfs(id);
1198#endif
1199 else 1191 else
1200 send_status(id, SSH2_FX_OP_UNSUPPORTED); /* MUST */ 1192 send_status(id, SSH2_FX_OP_UNSUPPORTED); /* MUST */
1201 xfree(request); 1193 xfree(request);