More fixes for FST-0001 passwword checks
This commit is contained in:
parent
b3dbbdbb6c
commit
e1ef7925a2
6
TODO
6
TODO
@ -109,11 +109,7 @@ mbcico:
|
|||||||
transfers. Changes are under test now. Feedback needed!
|
transfers. Changes are under test now. Feedback needed!
|
||||||
|
|
||||||
N: Implement binkp resync when getting files. Transmit works.
|
N: Implement binkp resync when getting files. Transmit works.
|
||||||
|
Under test now!
|
||||||
N: FTS-0001 sessions always are secure, the password check is not
|
|
||||||
good.
|
|
||||||
|
|
||||||
N: The FTS-0001 incoming hello packet is not after a session.
|
|
||||||
|
|
||||||
mbfile:
|
mbfile:
|
||||||
L: Add a check to see if the magic filenames are (still) valid.
|
L: Add a check to see if the magic filenames are (still) valid.
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
<h5>Last update 21-Jan-2002</h5>
|
<h5>Last update 24-Aug-2003</h5>
|
||||||
<P> <P>
|
<P> <P>
|
||||||
<H1>MBSE BBS - Known bugs.</H1>
|
<H1>MBSE BBS - Known bugs.</H1>
|
||||||
<P>
|
<P>
|
||||||
@ -28,6 +28,11 @@ slow links and over PPP. This is not a MBSE BBS problem.
|
|||||||
<LI>Problems with D'Bridge [1a] mailers.
|
<LI>Problems with D'Bridge [1a] mailers.
|
||||||
|
|
||||||
<LI>mbsetup crashes at several places if in system aka's the domain name is 12 characters long.
|
<LI>mbsetup crashes at several places if in system aka's the domain name is 12 characters long.
|
||||||
|
|
||||||
|
<LI>If you have regular sessions with a node wich only supports FTS-0001
|
||||||
|
sessions and you use a session password you <b>must</b> also set a mail password
|
||||||
|
and these passwords must be the same. This is a side effect of the way FTS-0001
|
||||||
|
handshake works, by sending a small mail packet wich contains the password.
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<A HREF="index.htm"><IMG SRC="images/b_arrow.png" ALT="Back" Border="0">Go Back</A>
|
<A HREF="index.htm"><IMG SRC="images/b_arrow.png" ALT="Back" Border="0">Go Back</A>
|
||||||
|
110
lib/packet.c
110
lib/packet.c
@ -62,21 +62,16 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor, int session)
|
|||||||
|
|
||||||
if (pkt == NULL) {
|
if (pkt == NULL) {
|
||||||
if (pktfp) {
|
if (pktfp) {
|
||||||
Syslog('P', "packet opened, check address");
|
|
||||||
if (metric(addr,&pktroute) == 0) {
|
if (metric(addr,&pktroute) == 0) {
|
||||||
if ((CFG.maxpktsize == 0L) || ((fstat(fileno(pktfp),&st) == 0) && (st.st_size < CFG.maxpktsize))) {
|
if ((CFG.maxpktsize == 0L) || ((fstat(fileno(pktfp),&st) == 0) && (st.st_size < CFG.maxpktsize))) {
|
||||||
Syslog('P', "return existing fp");
|
|
||||||
return pktfp;
|
return pktfp;
|
||||||
}
|
}
|
||||||
Syslog('P', "packet too big, open new");
|
|
||||||
closepkt();
|
closepkt();
|
||||||
} else {
|
} else {
|
||||||
Syslog('P', "address changed, closing fp");
|
|
||||||
closepkt();
|
closepkt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Syslog('P', "open new packet file");
|
|
||||||
pktroute.zone = addr->zone;
|
pktroute.zone = addr->zone;
|
||||||
pktroute.net = addr->net;
|
pktroute.net = addr->net;
|
||||||
pktroute.node = addr->node;
|
pktroute.node = addr->node;
|
||||||
@ -109,8 +104,6 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor, int session)
|
|||||||
|
|
||||||
pos = ftell(pkt);
|
pos = ftell(pkt);
|
||||||
if (pos <= 0L) {
|
if (pos <= 0L) {
|
||||||
Syslog('P', "creating new .pkt");
|
|
||||||
Syslog('s', "openpkt() create .pkt in %s mode", session?"session":"mail");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write .PKT header, see FSC-0039 rev. 4
|
* Write .PKT header, see FSC-0039 rev. 4
|
||||||
@ -121,60 +114,60 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor, int session)
|
|||||||
if (ptm->tm_sec > 59)
|
if (ptm->tm_sec > 59)
|
||||||
ptm->tm_sec = 59;
|
ptm->tm_sec = 59;
|
||||||
|
|
||||||
bestaka = bestaka_s(addr);
|
bestaka = bestaka_s(addr);
|
||||||
buffer[0x00] = (bestaka->node & 0x00ff);
|
buffer[0x00] = (bestaka->node & 0x00ff);
|
||||||
buffer[0x01] = (bestaka->node & 0xff00) >> 8;
|
buffer[0x01] = (bestaka->node & 0xff00) >> 8;
|
||||||
buffer[0x02] = (addr->node & 0x00ff);
|
buffer[0x02] = (addr->node & 0x00ff);
|
||||||
buffer[0x03] = (addr->node & 0xff00) >> 8;
|
buffer[0x03] = (addr->node & 0xff00) >> 8;
|
||||||
buffer[0x04] = ((ptm->tm_year + 1900) & 0x00ff);
|
buffer[0x04] = ((ptm->tm_year + 1900) & 0x00ff);
|
||||||
buffer[0x05] = ((ptm->tm_year + 1900) & 0xff00) >> 8;
|
buffer[0x05] = ((ptm->tm_year + 1900) & 0xff00) >> 8;
|
||||||
buffer[0x06] = ptm->tm_mon;
|
buffer[0x06] = ptm->tm_mon;
|
||||||
buffer[0x08] = ptm->tm_mday;
|
buffer[0x08] = ptm->tm_mday;
|
||||||
buffer[0x0a] = ptm->tm_hour;
|
buffer[0x0a] = ptm->tm_hour;
|
||||||
buffer[0x0c] = ptm->tm_min;
|
buffer[0x0c] = ptm->tm_min;
|
||||||
buffer[0x0e] = ptm->tm_sec;
|
buffer[0x0e] = ptm->tm_sec;
|
||||||
buffer[0x12] = 2;
|
buffer[0x12] = 2;
|
||||||
buffer[0x14] = (bestaka->net & 0x00ff);
|
buffer[0x14] = (bestaka->net & 0x00ff);
|
||||||
buffer[0x15] = (bestaka->net & 0xff00) >> 8;
|
buffer[0x15] = (bestaka->net & 0xff00) >> 8;
|
||||||
buffer[0x16] = (addr->net & 0x00ff);
|
buffer[0x16] = (addr->net & 0x00ff);
|
||||||
buffer[0x17] = (addr->net & 0xff00) >> 8;
|
buffer[0x17] = (addr->net & 0xff00) >> 8;
|
||||||
buffer[0x18] = (PRODCODE & 0x00ff);
|
buffer[0x18] = (PRODCODE & 0x00ff);
|
||||||
buffer[0x19] = (VERSION_MAJOR & 0x00ff);
|
buffer[0x19] = (VERSION_MAJOR & 0x00ff);
|
||||||
|
|
||||||
memset(&str, 0, 8);
|
memset(&str, 0, 8);
|
||||||
if (session) {
|
if (session) {
|
||||||
if (noderecord(addr) && strlen(nodes.Epasswd))
|
if (noderecord(addr) && strlen(nodes.Spasswd))
|
||||||
sprintf(str, "%s", nodes.Spasswd);
|
sprintf(str, "%s", nodes.Spasswd);
|
||||||
} else {
|
} else {
|
||||||
if (noderecord(addr) && strlen(nodes.Epasswd))
|
if (noderecord(addr) && strlen(nodes.Epasswd))
|
||||||
sprintf(str, "%s", nodes.Epasswd);
|
sprintf(str, "%s", nodes.Epasswd);
|
||||||
}
|
}
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
buffer[0x1a + i] = toupper(str[i]); /* FSC-0039 only talks about A-Z, 0-9, so force uppercase */
|
buffer[0x1a + i] = toupper(str[i]); /* FSC-0039 only talks about A-Z, 0-9, so force uppercase */
|
||||||
|
|
||||||
buffer[0x22] = (bestaka->zone & 0x00ff);
|
buffer[0x22] = (bestaka->zone & 0x00ff);
|
||||||
buffer[0x23] = (bestaka->zone & 0xff00) >> 8;
|
buffer[0x23] = (bestaka->zone & 0xff00) >> 8;
|
||||||
buffer[0x24] = (addr->zone & 0x00ff);
|
buffer[0x24] = (addr->zone & 0x00ff);
|
||||||
buffer[0x25] = (addr->zone & 0xff00) >> 8;
|
buffer[0x25] = (addr->zone & 0xff00) >> 8;
|
||||||
buffer[0x29] = 1;
|
buffer[0x29] = 1;
|
||||||
buffer[0x2a] = (PRODCODE & 0xff00) >> 8;
|
buffer[0x2a] = (PRODCODE & 0xff00) >> 8;
|
||||||
buffer[0x2b] = (VERSION_MINOR & 0x00ff);
|
buffer[0x2b] = (VERSION_MINOR & 0x00ff);
|
||||||
buffer[0x2c] = 1;
|
buffer[0x2c] = 1;
|
||||||
buffer[0x2e] = buffer[0x22];
|
buffer[0x2e] = buffer[0x22];
|
||||||
buffer[0x2f] = buffer[0x23];
|
buffer[0x2f] = buffer[0x23];
|
||||||
buffer[0x30] = buffer[0x24];
|
buffer[0x30] = buffer[0x24];
|
||||||
buffer[0x31] = buffer[0x25];
|
buffer[0x31] = buffer[0x25];
|
||||||
buffer[0x32] = (bestaka->point & 0x00ff);
|
buffer[0x32] = (bestaka->point & 0x00ff);
|
||||||
buffer[0x33] = (bestaka->point & 0xff00) >> 8;
|
buffer[0x33] = (bestaka->point & 0xff00) >> 8;
|
||||||
buffer[0x34] = (addr->point & 0x00ff);
|
buffer[0x34] = (addr->point & 0x00ff);
|
||||||
buffer[0x35] = (addr->point & 0xff00) >> 8;
|
buffer[0x35] = (addr->point & 0xff00) >> 8;
|
||||||
buffer[0x36] = 'm';
|
buffer[0x36] = 'm';
|
||||||
buffer[0x37] = 'b';
|
buffer[0x37] = 'b';
|
||||||
buffer[0x38] = 's';
|
buffer[0x38] = 's';
|
||||||
buffer[0x39] = 'e';
|
buffer[0x39] = 'e';
|
||||||
|
|
||||||
fseek(pkt, 0L, SEEK_SET);
|
fseek(pkt, 0L, SEEK_SET);
|
||||||
fwrite(buffer, 1, 0x3a, pkt);
|
fwrite(buffer, 1, 0x3a, pkt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pkt;
|
return pkt;
|
||||||
@ -186,7 +179,6 @@ void closepkt(void)
|
|||||||
{
|
{
|
||||||
unsigned char buffer[2];
|
unsigned char buffer[2];
|
||||||
|
|
||||||
Syslog('P', "closepkt entered");
|
|
||||||
memset(&buffer, 0, sizeof(buffer));
|
memset(&buffer, 0, sizeof(buffer));
|
||||||
|
|
||||||
if (pktfp) {
|
if (pktfp) {
|
||||||
|
@ -328,11 +328,14 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
*/
|
*/
|
||||||
tmpfl = fl;
|
tmpfl = fl;
|
||||||
while ((flavor = *tmpfl++)) {
|
while ((flavor = *tmpfl++)) {
|
||||||
|
|
||||||
|
Syslog('o', "Check flavor %c", flavor);
|
||||||
/*
|
/*
|
||||||
* Check normal mail packets
|
* Check normal mail packets
|
||||||
*/
|
*/
|
||||||
nm = pktname(tmpa->addr,flavor);
|
nm = pktname(tmpa->addr,flavor);
|
||||||
if ((nm != NULL) && (stat(nm,&stbuf) == 0)) {
|
if ((nm != NULL) && (stat(nm,&stbuf) == 0)) {
|
||||||
|
Syslog('o', "found %s", nm);
|
||||||
packets++;
|
packets++;
|
||||||
add_list(&st, nm, tmpkname(), KFS, 0L, NULL, 1);
|
add_list(&st, nm, tmpkname(), KFS, 0L, NULL, 1);
|
||||||
}
|
}
|
||||||
@ -358,6 +361,7 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Syslog('o', "B4 FTS-0001 checkpoint");
|
||||||
/*
|
/*
|
||||||
* For FTS-0001 we need to create at least one packet.
|
* For FTS-0001 we need to create at least one packet.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user