b24 rel
This commit is contained in:
parent
8cbf7b4965
commit
c45cd5b5f2
|
|
@ -1,4 +1,4 @@
|
||||||
Version NEXT
|
Version 2.8.1b24 - 19 Feb 2005
|
||||||
use getopt from stdio.h instead of getopt.h in fspscan.c
|
use getopt from stdio.h instead of getopt.h in fspscan.c
|
||||||
fspscan now compiles on AIX and other OS without glibc (hoaxter)
|
fspscan now compiles on AIX and other OS without glibc (hoaxter)
|
||||||
!! fixed fatal bug from b23. Server sends large packets to clients if
|
!! fixed fatal bug from b23. Server sends large packets to clients if
|
||||||
|
|
@ -10,7 +10,12 @@ Version NEXT
|
||||||
started work on alternate SCons based build system
|
started work on alternate SCons based build system
|
||||||
fspd: use urandom, not random -> avoid hangs on Lin suck 2.6
|
fspd: use urandom, not random -> avoid hangs on Lin suck 2.6
|
||||||
build system converted to SCons
|
build system converted to SCons
|
||||||
fixed directory listing bug in client library introduced in beta23
|
!! fixed directory listing bug in client library introduced in beta23
|
||||||
|
improvements to security of FSP clients
|
||||||
|
seq. numbers are now randomized
|
||||||
|
seed random number generator in fsp clients
|
||||||
|
check cmd in received packets
|
||||||
|
check pos in received packets
|
||||||
|
|
||||||
Version 2.8.1b23 - 14 Jan 2005
|
Version 2.8.1b23 - 14 Jan 2005
|
||||||
use srandomdev for seeding of client seq. number generator
|
use srandomdev for seeding of client seq. number generator
|
||||||
|
|
|
||||||
6
TODO
6
TODO
|
|
@ -22,7 +22,7 @@ we should add real,portable error codes support to CC_ERR extended data area.
|
||||||
|
|
||||||
PORTING
|
PORTING
|
||||||
Sven's Slowaris 8 compile problem
|
Sven's Slowaris 8 compile problem
|
||||||
still not builds on freebsd 4 and FreeBSD 5 - non intel platforms?
|
still do not builds on freebsd 4 and FreeBSD 5 - non intel platforms?
|
||||||
|
|
||||||
NEEDS IMPROVMENT:
|
NEEDS IMPROVMENT:
|
||||||
|
|
||||||
|
|
@ -37,8 +37,6 @@ LOCKING
|
||||||
|
|
||||||
CLIENTS
|
CLIENTS
|
||||||
:high:
|
:high:
|
||||||
bug in directory listing parsing code, fspclient has it also
|
|
||||||
pyfsp and fsplib seems to be ok.
|
|
||||||
some client commands should exit with nonzero rc on failure
|
some client commands should exit with nonzero rc on failure
|
||||||
|
|
||||||
:low:
|
:low:
|
||||||
|
|
@ -94,6 +92,7 @@ libraries and support for FSP protocol
|
||||||
DONE: FSP library for Java
|
DONE: FSP library for Java
|
||||||
DONE: FSP over HTTP
|
DONE: FSP over HTTP
|
||||||
DONE: new small,light fsplib for C.
|
DONE: new small,light fsplib for C.
|
||||||
|
DONE: fsp backend in gftp
|
||||||
|
|
||||||
FSP plugin for Netscape/MSIE.
|
FSP plugin for Netscape/MSIE.
|
||||||
Not possible to write protocol plugins with Netscape 3 SDK,
|
Not possible to write protocol plugins with Netscape 3 SDK,
|
||||||
|
|
@ -101,6 +100,7 @@ FSP plugin for Netscape/MSIE.
|
||||||
we have fsproxy now.
|
we have fsproxy now.
|
||||||
FSP backend for APT
|
FSP backend for APT
|
||||||
FSP support in major ftp programs: lftp,wget,curl
|
FSP support in major ftp programs: lftp,wget,curl
|
||||||
|
Gnome vfs2 plugin
|
||||||
AVFS plugin http://sourceforge.net/projects/avf
|
AVFS plugin http://sourceforge.net/projects/avf
|
||||||
|
|
||||||
LARGEFILES64 how to turn them on:
|
LARGEFILES64 how to turn them on:
|
||||||
|
|
|
||||||
32
client/lib.c
32
client/lib.c
|
|
@ -68,12 +68,18 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
mlen = d - (unsigned char *) &sbuf;
|
mlen = d - (unsigned char *) &sbuf;
|
||||||
|
|
||||||
key = client_get_key();
|
key = client_get_key();
|
||||||
|
u = random() & 0xfff8;
|
||||||
|
if ( u == myseq )
|
||||||
|
{
|
||||||
|
myseq ^= 0x1080;
|
||||||
|
}
|
||||||
|
else myseq = u;
|
||||||
|
|
||||||
for(retry_send = 0; ; retry_send++) {
|
for(retry_send = 0; ; retry_send++) {
|
||||||
total_delay += w_delay;
|
total_delay += w_delay;
|
||||||
BB_WRITE2(sbuf.bb_key,key);
|
BB_WRITE2(sbuf.bb_key,key);
|
||||||
sbuf.bb_seq[0] = seq0 = (myseq >> 8) & 0xff;
|
sbuf.bb_seq[0] = seq0 = (myseq >> 8) & 0x00ff;
|
||||||
sbuf.bb_seq[1] = seq1 = (myseq & 0xf8) | (retry_send & 0x0007);
|
sbuf.bb_seq[1] = seq1 = (myseq & 0x00f8) | (retry_send & 0x0007);
|
||||||
sbuf.sum = 0;
|
sbuf.sum = 0;
|
||||||
|
|
||||||
for(t = (unsigned char *) &sbuf, sum = n = mlen; n--; sum += *t++);
|
for(t = (unsigned char *) &sbuf, sum = n = mlen; n--; sum += *t++);
|
||||||
|
|
@ -179,7 +185,7 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
stat_bad++;
|
stat_bad++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/* check seq. number */
|
||||||
if( (rbuf.bb_seq[0] ^ seq0) ||
|
if( (rbuf.bb_seq[0] ^ seq0) ||
|
||||||
((rbuf.bb_seq[1] ^ seq1)&0xf8))
|
((rbuf.bb_seq[1] ^ seq1)&0xf8))
|
||||||
{
|
{
|
||||||
|
|
@ -188,7 +194,23 @@ UBUF *client_interact (unsigned char cmd, unsigned long pos,
|
||||||
stat_dupes++;
|
stat_dupes++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
myseq = (myseq + 0x0008) & 0xfff8; /* seq for next request */
|
/* check command */
|
||||||
|
if (cmd != rbuf.cmd && rbuf.cmd != CC_ERR)
|
||||||
|
{
|
||||||
|
if (client_trace) write(2,"C",1);
|
||||||
|
stat_bad++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* check pos */
|
||||||
|
if (BB_READ4(rbuf.bb_pos) != pos && (cmd == CC_GET_DIR ||
|
||||||
|
cmd == CC_GET_FILE || cmd == CC_UP_LOAD || cmd == CC_INFO ||
|
||||||
|
cmd == CC_GRAB_FILE))
|
||||||
|
{
|
||||||
|
/* wrong seq # */
|
||||||
|
if (client_trace) write(2,"P",1);
|
||||||
|
stat_bad++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
key = BB_READ2(rbuf.bb_key); /* key for next request */
|
key = BB_READ2(rbuf.bb_key); /* key for next request */
|
||||||
/* calculate real busy delay */
|
/* calculate real busy delay */
|
||||||
gettimeofday(&stop,NULL);
|
gettimeofday(&stop,NULL);
|
||||||
|
|
@ -234,6 +256,8 @@ void init_client (const char * host, unsigned short port, unsigned short myport)
|
||||||
stat_resends = stat_iresends = stat_dupes = stat_bad = stat_ok;
|
stat_resends = stat_iresends = stat_dupes = stat_bad = stat_ok;
|
||||||
#ifdef HAVE_SRANDOMDEV
|
#ifdef HAVE_SRANDOMDEV
|
||||||
srandomdev();
|
srandomdev();
|
||||||
|
#else
|
||||||
|
srandom(getpid()*time(NULL));
|
||||||
#endif
|
#endif
|
||||||
myseq = random() & 0xfff8;
|
myseq = random() & 0xfff8;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
#define UBUF_HSIZE 12 /* 12 bytes for the header */
|
#define UBUF_HSIZE 12 /* 12 bytes for the header */
|
||||||
#define UBUF_SPACE 1024 /* maximum standard payload. */
|
#define UBUF_SPACE 1024 /* maximum standard payload. */
|
||||||
#define UBUF_MAXSPACE 4096 /* maximum payload supported by server */
|
#define UBUF_MAXSPACE 4096 /* maximum payload supported by server */
|
||||||
#define DEFAULT_SPACE 1200 /* Default packet size */
|
#define DEFAULT_SPACE 1370 /* Default packet size */
|
||||||
|
|
||||||
#define NBSIZE (UBUF_MAXSPACE+UBUF_SPACE)
|
#define NBSIZE (UBUF_MAXSPACE+UBUF_SPACE)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user