diff --git a/CHANGES b/CHANGES index 5c8b9e7..c3e5a54 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,17 @@ CHANGES ======= +version 8.0.4 (Oct 10, 2003): + - fixed client rejection bug that can nearly never happen - + reported by Han Pilmeyer + - fixed bug where client is reconnected to the previous console + when non-exact console names are used - reported by Rolf + Petter Halle + - fixed bug where exact matchs on a remote console name never + happened - reported by Toby Gerhart + - fixed bug where SIGHUP fails to update console aliases - + reported by Han Pilmeyer + version 8.0.3 (Oct 6, 2003): - the SIGHUP process fails to pick up changes to certain fields because of a horribly broken SwapStr() function [broken in @@ -562,5 +573,5 @@ before version 6.05: and enhancements of various types were applied. # -# $Id: CHANGES,v 1.116 2003-10-06 10:05:23-07 bryan Exp $ +# $Id: CHANGES,v 1.118 2003-10-10 09:02:38-07 bryan Exp $ # diff --git a/conserver.cf/conserver.cf.man b/conserver.cf/conserver.cf.man index 665db38..73c7ae3 100644 --- a/conserver.cf/conserver.cf.man +++ b/conserver.cf/conserver.cf.man @@ -1,5 +1,5 @@ .\" $Id: conserver.cf.man,v 1.43 2003-10-02 19:01:05-07 bryan Exp $ -.TH CONSERVER.CF 5 "2003-10-02" "conserver-8.0.3" "conserver" +.TH CONSERVER.CF 5 "2003-10-02" "conserver-8.0.4" "conserver" .SH NAME conserver.cf \- console configuration file for .BR conserver (8) diff --git a/conserver.cf/conserver.passwd.man b/conserver.cf/conserver.passwd.man index dda6290..928ecc7 100644 --- a/conserver.cf/conserver.passwd.man +++ b/conserver.cf/conserver.passwd.man @@ -1,5 +1,5 @@ .\" $Id: conserver.passwd.man,v 1.9 2003-07-04 13:20:52-07 bryan Exp $ -.TH CONSERVER.PASSWD 5 "2003-07-04" "conserver-8.0.3" "conserver" +.TH CONSERVER.PASSWD 5 "2003-07-04" "conserver-8.0.4" "conserver" .SH NAME conserver.passwd \- user access information for .BR conserver (8) diff --git a/conserver.html b/conserver.html index 8b9b75f..410d567 100644 --- a/conserver.html +++ b/conserver.html @@ -183,11 +183,11 @@

Downloading

-

The current version, released on Oct 6, 2003, is 8.0.3.tar.gz. You can get it via +

The current version, released on Oct 10, 2003, is 8.0.4.tar.gz. You can get it via FTP - or HTTP. See the FTP + or HTTP. See the CHANGES file for information on the latest updates.

diff --git a/conserver/client.h b/conserver/client.h index dd04387..0070d20 100644 --- a/conserver/client.h +++ b/conserver/client.h @@ -1,5 +1,5 @@ /* - * $Id: client.h,v 5.32 2003-09-28 08:41:20-07 bryan Exp $ + * $Id: client.h,v 5.33 2003-10-10 03:28:49-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -63,7 +63,6 @@ typedef struct client { /* Connection Information: */ time_t typetym; /* time of last keystroke */ char actym[32]; /* pre-formatted time */ struct consent - *pCEwant, /* what machine we would like to be on */ *pCEto; /* host a client gets output from */ struct client **ppCLbscan, /* back link for scan ptr */ diff --git a/conserver/conserver.man b/conserver/conserver.man index 3975f1f..10a8b4b 100644 --- a/conserver/conserver.man +++ b/conserver/conserver.man @@ -1,6 +1,6 @@ .\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine .\" $Id: conserver.man,v 1.38 2003-09-22 08:33:41-07 bryan Exp $ -.TH CONSERVER 8 "2003-09-22" "conserver-8.0.3" "conserver" +.TH CONSERVER 8 "2003-09-22" "conserver-8.0.4" "conserver" .SH NAME conserver \- console server daemon .SH SYNOPSIS diff --git a/conserver/group.c b/conserver/group.c index dc14886..51d5517 100644 --- a/conserver/group.c +++ b/conserver/group.c @@ -1,5 +1,5 @@ /* - * $Id: group.c,v 5.262 2003-10-05 17:04:02-07 bryan Exp $ + * $Id: group.c,v 5.264 2003-10-10 03:28:49-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -2534,6 +2534,7 @@ DoClientRead(pGE, pCLServing) FileWrite(pCLServing->fd, FLAGFALSE, "call requires argument\r\n", -1); else { + CONSENT *pCEwant = (CONSENT *)0; /* try to move to the given console * we assume all the right checks for ambiguity * were already done by the master process, so @@ -2544,33 +2545,33 @@ DoClientRead(pGE, pCLServing) NAMES *n = (NAMES *)0; if (strcasecmp(pcArgs, pCE->server) == 0) { - pCLServing->pCEwant = pCE; + pCEwant = pCE; break; } for (n = pCE->aliases; n != (NAMES *)0; n = n->next) { if (strcasecmp(pcArgs, n->name) == 0) { - pCLServing->pCEwant = pCE; + pCEwant = pCE; break; } } if (n != (NAMES *)0) break; } - if (pCLServing->pCEwant == (CONSENT *)0) { + if (pCEwant == (CONSENT *)0) { NAMES *n = (NAMES *)0; int len = strlen(pcArgs); for (pCE = pGE->pCElist; pCE != (CONSENT *)0; pCE = pCE->pCEnext) { if (strncasecmp(pcArgs, pCE->server, len) == 0) { - pCLServing->pCEwant = pCE; + pCEwant = pCE; break; } for (n = pCE->aliases; n != (NAMES *)0; n = n->next) { if (strncasecmp(pcArgs, n->name, len) == 0) { - pCLServing->pCEwant = pCE; + pCEwant = pCE; break; } } @@ -2579,7 +2580,7 @@ DoClientRead(pGE, pCLServing) } } - if (pCLServing->pCEwant == (CONSENT *)0) { + if (pCEwant == (CONSENT *)0) { FilePrint(pCLServing->fd, FLAGFALSE, "%s: no such console\r\n", pcArgs); DisconnectClient(pGE, pCLServing, (char *)0, @@ -2588,7 +2589,7 @@ DoClientRead(pGE, pCLServing) } pCLServing->fro = - ClientAccess(pCLServing->pCEwant, + ClientAccess(pCEwant, pCLServing->username->string); if (pCLServing->fro == -1) { FilePrint(pCLServing->fd, FLAGFALSE, @@ -2616,14 +2617,13 @@ DoClientRead(pGE, pCLServing) /* inform operators of the change */ Verbose(" attach %s to %s", - pCLServing->acid->string, - pCLServing->pCEwant->server); - Msg("[%s] login %s", pCLServing->pCEwant->server, + pCLServing->acid->string, pCEwant->server); + Msg("[%s] login %s", pCEwant->server, pCLServing->acid->string); /* set new host and link into new host list */ - pCEServing = pCLServing->pCEwant; + pCEServing = pCEwant; pCLServing->pCEto = pCEServing; pCLServing->pCLnext = pCEServing->pCLon; pCLServing->ppCLbnext = &pCEServing->pCLon; @@ -4058,11 +4058,11 @@ Kiddie(pGE, sfd) pCL->ioState = ISNORMAL; /* say hi to start */ FileWrite(pCL->fd, FLAGFALSE, "ok\r\n", -1); + BuildString(pCL->peername->string, pCL->acid); + CONDDEBUG((1, "Kiddie(): client acid initialized to `%s'", + pCL->acid->string)); } else - DisconnectClient(pGE, pCLServing, (char *)0, FLAGFALSE); - BuildString(pCL->peername->string, pCL->acid); - CONDDEBUG((1, "Kiddie(): client acid initialized to `%s'", - pCL->acid->string)); + DisconnectClient(pGE, pCL, (char *)0, FLAGFALSE); } } diff --git a/conserver/master.c b/conserver/master.c index 6393be2..f795422 100644 --- a/conserver/master.c +++ b/conserver/master.c @@ -1,5 +1,5 @@ /* - * $Id: master.c,v 5.117 2003-10-03 07:23:37-07 bryan Exp $ + * $Id: master.c,v 5.118 2003-10-10 03:29:21-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -231,6 +231,28 @@ SignalKids(arg) } } +REMOTE * +#if PROTOTYPES +FindRemoteConsole(char *args) +#else +FindRemoteConsole(args) + char *args; +#endif +{ + REMOTE *pRC; + NAMES *name; + + for (pRC = pRCList; (REMOTE *)0 != pRC; pRC = pRC->pRCnext) { + if (strcasecmp(args, pRC->rserver) == 0) + return pRC; + for (name = pRC->aliases; name != (NAMES *)0; name = name->next) { + if (strcasecmp(args, name->name) == 0) + return pRC; + } + } + return pRC; +} + void #if PROTOTYPES CommandCall(CONSCLIENT *pCL, char *args) @@ -263,9 +285,7 @@ CommandCall(pCL, args) } if (config->redirect == FLAGTRUE || (config->redirect != FLAGTRUE && found == 0)) { - for (pRC = pRCList; (REMOTE *)0 != pRC; pRC = pRC->pRCnext) { - if (strcasecmp(args, pRC->rserver) != 0) - continue; + if ((pRC = FindRemoteConsole(args)) != (REMOTE *)0) { ambiguous = BuildTmpString(pRC->rserver); ambiguous = BuildTmpString(", "); ++found; diff --git a/conserver/readcfg.c b/conserver/readcfg.c index f5f255e..34d6edb 100644 --- a/conserver/readcfg.c +++ b/conserver/readcfg.c @@ -1,5 +1,5 @@ /* - * $Id: readcfg.c,v 5.145 2003-10-06 10:07:26-07 bryan Exp $ + * $Id: readcfg.c,v 5.146 2003-10-10 08:58:12-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -629,6 +629,14 @@ DestroyParserDefaultOrConsole(c, ph, pt) free(c->motd); if (c->execSlave != (char *)0) free(c->execSlave); + while (c->aliases != (NAMES *)0) { + NAMES *name; + name = c->aliases->next; + if (c->aliases->name != (char *)0) + free(c->aliases->name); + free(c->aliases); + c->aliases = name; + } if (c->wbuf != (STRING *)0) DestroyString(c->wbuf); free(c); @@ -2179,6 +2187,16 @@ ConsoleAdd(c) pCEmatch->reinitoncc = c->reinitoncc; pCEmatch->autoreinit = c->autoreinit; pCEmatch->unloved = c->unloved; + while (pCEmatch->aliases != (NAMES *)0) { + NAMES *name; + name = pCEmatch->aliases->next; + if (pCEmatch->aliases->name != (char *)0) + free(pCEmatch->aliases->name); + free(pCEmatch->aliases); + pCEmatch->aliases = name; + } + pCEmatch->aliases = c->aliases; + c->aliases = (NAMES *)0; /* we have to override the ro/rw lists... */ /* so first destroy the existing (which point to freed space anyway) */ @@ -3132,8 +3150,6 @@ DestroyConfig(c) free(c->logfile); if (c->initcmd != (char *)0) free(c->initcmd); - if (c->motd != (char *)0) - free(c->motd); if (c->passwdfile != (char *)0) free(c->passwdfile); if (c->primaryport != (char *)0) @@ -3199,12 +3215,6 @@ ConfigEnd() pConfig->initcmd = parserConfigTemp->initcmd; parserConfigTemp->initcmd = (char *)0; } - if (parserConfigTemp->motd != (char *)0) { - if (pConfig->motd != (char *)0) - free(pConfig->motd); - pConfig->motd = parserConfigTemp->motd; - parserConfigTemp->motd = (char *)0; - } if (parserConfigTemp->passwdfile != (char *)0) { if (pConfig->passwdfile != (char *)0) free(pConfig->passwdfile); diff --git a/conserver/readcfg.h b/conserver/readcfg.h index 985ee99..0aac125 100644 --- a/conserver/readcfg.h +++ b/conserver/readcfg.h @@ -1,5 +1,5 @@ /* - * $Id: readcfg.h,v 5.33 2003-10-02 18:53:48-07 bryan Exp $ + * $Id: readcfg.h,v 5.34 2003-10-10 08:57:17-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -12,7 +12,6 @@ typedef struct config { FLAG daemonmode; char *logfile; char *initcmd; - char *motd; char *passwdfile; char *primaryport; FLAG redirect; diff --git a/conserver/version.h b/conserver/version.h index 17269c8..c23dbff 100644 --- a/conserver/version.h +++ b/conserver/version.h @@ -1,5 +1,5 @@ /* - * $Id: version.h,v 1.49 2003-10-06 10:07:59-07 bryan Exp $ + * $Id: version.h,v 1.50 2003-10-10 09:02:08-07 bryan Exp $ * * Copyright conserver.com, 2000 * @@ -14,4 +14,4 @@ @(#) Copyright 2000 conserver.com.\n\ All rights reserved.\n" -#define THIS_VERSION "conserver.com version 8.0.3" +#define THIS_VERSION "conserver.com version 8.0.4" diff --git a/console/console.man b/console/console.man index 911f4a9..055f1c9 100644 --- a/console/console.man +++ b/console/console.man @@ -1,5 +1,5 @@ .\" $Id: console.man,v 1.37 2003-10-02 19:00:45-07 bryan Exp $ -.TH CONSOLE 1 "2003-10-02" "conserver-8.0.3" "conserver" +.TH CONSOLE 1 "2003-10-02" "conserver-8.0.4" "conserver" .SH NAME console \- console server client program .SH SYNOPSIS diff --git a/contrib/redhat-rpm/conserver.spec b/contrib/redhat-rpm/conserver.spec index 81303df..44da46e 100644 --- a/contrib/redhat-rpm/conserver.spec +++ b/contrib/redhat-rpm/conserver.spec @@ -4,7 +4,7 @@ # %define pkg conserver -%define ver conserver-8.0.3 +%define ver conserver-8.0.4 # define the name of the machine on which the main conserver # daemon will be running if you don't want to use the default diff --git a/contrib/solaris-package/pkginfo b/contrib/solaris-package/pkginfo index 610b689..2975178 100644 --- a/contrib/solaris-package/pkginfo +++ b/contrib/solaris-package/pkginfo @@ -1,7 +1,7 @@ PKG="conserver" NAME="Console server and client" CATEGORY="system" -VERSION="conserver-8.0.3" +VERSION="conserver-8.0.4" DESC="Console server and client" CLASSES=none ARCH=sparc