search for: buffer_get_int64

Displaying 9 results from an estimated 9 matches for "buffer_get_int64".

Did you mean: buffer_get_int
2009 Feb 12
2
[patch 1/3] add protocol extension to ATTR message
...IZE) + st->st_blksize = a->blksize; + if (a->ext_flags & SSH2_FXE_EXTATTR_BLOCKS) + st->st_blocks = a->blocks; +} + +static void +decode_extra_attrib(Buffer *b, Attrib *a) +{ + a->ext_flags = buffer_get_int(b); + if (a->ext_flags & SSH2_FXE_EXTATTR_DEV) + a->dev = buffer_get_int64(b); + if (a->ext_flags & SSH2_FXE_EXTATTR_INO) + a->ino = buffer_get_int64(b); + if (a->ext_flags & SSH2_FXE_EXTATTR_NLINK) + a->nlink = buffer_get_int(b); + if (a->ext_flags & SSH2_FXE_EXTATTR_RDEV) + a->rdev = buffer_get_int64(b); + if (a->ext_flags & SSH2_...
2001 Jan 23
11
cc & no 64bit int patches
Here are a couple of patches against the CVS (Jan 22 18:41 PST) Some C++ comments found their way into ssh.h The no64.patch puts ifdefs around buffer_get_int64() now in bufaux.[c,h] -- Tim Rice Multitalents (707) 887-1469 tim at multitalents.net -------------- next part -------------- --- ssh.h.old Mon Jan 22 18:40:58 2001 +++ ssh.h Mon Jan 22 19:02:02 2001 @@ -25,8 +25,10 @@ # include <sys/select.h> #endif -//#include "rsa.h" -...
2012 Dec 21
0
File Attachments for previous bug report
...-------------- next part -------------- --- sftp-client.c.orig 2012-12-19 17:30:09.345533585 -0800 +++ sftp-client.c 2012-12-19 17:30:34.055766403 -0800 @@ -308,7 +308,7 @@ SSH2_FXP_EXTENDED_REPLY, type); } - bzero(st, sizeof(*st)); + memset(st, 0, sizeof(*st)); st->f_bsize = buffer_get_int64(&msg); st->f_frsize = buffer_get_int64(&msg); st->f_blocks = buffer_get_int64(&msg); -------------- next part -------------- --- sshconnect2.c.orig 2012-12-19 17:32:38.389551253 -0800 +++ sshconnect2.c 2012-12-19 17:35:55.170602684 -0800 @@ -1010,14 +1010,14 @@ &secr...
2012 Dec 20
4
Deprecated calls to bzero() and index() found in OpenSSH 6.1p1
...: --- sftp-client.c.orig 2012-12-19 17:30:09.345533585 -0800 +++ sftp-client.c 2012-12-19 17:30:34.055766403 -0800 @@ -308,7 +308,7 @@ SSH2_FXP_EXTENDED_REPLY, type); } - bzero(st, sizeof(*st)); + memset(st, 0, sizeof(*st)); st->f_bsize = buffer_get_int64(&msg); st->f_frsize = buffer_get_int64(&msg); st->f_blocks = buffer_get_int64(&msg); In file 'sshconnect2.c', I've replaced the bzero() calls with the equivalent memset() calls. The patch file is below in (diff -u) format: --- sshconnect2.c.orig 2012...
2001 Dec 18
1
chroot howto for sftp-server
...r to use a dummy shell. 5 The Patch: ============ (diff against 3.0.1) --- sftp-server.c Tue Jul 31 14:42:50 2001 +++ sftp-server.c~ Fri Nov 23 10:56:48 2001 @@ -33,6 +33,8 @@ #include "sftp.h" #include "sftp-common.h" +#define CHROOT + /* helper */ #define get_int64() buffer_get_int64(&iqueue); #define get_int() buffer_get_int(&iqueue); @@ -1008,6 +1010,36 @@ } } +#ifdef CHROOT +void +chroot_init(void) +{ + char *user_dir, *new_root; + + user_dir = getenv("HOME"); + + if (!user_dir) + fatal("HOME isn't in environment"); + + new_root = use...
2003 Aug 16
0
sftp-server (secure) chroot patch, comment fix
...quot;sftp.h" #include "sftp-common.h" +#ifdef CHROOT +#include "uidswap.h" +#include <pwd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <string.h> +#include <unistd.h> +#endif /* CHROOT */ + /* helper */ #define get_int64() buffer_get_int64(&iqueue); #define get_int() buffer_get_int(&iqueue); @@ -62,6 +71,51 @@ Attrib attrib; }; +#ifdef CHROOT +static void +chroot_init(void) +{ + gid_t gidset[1]; + struct passwd *pw; + struct stat st; + + /* Sanity checking before chroot */ + if ((pw = getpwuid(getuid())) == NULL) + f...
2003 Sep 30
1
[PATCH] sftp-server (secure) chroot patch, 3.7.1p2 update
...sftp.h\" #include \"sftp-common.h\" +#ifdef CHROOT +#include \"uidswap.h\" +#include <pwd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <string.h> +#include <unistd.h> +#endif /* CHROOT */ + /* helper */ #define get_int64() buffer_get_int64(&iqueue); #define get_int() buffer_get_int(&iqueue); @@ -62,6 +72,49 @@ Attrib attrib; }; +#ifdef CHROOT +static void +chroot_init(void) +{ + struct passwd *pw; + struct stat st; + + /* Sanity checking before chroot */ + if ((pw = getpwuid(getuid())) == NULL) + fatal(\"getpwui...
2003 Aug 16
0
sftp-server (secure) chroot patch?
...; #include "sftp-common.h" +#ifdef CHROOT +#include "uidswap.h" +#include <pwd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <string.h> +#include <unistd.h> +#endif /* CHROOT */ + /* helper */ #define get_int64() buffer_get_int64(&iqueue); #define get_int() buffer_get_int(&iqueue); @@ -62,6 +71,51 @@ Attrib attrib; }; +#ifdef CHROOT +static void +chroot_init(void) +{ + gid_t gidset[1]; + struct passwd *pw; + struct stat st; + + /* Sanity checking before chroot...
2007 Nov 11
1
ftp-server patch - restrict user to directory
...stdio.h> #include <string.h> -#include <pwd.h> #include <time.h> #include <unistd.h> #include <stdarg.h> @@ -44,6 +43,7 @@ #include "sftp.h" #include "sftp-common.h" +#include "pathnames.h" /* helper */ #define get_int64() buffer_get_int64(&iqueue); @@ -74,6 +74,141 @@ Attrib attrib; }; +/* Name of the server configuration file. */ +char *config_file_name = _PATH_SFTP_CONFIG_FILE; + +/* If not NULL restrict the user to under this directory */ +char* RestrictDirectory; + +/* **** Start parsing config file code **** */ + +/* R...