diff options
author | mouring <mouring> | 2001-01-11 06:20:23 +0000 |
---|---|---|
committer | mouring <mouring> | 2001-01-11 06:20:23 +0000 |
commit | 22c915d7e1dd52196313d90ef20a2f8d28f39677 (patch) | |
tree | 6eae05c33dd4f4e507805744cc8537f46d379892 /bufaux.c | |
parent | e0b473f0b6fb3a2c4eb87bf2d429fb4b10b785a6 (diff) | |
download | openssh-22c915d7e1dd52196313d90ef20a2f8d28f39677.tar.gz |
20010112
- (bal) OpenBSD Sync
- markus@cvs.openbsd.org 2001/01/10 22:56:22
[bufaux.h bufaux.c sftp-server.c sftp.h getput.h]
cleanup sftp-server implementation:
add buffer_get_int64, buffer_put_int64, GET_64BIT, PUT_64BIT
parse SSH2_FILEXFER_ATTR_EXTENDED
send SSH2_FX_EOF if readdir returns no more entries
reply to SSH2_FXP_EXTENDED message
use #defines from the draft
move #definations to sftp.h
more info:
http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-00.txt
- markus@cvs.openbsd.org 2001/01/10 19:43:20
[sshd.c]
XXX - generate_empheral_server_key() is not safe against races,
because it calls log()
- markus@cvs.openbsd.org 2001/01/09 21:19:50
[packet.c]
allow TCP_NDELAY for ipv6; from netbsd via itojun@
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -37,7 +37,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: bufaux.c,v 1.14 2000/12/19 23:17:55 markus Exp $"); +RCSID("$OpenBSD: bufaux.c,v 1.15 2001/01/10 22:56:22 markus Exp $"); #include "ssh.h" #include <openssl/bn.h> @@ -152,6 +152,14 @@ buffer_get_int(Buffer *buffer) return GET_32BIT(buf); } +u_int64_t +buffer_get_int64(Buffer *buffer) +{ + u_char buf[8]; + buffer_get(buffer, (char *) buf, 8); + return GET_64BIT(buf); +} + /* * Stores an integer in the buffer in 4 bytes, msb first. */ @@ -163,6 +171,14 @@ buffer_put_int(Buffer *buffer, u_int value) buffer_append(buffer, buf, 4); } +void +buffer_put_int64(Buffer *buffer, u_int64_t value) +{ + char buf[8]; + PUT_64BIT(buf, value); + buffer_append(buffer, buf, 8); +} + /* * Returns an arbitrary binary string from the buffer. The string cannot * be longer than 256k. The returned value points to memory allocated |