Merge Hg remote-tracking branch 'sfhg/master' into 'master'

This commit is contained in:
Robert James Clay 2015-08-09 14:24:10 -04:00
commit d734f0c2b1
10 changed files with 97 additions and 38 deletions

View File

@ -1,4 +1,23 @@
v1.0.5 02-Nov-2014 - Andrew Leary
v1.0.6.1 07-Aug-2015 - Andrew Leary
1. Removed the Precise field from Via lines in netmail, as
it was not actually accurate anyway. Forwarded netmails had
this field set to .00, and locally generated netmails had this
field set to .01. This field is optional in FTS-4009, but
if used is supposed to indicate fractions of a second.
v1.0.6 03-Aug-2015 - Andrew Leary
1. Added support for specifying a literal IPv6 address
encased in square brackets for a node. Previously, IPv6 was
only supported for nodes having an AAAA record for their
hostname in DNS.
2. The BBS now allows alphanumeric and punctuation
characters in user passwords. Previously, only alphanumeric
characters were permitted.
3. Several minor grammar and punctuation corrections.
v1.0.5 02-Nov-2014 - Andrew Leary (Never officially released)
1. Adjusted mbcico's .flo file logic to support a space
character as the first character of the .flo file line.

6
configure vendored
View File

@ -2309,10 +2309,10 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="5"
REVISION="6"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2014 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2014 M. Broek"
COPYRIGHT="Copyright (C) 1997-2015 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2015 M. Broek"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -12,10 +12,10 @@ AC_SUBST(SUBDIRS)
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="5"
REVISION="6"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2014 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2014 M. Broek"
COPYRIGHT="Copyright (C) 1997-2015 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2015 M. Broek"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -533,7 +533,7 @@ node *getnlent(faddr *addr)
static char buf[MAXNLLINELEN], ebuf[MAXNLLINELEN], *p, *q, tbuf[256];
struct _ixentry xaddr;
int i, Found = FALSE, ixflag, stdflag, ndrecord = FALSE;
char *mydomain, *path, *r;
char *mydomain, *path, *r, *s;
struct _nlfil fdx;
struct _nlidx ndx;
int lowest, highest, current;
@ -1092,7 +1092,26 @@ node *getnlent(faddr *addr)
*/
snprintf(tbuf, 256, ":%u", tport);
nodebuf.url = xstrcat(nodebuf.url, tbuf);
}
} else if (tbuf[0] == '[') {
/*
* Literal IPv6 address, check for port number after
* ending bracket.
*/
s = strchr(tbuf, ']');
if (s == NULL) {
Syslog('+', "getnlent: invalid IPv6 address, cannot call");
if (nodebuf.url)
free(nodebuf.url);
nodebuf.url = NULL;
}
if (strchr(s, ':') == NULL) {
/*
* No port number given; add default.
*/
snprintf(tbuf, 256, ":%u", tport);
nodebuf.url = xstrcat(nodebuf.url, tbuf);
}
}
} else if (nodebuf.dflags & myisdn) {
nodebuf.url = xstrcpy((char *)"isdn://");

View File

@ -69,7 +69,7 @@ int opentcp(char *servname)
struct servent *se;
struct sockaddr_in server;
int rc, GotPort = FALSE;
char *portname, *ipver = NULL, servport[20], ipstr[INET6_ADDRSTRLEN];
char *tservname, *portname, *ipver = NULL, servport[20], ipstr[INET6_ADDRSTRLEN];
u_int16_t portnum;
struct addrinfo hints, *res=NULL, *p;
@ -80,20 +80,41 @@ int opentcp(char *servname)
Syslog('+', "Open TCP connection to \"%s\"", MBSE_SS(servname));
tcp_is_open = FALSE;
/*
* Get port number from name argument if there is a : part
*/
if ((portname = strchr(servname,':'))) {
*portname++='\0';
if ((portnum = atoi(portname))) {
server.sin_port=htons(portnum);
GotPort = TRUE;
} else if ((se = getservbyname(portname, "tcp"))) {
server.sin_port = se->s_port;
GotPort = TRUE;
}
}
if ((tservname = strchr(servname,'['))) {
/*
* Literal IPv6 address; check for port after ending bracket.
*/
tservname++; /* Strip left bracket. */
portname = strchr(tservname,']'); /* Find end of IPv6 address. */
*portname++='\0'; /* Strip right bracket. */
if ((portname = strchr(portname,':'))) {
*portname++='\0';
if ((portnum = atoi(portname))) {
server.sin_port = htons(portnum);
GotPort = TRUE;
} else if ((se = getservbyname(portname, "tcp"))) {
server.sin_port= se->s_port;
GotPort = TRUE;
}
servname = tservname;
}
} else if ((portname = strchr(servname,':'))) {
/*
* Hostname or IPv4 address.
* Get port number from name argument if there is a : part
*/
*portname++='\0';
if ((portnum = atoi(portname))) {
server.sin_port = htons(portnum);
GotPort = TRUE;
} else if ((se = getservbyname(portname, "tcp"))) {
server.sin_port = se->s_port;
GotPort = TRUE;
}
}
/*
* If not a forced port number, get the defaults.
*/

View File

@ -422,7 +422,7 @@ int UplinkRequest(faddr *t, faddr *From, int FileMgr, char *cmd)
fprintf(qp, "Please note, this is an automatic created message\r");
tm = gmtime(&Now);
fprintf(qp, "\001Via %s @%d%02d%02d.%02d%02d%02d.02.UTC %s\r",
fprintf(qp, "\001Via %s @%d%02d%02d.%02d%02d%02d.UTC mbfido %s\r",
ascfnode(bestaka_s(t), 0x1f), tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, VERSION);

View File

@ -104,14 +104,14 @@ int Ping(faddr *f, faddr *t, FILE *fp, int intransit)
fprintf(np, "\001PID: MBSE-FIDO %s (%s-%s)\r", VERSION, OsName(), OsCPU());
fprintf(np, "\001TZUTC: %s\r", gmtoffset(Now));
fprintf(np, " Dear %s\r\r", MBSE_SS(f->name));
fprintf(np, " Dear %s,\r\r", MBSE_SS(f->name));
if (intransit) {
fprintf(np, "You did send a PING to %s\r", ascfnode(t, 0x1f));
fprintf(np, "This is a TRACE response from \"%s\" aka %s\r", CFG.bbs_name, ascfnode(from, 0x1f));
fprintf(np, "The time of arrival is %s\r", rfcdate(Now));
fprintf(np, "You sent a PING request to %s.\r", ascfnode(t, 0x1f));
fprintf(np, "This is a TRACE response from \"%s\" (AKA %s).\r", CFG.bbs_name, ascfnode(from, 0x1f));
fprintf(np, "The time of arrival is %s.\r", rfcdate(Now));
} else
fprintf(np, "Your Ping arrived here at %s\r", rfcdate(Now));
fprintf(np, "Here are all the detected Via lines of the message from you:\r\r");
fprintf(np, "Your PING request arrived here at %s.\r", rfcdate(Now));
fprintf(np, "Here are all the detected VIA lines from your message:\r\r");
fprintf(np, "======================================================================\r");
rewind(fp);
@ -123,10 +123,10 @@ int Ping(faddr *f, faddr *t, FILE *fp, int intransit)
}
fprintf(np, "======================================================================\r");
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(np, "\rAll the best,\r%s\r\r", CFG.sysop_name);
fprintf(np, "%s\r", TearLine());
Now = time(NULL) - (gmt_offset((time_t)0) * 60);
rc = postnetmail(np, from, f, NULL, (char *)"Re: Ping", Now, 0x0000, FALSE, from->zone, f->zone);
rc = postnetmail(np, from, f, NULL, (char *)"Re: Your PING Request", Now, 0x0000, FALSE, from->zone, f->zone);
tidy_faddr(from);
fclose(np);

View File

@ -438,7 +438,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
now = time(NULL);
tm = gmtime(&now);
ta = bestaka_s(t);
fprintf(net, "\001Via %s @%d%02d%02d.%02d%02d%02d.00.UTC mbfido %s\r",
fprintf(net, "\001Via %s @%d%02d%02d.%02d%02d%02d.UTC mbfido %s\r",
ascfnode(ta, 0x1f), tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, VERSION);
tidy_faddr(ta);

View File

@ -1048,7 +1048,7 @@ void ExportNet(unsigned int MsgNum, int UUCPgate)
now = time(NULL);
tm = gmtime(&now);
fprintf(qp, "\001Via %s @%d%02d%02d.%02d%02d%02d.01.UTC MBSE BBS %s\r",
fprintf(qp, "\001Via %s @%d%02d%02d.%02d%02d%02d.UTC MBSE BBS %s\r",
aka2str(msgs.Aka), tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, VERSION);

View File

@ -758,14 +758,14 @@ void Getpass(char *theword)
continue;
} /* Don't Backtrack as we are at the begining of the passwd field */
if (isalnum(c)) {
if (((isalnum(c)) || (ispunct(c)))) {
password[counter] = c;
counter++;
printf("%c", CFG.iPasswd_Char);
}
} /* Allow alphanumeric and punctuation, but not CTRL characters or spaces */
}
password[counter] = '\0'; /* Make sure the string has a NULL at the end*/
password[counter] = '\0'; /* Make sure the string has a NULL at the end */
strcpy(theword,password);
}