1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-30 11:18:12 +00:00

scp is now 64-bit capable as well, i think

This commit is contained in:
Greg Alexander 2016-06-21 21:24:37 -04:00
parent 277234865a
commit 41bdcb1b97
2 changed files with 10 additions and 5 deletions

6
NOTES
View File

@ -237,8 +237,12 @@ be useful:
curl -v --pubkey .ssh/id_rsa.pub -r 2147482624-2147484672 -k sftp://mushroom:2222/sdcard/ssh/buh -o buh-new curl -v --pubkey .ssh/id_rsa.pub -r 2147482624-2147484672 -k sftp://mushroom:2222/sdcard/ssh/buh -o buh-new
As for scp, it's not as clear what needs to be done. It doesn't use
lseek. But it does use off_t a bit, including on an index in a for loop
that is compared against st_size (which is 64-bit). So I'll just change
all of the off_t to off64_t and hope for the best.
XXX - what about scp?
XXX - test on large files XXX - test on large files
XXX - if you remove it from the recent apps list, does it stop the service?? XXX - if you remove it from the recent apps list, does it stop the service??
XXX - support password-based logins? XXX - support password-based logins?

View File

@ -84,7 +84,7 @@ void bwlimit(int);
arglist args; arglist args;
/* Bandwidth limit */ /* Bandwidth limit */
off_t limit_rate = 0; off64_t limit_rate = 0;
/* Name of current file being transferred. */ /* Name of current file being transferred. */
char *curfile; char *curfile;
@ -601,7 +601,8 @@ source(int argc, char **argv)
struct stat stb; struct stat stb;
static BUF buffer; static BUF buffer;
BUF *bp; BUF *bp;
off_t i, amt, statbytes; /* XXX - if PROGRESS_METER is enabled, we'll regret making statbytes 64-bit */
off64_t i, amt, statbytes;
size_t result; size_t result;
int fd = -1, haderr, indx; int fd = -1, haderr, indx;
char *last, *name, buf[2048]; char *last, *name, buf[2048];
@ -830,10 +831,10 @@ sink(int argc, char **argv)
YES, NO, DISPLAYED YES, NO, DISPLAYED
} wrerr; } wrerr;
BUF *bp; BUF *bp;
off_t i; off64_t i;
size_t j, count; size_t j, count;
int amt, exists, first, mask, mode, ofd, omode; int amt, exists, first, mask, mode, ofd, omode;
off_t size, statbytes; off64_t size, statbytes;
int setimes, targisdir, wrerrno = 0; int setimes, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
struct timeval tv[2]; struct timeval tv[2];