Skip to content

Commit

Permalink
Imported from conserver-8.0.2.tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
bstansell committed Oct 6, 2003
1 parent de2e2fd commit 66e0902
Show file tree
Hide file tree
Showing 26 changed files with 763 additions and 482 deletions.
18 changes: 17 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
CHANGES
=======

version 8.0.2 (Oct 5, 2003):
- reworked the i/o calls to better buffer data
- added console 'motd' option for holding a "message of the
day", displayed to the client on attachment to console -
suggested by Toby Gerhart <toby.gerhart@eds.com>
- added ^Ecm client command for displaying MOTD and integrated
it into the client console attachment sequence
- now unallocate client lists when forking new child conserver
processes
- changed strdup() to local StrDup() so dmalloc can gracefully
track changes
- added a ^Ec; sequence to let client signal server when it's
ready to see console data, otherwise a chatty console can
cause the login sequence to fail and you can never attach to
the console

version 8.0.1 (Sep 29, 2003):
- fixed bug in access list parsing where multiple addresses per
line can cause errors - reported by Jay McCanta
Expand Down Expand Up @@ -540,5 +556,5 @@ before version 6.05:
and enhancements of various types were applied.

#
# $Id: CHANGES,v 1.109 2003-09-29 08:41:20-07 bryan Exp $
# $Id: CHANGES,v 1.115 2003-10-05 18:04:09-07 bryan Exp $
#
11 changes: 10 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ Upgrading?
new features added to the client if you're considering *not*
upgrading.

Version 8.0.2

- I've added a '^Ec;' sequence to allow the client to signal the
server as to when it's ready to see console data. Without
this, verbose consoles will prevent clients from attaching
(the client sees unexpected data). An 8.0.2 client should be
compatible with an 8.0.1 server, but an 8.0.1 client is not
compatible with an 8.0.2 server.

Version 8.0.1

- There's a slight client/server protocol change to implement
Expand Down Expand Up @@ -246,5 +255,5 @@ Other Information And Gotchas


#
# $Id: INSTALL,v 1.33 2003-09-28 17:50:05-07 bryan Exp $
# $Id: INSTALL,v 1.34 2003-10-03 10:52:31-07 bryan Exp $
#
14 changes: 12 additions & 2 deletions conserver.cf/conserver.cf.man
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" $Id: conserver.cf.man,v 1.42 2003-09-28 12:23:04-07 bryan Exp $
.TH CONSERVER.CF 5 "2003-09-28" "conserver-8.0.1" "conserver"
.\" $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.2" "conserver"
.SH NAME
conserver.cf \- console configuration file for
.BR conserver (8)
Expand Down Expand Up @@ -456,6 +456,16 @@ The host may be specified by
or using the address
.IR ipaddr .
.TP
.B motd
.RI [ " message "
| "" ]
.br
Set the "message of the day" for the console to
.IR message ,
which gets displayed when a client attaches to the console.
If the null string (``""'') is used, the MOTD is unset and
no message will occur.
.TP
.B options
.RI [ " option" ,...
| "" ]
Expand Down
2 changes: 1 addition & 1 deletion conserver.cf/conserver.passwd.man
Original file line number Diff line number Diff line change
@@ -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.1" "conserver"
.TH CONSERVER.PASSWD 5 "2003-07-04" "conserver-8.0.2" "conserver"
.SH NAME
conserver.passwd \- user access information for
.BR conserver (8)
Expand Down
8 changes: 4 additions & 4 deletions conserver.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ <H3>The conserver.com Distribution</H3>

<H3>Downloading</H3>

<P>The current version, released on Sep 29, 2003, is <A
href="8.0.1.tar.gz">8.0.1.tar.gz</A>. You can get it via
<P>The current version, released on Oct 5, 2003, is <A
href="8.0.2.tar.gz">8.0.2.tar.gz</A>. You can get it via
<A href=
"ftp://ftp.conserver.com/conserver/8.0.1.tar.gz">FTP</A>
or <A href="8.0.1.tar.gz">HTTP</A>. See the <A href=
"ftp://ftp.conserver.com/conserver/8.0.2.tar.gz">FTP</A>
or <A href="8.0.2.tar.gz">HTTP</A>. See the <A href=
"CHANGES">CHANGES</A> file for information on the latest
updates.</P>

Expand Down
6 changes: 3 additions & 3 deletions conserver/access.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: access.c,v 5.66 2003-08-15 14:24:39-07 bryan Exp $
* $Id: access.c,v 5.67 2003-10-03 06:32:34-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
Expand Down Expand Up @@ -241,7 +241,7 @@ SetDefAccess(pAddr, pHost)
addr = inet_ntoa(*pAddr);
if ((a = (ACCESS *)calloc(1, sizeof(ACCESS))) == (ACCESS *)0)
OutOfMem();
if ((a->pcwho = strdup(addr)) == (char *)0)
if ((a->pcwho = StrDup(addr)) == (char *)0)
OutOfMem();
a->ctrust = 'a';
a->pACnext = pACList;
Expand All @@ -258,7 +258,7 @@ SetDefAccess(pAddr, pHost)

if ((a = (ACCESS *)calloc(1, sizeof(ACCESS))) == (ACCESS *)0)
OutOfMem();
if ((a->pcwho = strdup(pcDomain)) == (char *)0)
if ((a->pcwho = StrDup(pcDomain)) == (char *)0)
OutOfMem();
a->ctrust = 'a';
a->pACnext = pACList;
Expand Down
43 changes: 25 additions & 18 deletions conserver/client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: client.c,v 5.70 2003-09-28 08:42:06-07 bryan Exp $
* $Id: client.c,v 5.72 2003-10-02 18:49:13-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
Expand Down Expand Up @@ -78,9 +78,10 @@ FindWrite(pCE)
pCL->fwantwr = 0;
pCL->fwr = 1;
if (pCE->nolog) {
FileWrite(pCL->fd, "\r\n[attached (nologging)]\r\n", -1);
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached (nologging)]\r\n",
-1);
} else {
FileWrite(pCL->fd, "\r\n[attached]\r\n", -1);
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached]\r\n", -1);
}
TagLogfileAct(pCE, "%s attached", pCL->acid->string);
pCE->pCLwr = pCL;
Expand Down Expand Up @@ -130,7 +131,8 @@ Replay(fdLog, fdOut, iBack)
#endif

if ((CONSFILE *)0 == fdLog) {
FileWrite(fdOut, "[no log file on this console]\r\n", -1);
FileWrite(fdOut, FLAGFALSE, "[no log file on this console]\r\n",
-1);
return;
}

Expand Down Expand Up @@ -311,8 +313,8 @@ Replay(fdLog, fdOut, iBack)
if ((char *)0 != s) {
*s = '\000';
}
FileWrite(fdOut, lines[i].line->string, -1);
FileWrite(fdOut, " .. ", -1);
FileWrite(fdOut, FLAGTRUE, lines[i].line->string, -1);
FileWrite(fdOut, FLAGTRUE, " .. ", -1);

/* build the end string by removing the leading "[-- MARK -- "
* and replacing "]\r\n" on the end with " -- MARK --]\r\n"
Expand All @@ -323,12 +325,13 @@ Replay(fdLog, fdOut, iBack)
if ((char *)0 != s) {
*s = '\000';
}
FileWrite(fdOut, lines[i].mark_end->string + mark_len, -1);
FileWrite(fdOut, " -- MARK --]\r\n", -1);
FileWrite(fdOut, FLAGTRUE,
lines[i].mark_end->string + mark_len, -1);
FileWrite(fdOut, FLAGFALSE, " -- MARK --]\r\n", -1);
u = lines[i].mark_end->used;
s = lines[i].mark_end->string;
} else
FileWrite(fdOut, lines[i].line->string, -1);
FileWrite(fdOut, FLAGFALSE, lines[i].line->string, -1);
}

common_exit:
Expand Down Expand Up @@ -381,6 +384,7 @@ static HELP aHLTable[] = {
{WHEN_ATTACH, "l? break sequence list"},
{WHEN_ATTACH, "l0 send break per config file"},
{WHEN_ATTACH, "l1-9 send specific break sequence"},
{WHEN_ALWAYS, "m display the message of the day"},
{WHEN_ALWAYS, "o (re)open the tty and log file"},
{WHEN_ALWAYS, "p replay the last 60 lines"},
{WHEN_ALWAYS, "r replay the last 20 lines"},
Expand Down Expand Up @@ -424,10 +428,10 @@ HelpUser(pCL)

iCmp = WHEN_ALWAYS | WHEN_SPY;
if (pCL->fwr) {
FileWrite(pCL->fd, acH1, sizeof(acH1) - 1);
FileWrite(pCL->fd, FLAGTRUE, acH1, sizeof(acH1) - 1);
iCmp |= WHEN_ATTACH;
} else {
FileWrite(pCL->fd, acH2, sizeof(acH2) - 1);
FileWrite(pCL->fd, FLAGTRUE, acH2, sizeof(acH2) - 1);
}
if ('\033' == pCL->ic[0] && 'O' == pCL->ic[1]) {
iCmp |= WHEN_VT100;
Expand All @@ -445,12 +449,12 @@ HelpUser(pCL)
}
BuildString(aHLTable[i].actext, acLine);
BuildString(acEoln, acLine);
FileWrite(pCL->fd, acLine->string, -1);
FileWrite(pCL->fd, FLAGTRUE, acLine->string, -1);
BuildString((char *)0, acLine);
continue;
} else {
BuildString(acEoln, acLine);
FileWrite(pCL->fd, acLine->string, -1);
FileWrite(pCL->fd, FLAGTRUE, acLine->string, -1);
BuildString((char *)0, acLine);
}
}
Expand All @@ -459,15 +463,16 @@ HelpUser(pCL)
BuildString(aHLTable[i].actext, acLine);
if (acLine->used > HALFLINE) {
BuildString(acEoln, acLine);
FileWrite(pCL->fd, acLine->string, -1);
FileWrite(pCL->fd, FLAGTRUE, acLine->string, -1);
BuildString((char *)0, acLine);
}
}
}
if (acLine->used != 0) {
BuildString(acEoln, acLine);
FileWrite(pCL->fd, acLine->string, -1);
FileWrite(pCL->fd, FLAGTRUE, acLine->string, -1);
}
FileWrite(pCL->fd, FLAGFALSE, (char *)0, 0);
}

int
Expand All @@ -493,7 +498,8 @@ ClientAccessOk(pCL)
request_init(&request, RQ_DAEMON, progname, RQ_FILE, cfd, 0);
fromhost(&request);
if (!hosts_access(&request)) {
FileWrite(pCL->fd, "access from your host refused\r\n", -1);
FileWrite(pCL->fd, FLAGFALSE,
"access from your host refused\r\n", -1);
retval = 0;
goto setpeer;
}
Expand All @@ -503,13 +509,14 @@ ClientAccessOk(pCL)
so = sizeof(in_port);
if (-1 ==
(getpeer = getpeername(cfd, (struct sockaddr *)&in_port, &so))) {
FileWrite(pCL->fd, "getpeername failed\r\n", -1);
FileWrite(pCL->fd, FLAGFALSE, "getpeername failed\r\n", -1);
retval = 0;
goto setpeer;
}
pCL->caccess = AccType(&in_port.sin_addr, &peername);
if (pCL->caccess == 'r') {
FileWrite(pCL->fd, "access from your host refused\r\n", -1);
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
-1);
retval = 0;
}

Expand Down
8 changes: 5 additions & 3 deletions conserver/consent.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: consent.c,v 5.127 2003-09-28 10:37:20-07 bryan Exp $
* $Id: consent.c,v 5.128 2003-09-30 13:14:04-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
Expand Down Expand Up @@ -260,12 +260,13 @@ StopInit(pCE)
return;

if (pCE->initpid != 0) {
kill(pCE->initpid, SIGHUP);
pCE->initpid = 0;
Verbose("[%s] initcmd terminated: pid %lu", pCE->server,
(unsigned long)pCE->initpid);
TagLogfileAct(pCE, "initcmd terminated");
CONDDEBUG((1, "StopInit(): sending initcmd pid %lu signal %d",
(unsigned long)pCE->initpid, SIGHUP));
kill(pCE->initpid, SIGHUP);
pCE->initpid = 0;
}

if (pCE->initfile != (CONSFILE *)0) {
Expand Down Expand Up @@ -360,6 +361,7 @@ StartInit(pCE)
}
Verbose("[%s] initcmd started: pid %lu", pCE->server,
(unsigned long)pCE->initpid);
TagLogfileAct(pCE, "initcmd started");
FD_SET(pin[0], &rinit);
if (maxfd < pin[0] + 1)
maxfd = pin[0] + 1;
Expand Down
3 changes: 2 additions & 1 deletion conserver/consent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: consent.h,v 5.47 2003-09-28 08:43:04-07 bryan Exp $
* $Id: consent.h,v 5.48 2003-10-02 18:49:03-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
Expand Down Expand Up @@ -98,6 +98,7 @@ typedef struct consent { /* console information */
unsigned short breakNum; /* break type [1-9] */
char *logfile; /* logfile */
char *initcmd; /* initcmd command */
char *motd; /* motd */
/* timestamp stuff */
int mark; /* Mark (chime) interval */
long nextMark; /* Next mark (chime) time */
Expand Down
2 changes: 1 addition & 1 deletion conserver/conserver.man
Original file line number Diff line number Diff line change
@@ -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.1" "conserver"
.TH CONSERVER 8 "2003-09-22" "conserver-8.0.2" "conserver"
.SH NAME
conserver \- console server daemon
.SH SYNOPSIS
Expand Down
4 changes: 2 additions & 2 deletions conserver/fallback.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: fallback.c,v 5.58 2003-08-15 08:18:26-07 bryan Exp $
* $Id: fallback.c,v 5.59 2003-10-03 06:32:34-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
Expand Down Expand Up @@ -261,7 +261,7 @@ FallBack(slave, sfd)
}
if ((*slave) != (char *)0)
free(*slave);
if (((*slave) = strdup(pcTSlave->string))
if (((*slave) = StrDup(pcTSlave->string))
== (char *)0)
OutOfMem();
return fd;
Expand Down

0 comments on commit 66e0902

Please sign in to comment.