diff options
Diffstat (limited to 'sftp-server.c')
-rw-r--r-- | sftp-server.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sftp-server.c b/sftp-server.c index 64777beff..d68584b52 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-server.c,v 1.71 2007/01/03 07:22:36 stevesk Exp $ */ | 1 | /* $OpenBSD: sftp-server.c,v 1.72 2007/04/18 01:12:43 stevesk Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -319,7 +319,8 @@ handle_log_close(int handle, char *emsg) | |||
319 | logit("%s%sclose \"%s\" bytes read %llu written %llu", | 319 | logit("%s%sclose \"%s\" bytes read %llu written %llu", |
320 | emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ", | 320 | emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ", |
321 | handle_to_name(handle), | 321 | handle_to_name(handle), |
322 | handle_bytes_read(handle), handle_bytes_write(handle)); | 322 | (unsigned long long)handle_bytes_read(handle), |
323 | (unsigned long long)handle_bytes_write(handle)); | ||
323 | } else { | 324 | } else { |
324 | logit("%s%sclosedir \"%s\"", | 325 | logit("%s%sclosedir \"%s\"", |
325 | emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ", | 326 | emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ", |
@@ -702,7 +703,8 @@ process_setstat(void) | |||
702 | a = get_attrib(); | 703 | a = get_attrib(); |
703 | debug("request %u: setstat name \"%s\"", id, name); | 704 | debug("request %u: setstat name \"%s\"", id, name); |
704 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { | 705 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { |
705 | logit("set \"%s\" size %llu", name, a->size); | 706 | logit("set \"%s\" size %llu", |
707 | name, (unsigned long long)a->size); | ||
706 | ret = truncate(name, a->size); | 708 | ret = truncate(name, a->size); |
707 | if (ret == -1) | 709 | if (ret == -1) |
708 | status = errno_to_portable(errno); | 710 | status = errno_to_portable(errno); |
@@ -754,7 +756,8 @@ process_fsetstat(void) | |||
754 | char *name = handle_to_name(handle); | 756 | char *name = handle_to_name(handle); |
755 | 757 | ||
756 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { | 758 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { |
757 | logit("set \"%s\" size %llu", name, a->size); | 759 | logit("set \"%s\" size %llu", |
760 | name, (unsigned long long)a->size); | ||
758 | ret = ftruncate(fd, a->size); | 761 | ret = ftruncate(fd, a->size); |
759 | if (ret == -1) | 762 | if (ret == -1) |
760 | status = errno_to_portable(errno); | 763 | status = errno_to_portable(errno); |