Imported from conserver-GNAC-6.14.tar.gz

This commit is contained in:
Bryan Stansell 2000-01-06 14:01:17 -08:00
parent 06553246f3
commit 11ef6794ea
6 changed files with 65 additions and 36 deletions

10
CHANGES
View File

@ -1,8 +1,14 @@
CHANGES CHANGES
======= =======
version 6.14 (Jan 5, 2000):
- Determining if the local conserver controls a port (with
@conserver spec) we now compare ip addresses instead of
hostnames
- Invalid argument now shows -h output
version 6.13 (Dec 1, 1999): version 6.13 (Dec 1, 1999):
- high-bit always stripped from network - now follows - High-bit always stripped from network - now follows
CPARITY setting in cons.h (found by Daniel Andersson CPARITY setting in cons.h (found by Daniel Andersson
<daniel@sto.sema.se>) <daniel@sto.sema.se>)
- New conserver -i flag for on-demand connects/disconnects - New conserver -i flag for on-demand connects/disconnects
@ -60,5 +66,5 @@ before version 6.05:
and enhancements of various types were applied. and enhancements of various types were applied.
# #
# $Id: CHANGES,v 1.10 1999-12-01 13:29:14-08 bryan Exp $ # $Id: CHANGES,v 1.12 2000-01-06 14:01:07-08 bryan Exp $
# #

View File

@ -1,5 +1,5 @@
/* /*
* $Id: main.c,v 5.32 1999-12-01 11:55:13-08 bryan Exp $ * $Id: main.c,v 5.33 2000-01-05 14:39:39-08 bryan Exp $
* *
* Copyright GNAC, Inc., 1998 * Copyright GNAC, Inc., 1998
* *
@ -58,7 +58,7 @@
#endif #endif
char rcsid[] = char rcsid[] =
"$Id: main.c,v 5.32 1999-12-01 11:55:13-08 bryan Exp $"; "$Id: main.c,v 5.33 2000-01-05 14:39:39-08 bryan Exp $";
char *progname = char *progname =
rcsid; rcsid;
int fAll = 1, fVerbose = 0, fSoftcar = 0, fNoinit = 0; int fAll = 1, fVerbose = 0, fSoftcar = 0, fNoinit = 0;
@ -230,8 +230,8 @@ char **argv;
fprintf(stderr, "%s: gethostbyname: %s\n", progname, hstrerror(h_errno)); fprintf(stderr, "%s: gethostbyname: %s\n", progname, hstrerror(h_errno));
exit(1); exit(1);
} }
if (sizeof(acMyAddr) != hpMe->h_length || AF_INET != hpMe->h_addrtype) { if (4 != hpMe->h_length || AF_INET != hpMe->h_addrtype) {
fprintf(stderr, "%s: wrong address size (%d != %d) or adress family (%d != %d)\n", progname, sizeof(acMyAddr), hpMe->h_length, AF_INET, hpMe->h_addrtype); fprintf(stderr, "%s: wrong address size (4 != %d) or adress family (%d != %d)\n", progname, hpMe->h_length, AF_INET, hpMe->h_addrtype);
exit(1); exit(1);
} }
#if USE_STRINGS #if USE_STRINGS

View File

@ -1,5 +1,5 @@
/* /*
* $Id: main.h,v 5.11 1999-12-01 11:55:13-08 bryan Exp $ * $Id: main.h,v 5.12 2000-01-05 14:39:39-08 bryan Exp $
* *
* Copyright GNAC, Inc., 1998 * Copyright GNAC, Inc., 1998
* *
@ -41,6 +41,7 @@ extern char chDefAcc;
extern char *pcConfig; extern char *pcConfig;
extern struct sockaddr_in in_port; extern struct sockaddr_in in_port;
extern char acMyHost[]; extern char acMyHost[];
extern char acMyAddr[];
extern int domainHack; extern int domainHack;
#if defined(SERVICE) #if defined(SERVICE)

View File

@ -1,5 +1,5 @@
/* /*
* $Id: readcfg.c,v 5.26 1999-08-24 14:37:55-07 bryan Exp $ * $Id: readcfg.c,v 5.27 2000-01-05 14:39:39-08 bryan Exp $
* *
* Copyright GNAC, Inc., 1998 * Copyright GNAC, Inc., 1998
* *
@ -153,22 +153,45 @@ register FILE *fp;
* if so just add it to a linked list of remote hosts * if so just add it to a linked list of remote hosts
* I'm sure most sites will never use this code (ksb) * I'm sure most sites will never use this code (ksb)
*/ */
if ((char *)0 != (pcRem = strchr(pcLine, '@')) && if ((char *)0 != (pcRem = strchr(pcLine, '@'))) {
((*pcRem++ = '\000'), 0 != strcmp(acMyHost, pcRem))) { auto struct hostent *hpMe;
register REMOTE *pRCTemp;
pRCTemp = (REMOTE *)calloc(1, sizeof(REMOTE)); *pcRem++ = '\000';
if ((REMOTE *)0 == pRCTemp) {
CSTROUT(2, "out of memory!\n"); if ((struct hostent *)0 ==
exit(32); (hpMe = gethostbyname(pcRem))) {
fprintf(stderr, "%s: gethostbyname: %s\n", progname, hstrerror(h_errno));
exit(1);
} }
(void)strcpy(pRCTemp->rhost, pcRem); if (4 != hpMe->h_length ||
(void)strcpy(pRCTemp->rserver, acIn); AF_INET != hpMe->h_addrtype) {
*ppRC = pRCTemp; fprintf(stderr, "%s: wrong address size (4 != %d) or address family (%d != %d)\n", progname, hpMe->h_length, AF_INET, hpMe->h_addrtype);
ppRC = & pRCTemp->pRCnext; exit(1);
if (fVerbose) { }
printf("%s: %s remote on %s\n", progname, acIn, pcRem);
if ( 0 !=
#if USE_STRINGS
bcmp(&acMyAddr[0], hpMe->h_addr, hpMe->h_length)
#else
memcmp(&acMyAddr[0], hpMe->h_addr, hpMe->h_length)
#endif
) {
register REMOTE *pRCTemp;
pRCTemp = (REMOTE *)calloc(1, sizeof(REMOTE));
if ((REMOTE *)0 == pRCTemp) {
CSTROUT(2, "out of memory!\n");
exit(32);
}
(void)strcpy(pRCTemp->rhost, pcRem);
(void)strcpy(pRCTemp->rserver, acIn);
*ppRC = pRCTemp;
ppRC = & pRCTemp->pRCnext;
if (fVerbose) {
printf("%s: %s remote on %s\n", progname, acIn, pcRem);
}
continue;
} }
continue;
} }
/* take the same group as the last line, by default /* take the same group as the last line, by default

View File

@ -1,9 +1,9 @@
/* /*
* $Id: version.h,v 1.13 1999-12-01 11:55:13-08 bryan Exp $ * $Id: version.h,v 1.14 2000-01-05 14:40:16-08 bryan Exp $
* *
* Copyright GNAC, Inc., 1998 * Copyright GNAC, Inc., 1998
* *
* Maintainer/Enhancer: Bryan Stansell (bryan@gnac.com) * Maintainer/Enhancer: Bryan Stansell (bryan@gnac.com)
*/ */
#define GNAC_VERSION "GNAC version 6.13" #define GNAC_VERSION "GNAC version 6.14"

View File

@ -1,5 +1,5 @@
/* /*
* $Id: console.c,v 5.27 1999-08-23 17:32:35-07 bryan Exp $ * $Id: console.c,v 5.28 2000-01-06 14:00:13-08 bryan Exp $
* *
* Copyright GNAC, Inc., 1998 * Copyright GNAC, Inc., 1998
* *
@ -77,7 +77,7 @@ extern char *sys_errlist[];
#endif #endif
static char rcsid[] = static char rcsid[] =
"$Id: console.c,v 5.27 1999-08-23 17:32:35-07 bryan Exp $"; "$Id: console.c,v 5.28 2000-01-06 14:00:13-08 bryan Exp $";
static char *progname = static char *progname =
rcsid; rcsid;
int fVerbose = 0, fReplay = 0, fRaw = 0; int fVerbose = 0, fReplay = 0, fRaw = 0;
@ -1159,6 +1159,7 @@ char **argv;
static char acOpts[] = "b:aAdDsSfFe:hl:M:pvVwWUqQrux"; static char acOpts[] = "b:aAdDsSfFe:hl:M:pvVwWUqQrux";
extern long atol(); extern long atol();
extern int optind; extern int optind;
extern int optopt;
extern char *optarg; extern char *optarg;
if ((char *)0 == (progname = strrchr(argv[0], '/'))) { if ((char *)0 == (progname = strrchr(argv[0], '/'))) {
@ -1284,14 +1285,6 @@ char **argv;
pcCmd = "quit"; pcCmd = "quit";
break; break;
case 'h':
printf("%s: usage [-aAfFsS] [-rv] [-e esc] [-M mach] [-l username] machine\n", progname);
printf("%s: usage [-v] [-hdDuVwx] [-b message]\n", progname);
printf("%s: usage [-qQ] [-M mach]\n", progname);
Usage(stdout, apcLong);
exit(0);
/*NOTREACHED*/
case 'v': case 'v':
fVerbose = 1; fVerbose = 1;
break; break;
@ -1301,9 +1294,15 @@ char **argv;
exit(0); exit(0);
default: /* huh? */ default: /* huh? */
fprintf(stderr, "%s: unknown option `%c\', try -h\n", progname, opt); if ( opt != 'h' )
exit(1); fprintf(stderr, "%s: unknown option `%c\'\n", progname, optopt);
printf("%s: usage [-aAfFsS] [-rv] [-e esc] [-M mach] [-l username] machine\n", progname);
printf("%s: usage [-v] [-hdDuVwx] [-b message]\n", progname);
printf("%s: usage [-qQ] [-M mach]\n", progname);
Usage(stdout, apcLong);
exit(0);
/*NOTREACHED*/ /*NOTREACHED*/
} }
} }