Imported from conserver-7.2.5.tar.gz

This commit is contained in:
Bryan Stansell 2003-01-27 17:48:36 -08:00
parent 48556ace3a
commit 19eedadfe0
15 changed files with 162 additions and 51 deletions

16
CHANGES
View File

@ -1,6 +1,20 @@
CHANGES
=======
version 7.2.5 (Jan 27, 2003):
- fixed many documentation bugs - reported by Dave Stuit
<djs@tellme.com>
- added -I option to client which operates like -i, but on the
primary conserver only - suggested by Dave Stuit
<djs@tellme.com>
- added SIGUSR2, which does not reread the configuration file,
but does everything else SIGHUP does - suggested at LISA 2002
- fixed bug where LOGDIR setting gets used even if no logfile
is wanted
- added -R option to server to prevent client redirection to
other conserver hosts - suggested by Todd Stansell
<todd@stansell.org>
version 7.2.4 (Oct 14, 2002):
- added --with-openssl for some client/server encryption
- added -E option to client and server to allow for non-encrypted
@ -363,5 +377,5 @@ before version 6.05:
and enhancements of various types were applied.
#
# $Id: CHANGES,v 1.74 2002-10-14 12:18:54-07 bryan Exp $
# $Id: CHANGES,v 1.75 2003-01-27 17:47:59-08 bryan Exp $
#

6
TODO
View File

@ -10,6 +10,10 @@ Bryan Stansell
---------------------------------------------------------------------------
- usleep() statements, can they be removed and mimiced with some sort
of console state thing and a timer? Aaron Burt <aaron@osdl.org>
users email.
- OpenSSL sockets have been make blocking instead of keeping the
underlying socket non-blocking. Why? It requires much more work to
deal with non-blocking sockets and OpenSSL. Not impossible, just have
@ -117,5 +121,5 @@ Bryan Stansell
#
# $Id: TODO,v 1.26 2002-10-09 15:55:24-07 bryan Exp $
# $Id: TODO,v 1.27 2003-01-27 17:47:27-08 bryan Exp $
#

View File

@ -1,4 +1,4 @@
.\" $Id: conserver.cf.man,v 1.25 2002-06-05 11:14:35-07 bryan Exp $
.\" $Id: conserver.cf.man,v 1.26 2003-01-08 17:11:55-08 bryan Exp $
.\" @(#)constab.5 01/06/91 OSU CIS; Thomas A. Fine
.TH CONSERVER.CF 5 "Local"
.SH NAME
@ -34,7 +34,7 @@ previous line. This allows you to span one logical line over
many physical lines and insert comments wherever appropriate.
.PP
The first section of the file has logical lines that are separated into
five colon-separated fields. Leading and trailing white space in each
six colon-separated fields. Leading and trailing white space in each
field is ignored.
.TP
.I name
@ -77,7 +77,7 @@ this host is logged. Any occurrence of `&' will be replaced with
\fIname\fP. Any path that doesn't begin with a `/' will
have \fIlogdirectory\fP (as specified in the nearest preceding
\fB\s-1LOGDIR=\s0\fP
line) prepended to it.
line) prepended to it. If the field is empty, no logging will occur.
.TP
.I timestamp-spec
specifies the time between

View File

@ -179,13 +179,13 @@
<H3>Downloading</H3>
<P>The current version, released on Oct 14, 2002, is <A
<P>The current version, released on Jan 27, 2003, is <A
href=
"http://www.conserver.com/7.2.4.tar.gz">7.2.4.tar.gz</A>.
"http://www.conserver.com/7.2.5.tar.gz">7.2.5.tar.gz</A>.
You can get it via <A href=
"ftp://ftp.conserver.com/conserver/7.2.4.tar.gz">FTP</A>
"ftp://ftp.conserver.com/conserver/7.2.5.tar.gz">FTP</A>
or <A href=
"http://www.conserver.com/7.2.4.tar.gz">HTTP</A>. See the
"http://www.conserver.com/7.2.5.tar.gz">HTTP</A>. See the
<A href="http://www.conserver.com/CHANGES">CHANGES</A>
file for information on the latest updates.</P>

View File

@ -1,10 +1,10 @@
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
.\" $Id: conserver.man,v 1.28 2002-10-09 13:26:31-07 bryan Exp $
.\" $Id: conserver.man,v 1.29 2003-01-08 17:17:25-08 bryan Exp $
.TH CONSERVER 8 "Local"
.SH NAME
conserver \- console server daemon
.SH SYNOPSIS
\fBconserver\fP [\fB\-7dDEFhinouvV\fP] [\fB\-a\fP \fItype\fP]
\fBconserver\fP [\fB\-7dDEFhinoRuvV\fP] [\fB\-a\fP \fItype\fP]
[\fB\-m\fP \fImax\fP]
[\fB\-M\fP \fIaddr\fP] [\fB\-p\fP \fIport\fP] [\fB\-b\fP \fIport\fP]
[\fB\-c\fP \fIcred\fP] [\fB\-C\fP \fIconfig\fP] [\fB\-P\fP \fIpasswd\fP]
@ -79,15 +79,19 @@ forking off new childen, deleted consoles (and their clients) are dropped,
and changes to consoles are done "in place", resetting the console
port (bringing it down and up) only when necessary. the console name is
used to determine when consoles have been added/removed/changed. all
console logfiles are closed and reopened
and, if in daemon mode (\fB\-d\fP option),
the error logfile (see the \fB\-L\fP option).
actions performed by SIGUSR2 are also performed.
.TP
SIGUSR1
try to connect to any consoles marked as
down. This can come in handy if you had a terminal server (or more)
that wasn't accepting connections at startup and you want
\fBconserver\fP to try to reconnect to all those downed ports.
.TP
SIGUSR2
all console logfiles are closed and reopened
and, if in daemon mode (\fB\-d\fP option),
the error logfile (see the \fB\-L\fP option). all actions performed by
SIGUSR1 are also performed.
.PP
Slave hosts which have no current
.BR console (1)
@ -198,6 +202,12 @@ Normally, a client connecting to a ``downed'' console does just that.
Using this option, the server will automatically attempt to open
(``bring up'') the console when the client connects.
.TP
.B \-R
Disable automatic client redirection to other conserver hosts. This
means informational commands like \fB-w\fP and \fB-i\fP will only show
the status of the local conserver host and attempts to connect to
remote consoles will result in an informative message to the user.
.TP
.BI \-O min
Enable periodic attempts (every \fImin\fP minutes) to open (``bring up'')
all downed consoles (similar to sending a SIGUSR1).

View File

@ -1,5 +1,5 @@
/*
* $Id: group.c,v 5.195 2002-10-12 20:07:43-07 bryan Exp $
* $Id: group.c,v 5.196 2003-01-08 17:18:03-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -97,8 +97,8 @@
/* flags that a signal has occurred */
static sig_atomic_t fSawReOpen = 0, fSawReUp = 0, fSawMark =
0, fSawGoAway = 0, fSawReapVirt = 0;
static sig_atomic_t fSawChldHUP = 0, fSawReUp = 0, fSawMark =
0, fSawGoAway = 0, fSawReapVirt = 0, fSawChldUSR2 = 0;
void
#if USE_ANSI_PROTO
@ -552,19 +552,37 @@ strtime(ltime)
}
/* on an HUP close and re-open log files so lop can trim them (ksb)
* and reread the configuration file
* lucky for us: log file fd's can change async from the group driver!
*/
static RETSIGTYPE
#if USE_ANSI_PROTO
FlagReOpen(int sig)
FlagSawChldHUP(int sig)
#else
FlagReOpen(sig)
FlagSawChldHUP(sig)
int sig;
#endif
{
fSawReOpen = 1;
fSawChldHUP = 1;
#if !HAVE_SIGACTION
simpleSignal(SIGHUP, FlagReOpen);
simpleSignal(SIGHUP, FlagSawChldHUP);
#endif
}
/* on an USR2 close and re-open log files so lop can trim them (ksb)
* lucky for us: log file fd's can change async from the group driver!
*/
static RETSIGTYPE
#if USE_ANSI_PROTO
FlagSawChldUSR2(int sig)
#else
FlagSawChldUSR2(sig)
int sig;
#endif
{
fSawChldUSR2 = 1;
#if !HAVE_SIGACTION
simpleSignal(SIGUSR2, FlagSawChldUSR2);
#endif
}
@ -1607,9 +1625,14 @@ Kiddie(pGE, sfd)
pGE->pCLfree[i].pCLnext = &pGE->pCLfree[i + 1];
}
/* on a SIGHUP we should close and reopen our log files
/* on a SIGHUP we should close and reopen our log files and
* reread the config file
*/
simpleSignal(SIGHUP, FlagReOpen);
simpleSignal(SIGHUP, FlagSawChldHUP);
/* on a SIGUSR2 we should close and reopen our log files
*/
simpleSignal(SIGUSR2, FlagSawChldUSR2);
/* on a SIGUSR1 we try to bring up all downed consoles */
simpleSignal(SIGUSR1, FlagReUp);
@ -1630,8 +1653,23 @@ Kiddie(pGE, sfd)
fSawReapVirt = 0;
ReapVirt(pGE);
}
if (fSawReOpen) {
fSawReOpen = 0;
if (fSawChldHUP) {
fSawChldHUP = 0;
reopenLogfile();
ReReadCfg();
pGE = pGroups;
FD_SET(fileFDNum(sfd), &pGE->rinit);
ReOpen(pGE);
ReUp(pGE, 0);
}
if (fSawChldUSR2) {
fSawChldUSR2 = 0;
reopenLogfile();
ReOpen(pGE);
ReUp(pGE, 0);
}
if (fSawChldHUP) {
fSawChldHUP = 0;
reopenLogfile();
ReReadCfg();
pGE = pGroups;

View File

@ -1,5 +1,5 @@
/*
* $Id: main.c,v 5.105 2002-10-12 20:07:43-07 bryan Exp $
* $Id: main.c,v 5.106 2003-01-08 17:18:59-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -55,7 +55,7 @@
int fAll = 0, fVerbose = 0, fSoftcar = 0, fNoinit = 0, fVersion =
0, fStrip = 0, fDaemon = 0, fUseLogfile = 0, fReopen = 0, fReopenall =
0, fNoautoreup = 0;
0, fNoautoreup = 0, fNoredir = 0;
char chDefAcc = 'r';
@ -439,7 +439,7 @@ daemonize()
static char u_terse[] =
" [-7dDEFhinouvV] [-a type] [-m max] [-M addr] [-p port] [-b port] [-c cred] [-C config] [-P passwd] [-L logfile] [-O min]";
" [-7dDEFhinRouvV] [-a type] [-m max] [-M addr] [-p port] [-b port] [-c cred] [-C config] [-P passwd] [-L logfile] [-O min]";
static char *apcLong[] = {
"7 strip the high bit of all console data",
"a type set the default access type",
@ -468,6 +468,7 @@ static char *apcLong[] = {
"O min reopen all downed consoles every <min> minutes",
"p port port to listen on",
"P passwd give a new passwd file to the server process",
"R disable automatic client redirection",
"u copy \"unloved\" console data to stdout",
"v be verbose on startup",
"V output version info",
@ -678,7 +679,7 @@ main(argc, argv)
int i;
FILE *fpConfig;
struct hostent *hpMe;
static char acOpts[] = "7a:b:c:C:dDEFhiL:m:M:noO:p:P:suVv";
static char acOpts[] = "7a:b:c:C:dDEFhiL:m:M:noO:p:P:RsuVv";
extern int optopt;
extern char *optarg;
struct passwd *pwd;
@ -804,6 +805,9 @@ main(argc, argv)
case 'P':
pcPasswd = optarg;
break;
case 'R':
fNoredir = 1;
break;
case 's':
fSoftcar ^= 1;
break;

View File

@ -1,5 +1,5 @@
/*
* $Id: main.h,v 5.38 2002-09-29 19:04:57-07 bryan Exp $
* $Id: main.h,v 5.39 2003-01-08 17:12:38-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -38,7 +38,7 @@
*/
extern char rcsid[];
extern int fAll, fVerbose, fSoftcar, fNoinit, fInteractive, fStrip,
fDaemon, fReopen, fReopenall, fNoautoreup;
fDaemon, fReopen, fReopenall, fNoautoreup, fNoredir;
extern char chDefAcc;
extern in_addr_t bindAddr;
extern unsigned int bindPort, bindBasePort;

View File

@ -1,5 +1,5 @@
/*
* $Id: master.c,v 5.81 2002-10-12 20:07:43-07 bryan Exp $
* $Id: master.c,v 5.82 2003-01-08 17:18:44-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -61,7 +61,8 @@ int deny_severity = LOG_WARNING;
static sig_atomic_t fSawQuit, fSawHUP, fSawUSR1, fSawCHLD;
static sig_atomic_t fSawQuit = 0, fSawHUP = 0, fSawUSR2 = 0, fSawUSR1 =
0, fSawCHLD = 0;
static RETSIGTYPE
@ -195,6 +196,20 @@ FlagSawHUP(arg)
#endif
}
static RETSIGTYPE
#if USE_ANSI_PROTO
FlagSawUSR2(int arg)
#else
FlagSawUSR2(arg)
int arg;
#endif
{
fSawUSR2 = 1;
#if !HAVE_SIGACTION
simpleSignal(SIGUSR2, FlagSawUSR2);
#endif
}
static RETSIGTYPE
#if USE_ANSI_PROTO
FlagSawUSR1(int arg)
@ -277,6 +292,7 @@ Master()
simpleSignal(SIGTERM, FlagQuitIt);
simpleSignal(SIGUSR1, FlagSawUSR1);
simpleSignal(SIGHUP, FlagSawHUP);
simpleSignal(SIGUSR2, FlagSawUSR2);
simpleSignal(SIGINT, FlagSawINT);
/* set up port for master to listen on
@ -340,6 +356,12 @@ Master()
Info("Processing SIGUSR1 at %s", strtime(NULL));
SignalKids(SIGUSR1);
}
if (fSawUSR2) {
fSawUSR2 = 0;
Info("Processing SIGUSR2 at %s", strtime(NULL));
reopenLogfile();
SignalKids(SIGUSR2);
}
if (fSawQuit) { /* Something above set the quit flag */
break;
}
@ -535,9 +557,12 @@ Master()
filePrint(csocket, "@%s", inet_ntoa(lcl.sin_addr));
iSep = 0;
}
for (pRC = pRCUniq; (REMOTE *) 0 != pRC; pRC = pRC->pRCuniq) {
filePrint(csocket, ":@%s" + iSep, pRC->rhost.string);
iSep = 0;
if (!fNoredir) {
for (pRC = pRCUniq; (REMOTE *) 0 != pRC;
pRC = pRC->pRCuniq) {
filePrint(csocket, ":@%s" + iSep, pRC->rhost.string);
iSep = 0;
}
}
fileWrite(csocket, "\r\n", -1);
fileClose(&csocket);
@ -628,7 +653,14 @@ Master()
break;
case 1:
if ((REMOTE *) 0 != pRCFound) {
filePrint(csocket, "@%s\r\n", pRCFound->rhost.string);
if (fNoredir) {
filePrint(csocket,
"automatic redirection disabled - console on master `%s'\r\n",
pRCFound->rhost.string);
} else {
filePrint(csocket, "@%s\r\n",
pRCFound->rhost.string);
}
} else {
filePrint(csocket, "%u\r\n", prnum);
}

View File

@ -1,5 +1,5 @@
/*
* $Id: readcfg.c,v 5.89 2002-10-12 20:07:43-07 bryan Exp $
* $Id: readcfg.c,v 5.90 2003-01-08 17:12:21-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -628,7 +628,7 @@ ReadCfg(pcFile, fp, master)
pcStart = pcRem + 1;
}
buildMyString(pcStart, &pCE->lfile);
if (LogDirectory.used && pCE->lfile.used &&
if (LogDirectory.used > 1 && pCE->lfile.used > 1 &&
*pCE->lfile.string != '/') {
char *p;
buildString((char *)0);

View File

@ -1,5 +1,5 @@
/*
* $Id: version.h,v 1.39 2002-10-14 12:19:27-07 bryan Exp $
* $Id: version.h,v 1.40 2003-01-27 17:47:53-08 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 7.2.4"
#define THIS_VERSION "conserver.com version 7.2.5"

View File

@ -1,5 +1,5 @@
/*
* $Id: console.c,v 5.99 2002-10-12 20:06:57-07 bryan Exp $
* $Id: console.c,v 5.101 2003-01-27 17:46:05-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -196,7 +196,7 @@ static char *apcLong[] = {
#endif
"f(F) force read/write connection (and replay)",
"G connect to the console group only",
"i display information in machine-parseable form",
"i(I) display information in machine-parseable form (on master)",
"h output this message",
"l user use username instead of current username",
"M mach master server to poll first",
@ -1424,14 +1424,14 @@ main(argc, argv)
#endif
{
char *pcCmd, *pcTo;
struct passwd *pwdMe;
struct passwd *pwdMe = (struct passwd *)0;
int opt;
int fLocal;
STRING acPorts = { (char *)0, 0, 0 };
char *pcUser = (char *)0;
char *pcMsg = (char *)0;
int (*pfiCall) ();
static char acOpts[] = "7aAb:c:De:EfFGhil:M:p:PqQrRsSuvVwWx";
static char acOpts[] = "7aAb:c:De:EfFGhiIl:M:p:PqQrRsSuvVwWx";
extern int optind;
extern int optopt;
extern char *optarg;
@ -1501,6 +1501,9 @@ main(argc, argv)
}
break;
case 'I':
fLocal = 1;
/* fall through */
case 'i':
pcCmd = "info";
break;
@ -1569,7 +1572,7 @@ main(argc, argv)
Error
("usage [-aAEfFGsS] [-7Dv] [-c cred] [-M mach] [-p port] [-e esc] [-l username] console");
Error
("usage [-hPrRuVwWx] [-7Dv] [-M mach] [-p port] [-b message]");
("usage [-hiIPrRuVwWx] [-7Dv] [-M mach] [-p port] [-b message]");
Error("usage [-qQ] [-7Dv] [-M mach] [-p port]");
Usage(apcLong);
exit(EX_OK);
@ -1678,7 +1681,7 @@ main(argc, argv)
} else if ('a' == *pcCmd || 'f' == *pcCmd || 's' == *pcCmd) {
ValidateEsc();
pfiCall = Indir;
} else if ('g' == *pcCmd) {
} else if ('g' == *pcCmd || 'i' == *pcCmd) {
pfiCall = fLocal ? CmdGroup : CmdMaster;
} else {
pfiCall = CmdMaster;

View File

@ -1,4 +1,4 @@
.\" $Id: console.man,v 1.23 2002-10-09 13:26:31-07 bryan Exp $
.\" $Id: console.man,v 1.24 2003-01-08 17:07:51-08 bryan Exp $
.TH CONSOLE 1 "Local"
.SH NAME
console \- console server client program
@ -8,7 +8,7 @@ console \- console server client program
[\fB\-p\fP \fIport\fP] [\fB\-e\fP \fIesc\fP] [\fB\-l\fP \fIuser\fP]
\fIconsole\fP
.br
\fBconsole\fP [\fB\-hPrRuVwx\fP] [\fB\-7Dv\fP] [\fB\-M\fP \fImach\fP]
\fBconsole\fP [\fB\-hiIPrRuVwWx\fP] [\fB\-7Dv\fP] [\fB\-M\fP \fImach\fP]
[\fB\-p\fP \fIport\fP] [\fB\-b\fP \fImessage\fP]
.br
\fBconsole\fP [\fB\-qQ\fP] [\fB\-7Dv\fP] [\fB\-M\fP \fImach\fP]
@ -106,6 +106,9 @@ Display a brief help message.
.B \-i
Display information in a machine-parseable format (see below for the details).
.TP
.B \-I
Same as \fB\-i\fP but just acts on the primary server.
.TP
.BI \-l user
Set the login name used for authentication to \fIuser\fP.
By default, \fBconsole\fP uses $USER if its uid matches the user's real uid,
@ -169,6 +172,9 @@ and the idle times. This is useful to see if anybody is actively
using the console system if it becomes necessary to shut down
\fBconserver\fP.
.TP
.B \-W
Same as \fB\-w\fP but just acts on the primary server.
.TP
.B \-x
Show a list of consoles and devices.
.PP

View File

@ -4,7 +4,7 @@
#
%define pkg conserver
%define ver 7.2.4
%define ver 7.2.5
# define the name of the machine on which the main conserver
# daemon will be running if you don't want to use the default

View File

@ -1,7 +1,7 @@
PKG="conserver"
NAME="Console server and client"
CATEGORY="system"
VERSION="7.2.4"
VERSION="7.2.5"
DESC="Console server and client"
CLASSES=none
ARCH=sparc