mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-08 19:44:15 +00:00
Imported from conserver-8.2.1.tar.gz
This commit is contained in:
parent
8534a21cef
commit
4039e65b31
10
CHANGES
10
CHANGES
@ -1,6 +1,14 @@
|
||||
CHANGES
|
||||
=======
|
||||
|
||||
version 8.2.1 (Jun 2, 2015):
|
||||
- added TCP keepalives between client and server - TCP-based consoles
|
||||
already had the code - this was mostly an oversight
|
||||
- patch for SEGV and task execution - patch by Artem Savkov
|
||||
<asavkov@redhat.com>
|
||||
- expanded break sequences from [1-9] to [1-9a-z] - based on patch by
|
||||
Artem Savkov <asavkov@redhat.com>
|
||||
|
||||
version 8.2.0 (Apr 20, 2014):
|
||||
- added --with-trust-uds-cred which uses getsockopt() to fetch and
|
||||
trust the client uid, bypassing password lookups - patch by Anton
|
||||
@ -952,5 +960,5 @@ before version 6.05:
|
||||
and enhancements of various types were applied.
|
||||
|
||||
#
|
||||
# $Id: CHANGES,v 1.247 2014/04/21 04:47:37 bryan Exp $
|
||||
# $Id: CHANGES,v 1.251 2015/06/02 17:33:29 bryan Exp $
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" $Id: conserver.cf.man,v 1.85 2014/04/04 16:17:45 bryan Exp $
|
||||
.TH CONSERVER.CF 5 "2014/04/04" "conserver-8.2.0" "conserver"
|
||||
.\" $Id: conserver.cf.man,v 1.86 2015/06/02 17:19:31 bryan Exp $
|
||||
.TH CONSERVER.CF 5 "2015/06/02" "conserver-8.2.1" "conserver"
|
||||
.SH NAME
|
||||
conserver.cf \- console configuration file for
|
||||
.BR conserver (8)
|
||||
@ -212,9 +212,11 @@ connections from the hosts without username authentication.
|
||||
.TP
|
||||
\f3break\fP \f2n\fP
|
||||
.br
|
||||
Define a break sequence where 0 <
|
||||
Define a break sequence where (1 <=
|
||||
.I n
|
||||
< 10.
|
||||
<= 9) or (a <=
|
||||
.I n
|
||||
<= z).
|
||||
Break sequences are accessed via the
|
||||
.RI ``^Ecl n ''
|
||||
client escape sequence.
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" $Id: conserver.passwd.man,v 1.10 2004/01/08 16:12:33 bryan Exp $
|
||||
.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.2.0" "conserver"
|
||||
.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.2.1" "conserver"
|
||||
.SH NAME
|
||||
conserver.passwd \- user access information for
|
||||
.BR conserver (8)
|
||||
|
@ -177,8 +177,8 @@ body {
|
||||
|
||||
<H3>Downloading</H3>
|
||||
|
||||
<P>The current version, released on Apr 20, 2014, is
|
||||
<A href="8.2.0.tar.gz">8.2.0.tar.gz</A>. See the <A href=
|
||||
<P>The current version, released on Jun 2, 2015, is
|
||||
<A href="8.2.1.tar.gz">8.2.1.tar.gz</A>. See the <A href=
|
||||
"CHANGES">CHANGES</A> file for information on the latest
|
||||
updates.</P>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: client.c,v 5.97 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: client.c,v 5.98 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -373,39 +373,39 @@ typedef struct HLnode {
|
||||
} HELP;
|
||||
|
||||
static HELP aHLTable[] = {
|
||||
{WHEN_ALWAYS, ". disconnect"},
|
||||
{WHEN_ALWAYS | IS_LIMITED, "; move to another console"},
|
||||
{WHEN_ALWAYS, "a attach read/write"},
|
||||
{WHEN_ALWAYS, "b send broadcast message"},
|
||||
{WHEN_ATTACH, "c toggle flow control"},
|
||||
{WHEN_ATTACH, "d down a console"},
|
||||
{WHEN_ALWAYS, "e change escape sequence"},
|
||||
{WHEN_ALWAYS, "f force attach read/write"},
|
||||
{WHEN_ALWAYS, "g group info"},
|
||||
{WHEN_ALWAYS, "i information dump"},
|
||||
{WHEN_ATTACH, "L toggle logging on/off"},
|
||||
{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, "n write a note to the logfile"},
|
||||
{WHEN_ALWAYS, "o (re)open the tty and log file"},
|
||||
{WHEN_ALWAYS, "p playback the last %hu lines"},
|
||||
{WHEN_ALWAYS, "P set number of playback lines"},
|
||||
{WHEN_ALWAYS, "r replay the last %hu lines"},
|
||||
{WHEN_ALWAYS, "R set number of replay lines"},
|
||||
{WHEN_ATTACH, "s spy mode (read only)"},
|
||||
{WHEN_ALWAYS, "u show host status"},
|
||||
{WHEN_ALWAYS, "v show version info"},
|
||||
{WHEN_ALWAYS, "w who is on this console"},
|
||||
{WHEN_ALWAYS, "x show console baud info"},
|
||||
{WHEN_ALWAYS | IS_LIMITED, "z suspend the connection"},
|
||||
{WHEN_ATTACH, "! invoke task"},
|
||||
{WHEN_ATTACH | IS_LIMITED, "| attach local command"},
|
||||
{WHEN_ALWAYS, "? print this message"},
|
||||
{WHEN_ALWAYS, "<cr> ignore/abort command"},
|
||||
{WHEN_ALWAYS, "^R replay the last line"},
|
||||
{WHEN_ATTACH, "\\ooo send character by octal code"},
|
||||
{WHEN_ALWAYS, ". disconnect"},
|
||||
{WHEN_ALWAYS | IS_LIMITED, "; move to another console"},
|
||||
{WHEN_ALWAYS, "a attach read/write"},
|
||||
{WHEN_ALWAYS, "b send broadcast message"},
|
||||
{WHEN_ATTACH, "c toggle flow control"},
|
||||
{WHEN_ATTACH, "d down a console"},
|
||||
{WHEN_ALWAYS, "e change escape sequence"},
|
||||
{WHEN_ALWAYS, "f force attach read/write"},
|
||||
{WHEN_ALWAYS, "g group info"},
|
||||
{WHEN_ALWAYS, "i information dump"},
|
||||
{WHEN_ATTACH, "L toggle logging on/off"},
|
||||
{WHEN_ATTACH, "l? break sequence list"},
|
||||
{WHEN_ATTACH, "l0 send break per config file"},
|
||||
{WHEN_ATTACH, "l1-9a-z send specific break sequence"},
|
||||
{WHEN_ALWAYS, "m display message of the day"},
|
||||
{WHEN_ALWAYS, "n write a note to the logfile"},
|
||||
{WHEN_ALWAYS, "o (re)open the tty and log file"},
|
||||
{WHEN_ALWAYS, "p playback the last %hu lines"},
|
||||
{WHEN_ALWAYS, "P set number of playback lines"},
|
||||
{WHEN_ALWAYS, "r replay the last %hu lines"},
|
||||
{WHEN_ALWAYS, "R set number of replay lines"},
|
||||
{WHEN_ATTACH, "s spy mode (read only)"},
|
||||
{WHEN_ALWAYS, "u show host status"},
|
||||
{WHEN_ALWAYS, "v show version info"},
|
||||
{WHEN_ALWAYS, "w who is on this console"},
|
||||
{WHEN_ALWAYS, "x show console baud info"},
|
||||
{WHEN_ALWAYS | IS_LIMITED, "z suspend the connection"},
|
||||
{WHEN_ATTACH, "! invoke task"},
|
||||
{WHEN_ATTACH | IS_LIMITED, "| attach local command"},
|
||||
{WHEN_ALWAYS, "? print this message"},
|
||||
{WHEN_ALWAYS, "<cr> ignore/abort command"},
|
||||
{WHEN_ALWAYS, "^R replay the last line"},
|
||||
{WHEN_ATTACH, "\\ooo send character by octal code"},
|
||||
};
|
||||
|
||||
/* list the commands we know for the user (ksb)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: consent.h,v 5.75 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: consent.h,v 5.76 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -130,7 +130,7 @@ typedef struct consent { /* console information */
|
||||
char *udssubst; /* socket file substitution pattern */
|
||||
/* global stuff */
|
||||
char *master; /* master hostname */
|
||||
unsigned short breakNum; /* break type [1-9] */
|
||||
unsigned short breakNum; /* break type [1-35] */
|
||||
char *logfile; /* logfile */
|
||||
off_t logfilemax; /* size limit for rolling logfile */
|
||||
char *initcmd; /* initcmd command */
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
|
||||
.\" $Id: conserver.man,v 1.54 2006/12/31 02:02:48 bryan Exp $
|
||||
.TH CONSERVER 8 "2006/12/31" "conserver-8.2.0" "conserver"
|
||||
.TH CONSERVER 8 "2006/12/31" "conserver-8.2.1" "conserver"
|
||||
.SH NAME
|
||||
conserver \- console server daemon
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: cutil.c,v 1.142 2014/04/20 07:17:56 bryan Exp $
|
||||
* $Id: cutil.c,v 1.143 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -2088,8 +2088,8 @@ IsMe(char *id)
|
||||
b = &(((struct sockaddr_in *)rp->ai_addr)->sin_addr);
|
||||
len = sizeof(struct in_addr);
|
||||
} else { /* IPv6 */
|
||||
a = &(((struct sockaddr_in6 *)ifa->ifa_addr)->
|
||||
sin6_addr);
|
||||
a = &(((struct sockaddr_in6 *)ifa->
|
||||
ifa_addr)->sin6_addr);
|
||||
b = &(((struct sockaddr_in6 *)rp->ai_addr)->sin6_addr);
|
||||
len = sizeof(struct in6_addr);
|
||||
}
|
||||
@ -2426,7 +2426,11 @@ GetWord(FILE *fp, int *line, short spaceok, STRING *word)
|
||||
if (c == '\n') {
|
||||
if (fname->used > 0) {
|
||||
while (fname->used > 1 && isspace((int)
|
||||
(fname->string[fname->used - 2])))
|
||||
(fname->
|
||||
string
|
||||
[fname->
|
||||
used -
|
||||
2])))
|
||||
fname->used--;
|
||||
if (fname->used > 0)
|
||||
fname->string[fname->used - 1] = '\000';
|
||||
@ -2709,8 +2713,8 @@ ParseFile(char *filename, FILE *fp, int level)
|
||||
case VALUE:
|
||||
switch (token) {
|
||||
case WORD:
|
||||
(*sections[secIndex].
|
||||
items[keyIndex].reg) (word->string);
|
||||
(*sections[secIndex].items[keyIndex].
|
||||
reg) (word->string);
|
||||
state = SEMI;
|
||||
break;
|
||||
case SEMICOLON:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: group.c,v 5.350 2014/04/20 07:20:56 bryan Exp $
|
||||
* $Id: group.c,v 5.352 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -1634,7 +1634,9 @@ ExpandString(char *str, CONSENT *pCE, short breaknum)
|
||||
continue;
|
||||
} else if (s == 'd') {
|
||||
PutConsole(pCE, IAC, 0);
|
||||
PutConsole(pCE, '0' + breaknum, 0);
|
||||
PutConsole(pCE,
|
||||
'0' + breaknum + (breaknum >
|
||||
9 ? BREAKALPHAOFFSET : 0), 0);
|
||||
continue;
|
||||
} else if (s == 'z') {
|
||||
PutConsole(pCE, IAC, 0);
|
||||
@ -1680,7 +1682,7 @@ SendBreak(CONSCLIENT *pCLServing, CONSENT *pCEServing, short bt)
|
||||
CONSCLIENT *pCL;
|
||||
|
||||
short waszero = 0;
|
||||
if (bt < 0 || bt > 9) {
|
||||
if (bt < 0 || bt > BREAKLISTSIZE) {
|
||||
FileWrite(pCLServing->fd, FLAGFALSE, "aborted]\r\n", -1);
|
||||
return;
|
||||
}
|
||||
@ -1730,10 +1732,12 @@ SendBreak(CONSCLIENT *pCLServing, CONSENT *pCEServing, short bt)
|
||||
|
||||
if (pCEServing->breaklog == FLAGTRUE) {
|
||||
if (waszero) {
|
||||
TagLogfile(pCEServing, "break #0(%d) sent -- `%s'", bt,
|
||||
TagLogfile(pCEServing, "break #0(%c) sent -- `%s'",
|
||||
'0' + bt + (bt > 9 ? BREAKALPHAOFFSET : 0),
|
||||
breakList[bt - 1].seq->string);
|
||||
} else {
|
||||
TagLogfile(pCEServing, "break #%d sent -- `%s'", bt,
|
||||
TagLogfile(pCEServing, "break #%c sent -- `%s'",
|
||||
'0' + bt + (bt > 9 ? BREAKALPHAOFFSET : 0),
|
||||
breakList[bt - 1].seq->string);
|
||||
}
|
||||
}
|
||||
@ -1746,7 +1750,7 @@ StartTask(CONSENT *pCE, char *cmd, uid_t uid, gid_t gid)
|
||||
extern char **environ;
|
||||
char *pcShell, **ppcArgv;
|
||||
extern int FallBack(char **, int *);
|
||||
char *execSlave; /* pseudo-device slave side */
|
||||
char *execSlave = (char *)0; /* pseudo-device slave side */
|
||||
int execSlaveFD; /* fd of slave side */
|
||||
int cofile;
|
||||
|
||||
@ -3522,7 +3526,8 @@ DoClientRead(GRPENT *pGE, CONSCLIENT *pCLServing)
|
||||
case S_HALT1: /* halt sequence? */
|
||||
pCLServing->iState = S_NORMAL;
|
||||
if (acIn[i] != '?' &&
|
||||
(acIn[i] < '0' || acIn[i] > '9')) {
|
||||
((acIn[i] < '0' || acIn[i] > '9') &&
|
||||
(acIn[i] < 'a' || acIn[i] > 'z'))) {
|
||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||
"aborted]\r\n", -1);
|
||||
continue;
|
||||
@ -3530,13 +3535,16 @@ DoClientRead(GRPENT *pGE, CONSCLIENT *pCLServing)
|
||||
|
||||
if (acIn[i] == '?') {
|
||||
int i;
|
||||
int mod;
|
||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||
"list]\r\n", -1);
|
||||
i = pCEServing->breakNum;
|
||||
mod = i > 9 ? BREAKALPHAOFFSET : 0;
|
||||
if (i == 0 || breakList[i - 1].seq->used <= 1
|
||||
|| pCEServing->breaklist == (char *)0 ||
|
||||
((char *)0 ==
|
||||
strchr(pCEServing->breaklist, '1' + i)
|
||||
strchr(pCEServing->breaklist,
|
||||
'0' + i + mod)
|
||||
&& (char *)0 ==
|
||||
strchr(pCEServing->breaklist, '*')))
|
||||
FileWrite(pCLServing->fd, FLAGTRUE,
|
||||
@ -3552,10 +3560,12 @@ DoClientRead(GRPENT *pGE, CONSCLIENT *pCLServing)
|
||||
acA1->string);
|
||||
}
|
||||
if (pCEServing->breaklist != (char *)0) {
|
||||
for (i = 0; i < 9; i++) {
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
char btc;
|
||||
mod = i > 8 ? BREAKALPHAOFFSET : 0;
|
||||
btc = '1' + i + mod;
|
||||
if ((char *)0 ==
|
||||
strchr(pCEServing->breaklist,
|
||||
'1' + i)
|
||||
strchr(pCEServing->breaklist, btc)
|
||||
&& (char *)0 ==
|
||||
strchr(pCEServing->breaklist, '*'))
|
||||
continue;
|
||||
@ -3564,9 +3574,8 @@ DoClientRead(GRPENT *pGE, CONSCLIENT *pCLServing)
|
||||
breakList[i].seq->used -
|
||||
1, acA1);
|
||||
FilePrint(pCLServing->fd, FLAGTRUE,
|
||||
" %d - %3dms, `%s'\r\n",
|
||||
i + 1,
|
||||
breakList[i].delay,
|
||||
" %c - %3dms, `%s'\r\n",
|
||||
btc, breakList[i].delay,
|
||||
acA1->string);
|
||||
}
|
||||
}
|
||||
@ -3575,7 +3584,10 @@ DoClientRead(GRPENT *pGE, CONSCLIENT *pCLServing)
|
||||
0);
|
||||
} else {
|
||||
if (pCLServing->fwr) {
|
||||
int bt = acIn[i] - '0';
|
||||
int bt =
|
||||
acIn[i] - '0' - (acIn[i] >
|
||||
'9' ? BREAKALPHAOFFSET
|
||||
: 0);
|
||||
SendBreak(pCLServing, pCEServing, bt);
|
||||
} else
|
||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||
@ -4140,7 +4152,9 @@ FlushConsole(CONSENT *pCEServing)
|
||||
unsigned char next =
|
||||
(unsigned char)pCEServing->wbuf->string[offset + 1];
|
||||
if ((next >= '0' && next <= '9') ||
|
||||
(next == BREAK && pCEServing->type != HOST)) {
|
||||
(next >= 'a' && next <= 'z') || (next == BREAK &&
|
||||
pCEServing->type !=
|
||||
HOST)) {
|
||||
CONDDEBUG((1, "Kiddie(): heavy IAC for [%s]",
|
||||
pCEServing->server));
|
||||
offset += 2;
|
||||
@ -4171,10 +4185,13 @@ FlushConsole(CONSENT *pCEServing)
|
||||
}
|
||||
|
||||
/* Do the operation */
|
||||
if (next >= '0' && next <= '9') {
|
||||
if ((next >= '0' && next <= '9') ||
|
||||
(next >= 'a' && next <= 'z')) {
|
||||
int delay = BREAKDELAYDEFAULT;
|
||||
int bnum =
|
||||
next - '1' - (next > '9' ? BREAKALPHAOFFSET : 0);
|
||||
if (next != '0')
|
||||
delay = breakList[next - '1'].delay;
|
||||
delay = breakList[bnum].delay;
|
||||
/* in theory this sets the break length to whatever
|
||||
* the "default" break sequence is for the console.
|
||||
* but, i think it would be better to just use the
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: main.c,v 5.212 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: main.c,v 5.213 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -1076,9 +1076,10 @@ DumpDataStructures(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 9; i++) {
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
CONDDEBUG((1,
|
||||
"DumpDataStructures(): break: string=%s, delay=%d, confirm=%s",
|
||||
"DumpDataStructures(): break: #%c, string=%s, delay=%d, confirm=%s",
|
||||
'1' + i + (i > 8 ? BREAKALPHAOFFSET : 0),
|
||||
EMPTYSTR(breakList[i].seq->string), breakList[i].delay,
|
||||
FLAGSTR(breakList[i].confirm)));
|
||||
}
|
||||
@ -1241,6 +1242,9 @@ main(int argc, char **argv)
|
||||
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
||||
#endif
|
||||
|
||||
/* Initialize the break list */
|
||||
InitBreakList();
|
||||
|
||||
/* prep the config options */
|
||||
if ((optConf = (CONFIG *)calloc(1, sizeof(CONFIG)))
|
||||
== (CONFIG *)0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: readcfg.c,v 5.206 2014/04/20 07:17:56 bryan Exp $
|
||||
* $Id: readcfg.c,v 5.207 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -45,11 +45,7 @@ CONSENTUSERS *pADList = (CONSENTUSERS *)0;
|
||||
CONSENTUSERS *pLUList = (CONSENTUSERS *)0;
|
||||
REMOTE *pRCUniq = (REMOTE *)0;
|
||||
CONFIG *pConfig = (CONFIG *)0;
|
||||
BREAKS breakList[9] = {
|
||||
{(STRING *)0, 0}, {(STRING *)0, 0}, {(STRING *)0, 0},
|
||||
{(STRING *)0, 0}, {(STRING *)0, 0}, {(STRING *)0, 0},
|
||||
{(STRING *)0, 0}, {(STRING *)0, 0}, {(STRING *)0, 0}
|
||||
};
|
||||
BREAKS breakList[BREAKLISTSIZE];
|
||||
|
||||
TASKS *taskList = (TASKS *)0;
|
||||
SUBST *taskSubst = (SUBST *)0;
|
||||
@ -111,12 +107,24 @@ DestroyTaskList(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
InitBreakList(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
breakList[i].seq = (STRING *)0;
|
||||
breakList[i].delay = 0;
|
||||
breakList[i].confirm = FLAGUNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DestroyBreakList(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
if (breakList[i].seq != (STRING *)0) {
|
||||
DestroyString(breakList[i].seq);
|
||||
breakList[i].seq = (STRING *)0;
|
||||
@ -207,13 +215,15 @@ void
|
||||
BreakBegin(char *id)
|
||||
{
|
||||
CONDDEBUG((1, "BreakBegin(%s) [%s:%d]", id, file, line));
|
||||
if ((id == (char *)0) || (*id == '\000') || id[0] < '1' || id[0] > '9'
|
||||
|| id[1] != '\000') {
|
||||
if ((id == (char *)0) || (*id == '\000') ||
|
||||
((id[0] < '1' || id[0] > '9')
|
||||
&& (id[0] < 'a' || id[0] > 'z')) || id[1] != '\000') {
|
||||
if (isMaster)
|
||||
Error("invalid break number `%s' [%s:%d]", id, file, line);
|
||||
parserBreakNum = 0;
|
||||
} else {
|
||||
parserBreakNum = id[0] - '0';
|
||||
parserBreakNum =
|
||||
id[0] - '0' - (id[0] > '9' ? BREAKALPHAOFFSET : 0);
|
||||
if (parserBreak == (STRING *)0)
|
||||
parserBreak = AllocString();
|
||||
else
|
||||
@ -256,12 +266,12 @@ BreakDestroy(void)
|
||||
#if DUMPDATA
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 9; i++) {
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
Msg("Break[%d] = `%s', delay=%d", i,
|
||||
breakList[i].seq ==
|
||||
(STRING *)0 ? "(null)" : (breakList[i].seq->
|
||||
string ? breakList[i].seq->
|
||||
string : "(null)"),
|
||||
(STRING *)0 ? "(null)" : (breakList[i].
|
||||
seq->string ? breakList[i].
|
||||
seq->string : "(null)"),
|
||||
breakList[i].delay);
|
||||
}
|
||||
}
|
||||
@ -888,8 +898,9 @@ ProcessBreak(CONSENT *c, char *id)
|
||||
c->breakNum = 0;
|
||||
return;
|
||||
}
|
||||
if ((id[0] >= '1') && (id[0] <= '9') && (id[1] == '\000')) {
|
||||
c->breakNum = id[0] - '0';
|
||||
if (((id[0] >= '1' && id[0] <= '9') || (id[0] >= 'a' && id[0] <= 'z'))
|
||||
&& (id[1] == '\000')) {
|
||||
c->breakNum = id[0] - '0' - (id[0] > '9' ? BREAKALPHAOFFSET : 0);
|
||||
return;
|
||||
}
|
||||
if (isMaster)
|
||||
@ -2083,7 +2094,8 @@ ProcessBreaklist(CONSENT *c, char *id)
|
||||
for (token = strtok(id, ALLWORDSEP); token != (char *)0;
|
||||
token = strtok(NULL, ALLWORDSEP)) {
|
||||
if (token[1] != '\000' ||
|
||||
((token[0] < '0' || token[0] > '9') && token[0] != '*')) {
|
||||
(((token[0] < '0' || token[0] > '9') &&
|
||||
(token[0] < 'a' || token[0] > 'z')) && token[0] != '*')) {
|
||||
if (isMaster)
|
||||
Error("invalid breaklist reference `%s' [%s:%d]", token,
|
||||
file, line);
|
||||
@ -5006,7 +5018,7 @@ ReadCfg(char *filename, FILE *fp)
|
||||
isStartup = (pGroups == (GRPENT *)0 && pRCList == (REMOTE *)0);
|
||||
|
||||
/* initialize the break lists */
|
||||
for (i = 0; i < 9; i++) {
|
||||
for (i = 0; i < BREAKLISTSIZE; i++) {
|
||||
if (breakList[i].seq == (STRING *)0) {
|
||||
breakList[i].seq = AllocString();
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: readcfg.h,v 5.50 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: readcfg.h,v 5.51 2015/06/02 17:19:31 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
|
||||
#define BREAKDELAYDEFAULT 250
|
||||
#define BREAKLISTSIZE 35 /* ('z'-('a'-1))+('9'-('1'-1)) */
|
||||
#define BREAKALPHAOFFSET 39 /* ('a'-('9'+1)) */
|
||||
|
||||
typedef struct config {
|
||||
STRING *name;
|
||||
@ -57,7 +59,7 @@ extern REMOTE *pRCUniq; /* list of uniq console servers */
|
||||
extern ACCESS *pACList; /* `who do you love' (or trust) */
|
||||
extern CONSENTUSERS *pADList; /* list of admin users */
|
||||
extern CONSENTUSERS *pLUList; /* list of limited users */
|
||||
extern BREAKS breakList[9]; /* list of break sequences */
|
||||
extern BREAKS breakList[BREAKLISTSIZE]; /* list of break sequences */
|
||||
extern TASKS *taskList; /* list of tasks */
|
||||
extern SUBST *taskSubst; /* substitution function data for tasks */
|
||||
extern CONFIG *pConfig; /* settings seen by config parser */
|
||||
@ -66,6 +68,7 @@ extern SUBST *substData; /* substitution function data */
|
||||
extern void ReadCfg(char *, FILE *);
|
||||
extern void ReReadCfg(int, int);
|
||||
extern void DestroyBreakList(void);
|
||||
extern void InitBreakList(void);
|
||||
extern void DestroyTaskList(void);
|
||||
extern void DestroyUserList(void);
|
||||
extern void DestroyConfig(CONFIG *);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: version.h,v 1.81 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: version.h,v 1.82 2015/06/01 15:36:59 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -16,6 +16,6 @@ All rights reserved.\n"
|
||||
|
||||
#define VERSION_MAJOR 8
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_REV 0
|
||||
#define VERSION_REV 1
|
||||
#define VERSION_TEXT "conserver.com version"
|
||||
#define VERSION_UINT (VERSION_MAJOR * 1000000 + VERSION_MINOR * 1000 + VERSION_REV)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: console.c,v 5.190 2014/04/20 06:45:07 bryan Exp $
|
||||
* $Id: console.c,v 5.191 2015/06/01 15:36:59 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -518,6 +518,9 @@ GetPort(char *pcToHost, unsigned short sPort)
|
||||
struct hostent *hp = (struct hostent *)0;
|
||||
struct sockaddr_in port;
|
||||
#endif
|
||||
#if HAVE_SETSOCKOPT
|
||||
int one = 1;
|
||||
#endif
|
||||
|
||||
#if USE_IPV6
|
||||
# if HAVE_MEMSET
|
||||
@ -561,8 +564,15 @@ GetPort(char *pcToHost, unsigned short sPort)
|
||||
*/
|
||||
s = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
|
||||
if (s != -1) {
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt
|
||||
(s, SOL_SOCKET, SO_KEEPALIVE, (char *)&one,
|
||||
sizeof(one)) < 0)
|
||||
goto fail;
|
||||
# endif
|
||||
if (connect(s, rp->ai_addr, rp->ai_addrlen) == 0)
|
||||
goto success;
|
||||
fail:
|
||||
close(s);
|
||||
}
|
||||
rp = rp->ai_next;
|
||||
@ -639,10 +649,19 @@ GetPort(char *pcToHost, unsigned short sPort)
|
||||
Error("socket(AF_INET,SOCK_STREAM): %s", strerror(errno));
|
||||
return (CONSFILE *)0;
|
||||
}
|
||||
# if HAVE_SETSOCKOPT
|
||||
if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (char *)&one, sizeof(one))
|
||||
< 0) {
|
||||
Error("setsockopt(SO_KEEPALIVE): %s", strerror(errno));
|
||||
close(s);
|
||||
return (CONSFILE *)0;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (connect(s, (struct sockaddr *)(&port), sizeof(port)) < 0) {
|
||||
Error("connect(): %hu@%s: %s", ntohs(port.sin_port), pcToHost,
|
||||
strerror(errno));
|
||||
close(s);
|
||||
return (CONSFILE *)0;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" $Id: console.man,v 1.65 2013/09/25 22:10:30 bryan Exp $
|
||||
.TH CONSOLE 1 "2013/09/25" "conserver-8.2.0" "conserver"
|
||||
.\" $Id: console.man,v 1.66 2015/06/02 17:19:31 bryan Exp $
|
||||
.TH CONSOLE 1 "2015/06/02" "conserver-8.2.1" "conserver"
|
||||
.SH NAME
|
||||
console \- console server client program
|
||||
.SH SYNOPSIS
|
||||
@ -857,7 +857,7 @@ list the break sequences available
|
||||
.B l0
|
||||
send the break sequence associated with this console
|
||||
.TP
|
||||
.B l1-9
|
||||
.B l1-9a-z
|
||||
send the specific break sequence
|
||||
.TP
|
||||
.B m
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
%define pkg conserver
|
||||
%define ver 8.2.0
|
||||
%define ver 8.2.1
|
||||
|
||||
# define the name of the machine on which the main conserver
|
||||
# daemon will be running if you don't want to use the default
|
||||
|
@ -1,7 +1,7 @@
|
||||
PKG="conserver"
|
||||
NAME="Console server and client"
|
||||
CATEGORY="system"
|
||||
VERSION="8.2.0"
|
||||
VERSION="8.2.1"
|
||||
DESC="Console server and client"
|
||||
CLASSES=none
|
||||
ARCH=sparc
|
||||
|
@ -1,20 +1,20 @@
|
||||
[Enter `^Ec?' for help]
|
||||
[help]
|
||||
. disconnect ; move to another console
|
||||
a attach read/write b send broadcast message
|
||||
c toggle flow control d down a console
|
||||
e change escape sequence f force attach read/write
|
||||
g group info i information dump
|
||||
L toggle logging on/off l? break sequence list
|
||||
l0 send break per config file l1-9 send specific break sequence
|
||||
m display the message of the day n write a note to the logfile
|
||||
o (re)open the tty and log file p playback the last 60 lines
|
||||
P set number of playback lines r replay the last 20 lines
|
||||
R set number of replay lines s spy mode (read only)
|
||||
u show host status v show version info
|
||||
w who is on this console x show console baud info
|
||||
z suspend the connection ! invoke task
|
||||
| attach local command ? print this message
|
||||
<cr> ignore/abort command ^R replay the last line
|
||||
\ooo send character by octal code
|
||||
. disconnect ; move to another console
|
||||
a attach read/write b send broadcast message
|
||||
c toggle flow control d down a console
|
||||
e change escape sequence f force attach read/write
|
||||
g group info i information dump
|
||||
L toggle logging on/off l? break sequence list
|
||||
l0 send break per config file l1-9a-z send specific break sequence
|
||||
m display message of the day n write a note to the logfile
|
||||
o (re)open the tty and log file p playback the last 60 lines
|
||||
P set number of playback lines r replay the last 20 lines
|
||||
R set number of replay lines s spy mode (read only)
|
||||
u show host status v show version info
|
||||
w who is on this console x show console baud info
|
||||
z suspend the connection ! invoke task
|
||||
| attach local command ? print this message
|
||||
<cr> ignore/abort command ^R replay the last line
|
||||
\ooo send character by octal code
|
||||
[disconnect]
|
||||
|
@ -1,20 +1,20 @@
|
||||
[Enter `^Ec?' for help]
|
||||
[help]
|
||||
. disconnect ; move to another console
|
||||
a attach read/write b send broadcast message
|
||||
c toggle flow control d down a console
|
||||
e change escape sequence f force attach read/write
|
||||
g group info i information dump
|
||||
L toggle logging on/off l? break sequence list
|
||||
l0 send break per config file l1-9 send specific break sequence
|
||||
m display the message of the day n write a note to the logfile
|
||||
o (re)open the tty and log file p playback the last 60 lines
|
||||
P set number of playback lines r replay the last 20 lines
|
||||
R set number of replay lines s spy mode (read only)
|
||||
u show host status v show version info
|
||||
w who is on this console x show console baud info
|
||||
z suspend the connection ! invoke task
|
||||
| attach local command ? print this message
|
||||
<cr> ignore/abort command ^R replay the last line
|
||||
\ooo send character by octal code
|
||||
. disconnect ; move to another console
|
||||
a attach read/write b send broadcast message
|
||||
c toggle flow control d down a console
|
||||
e change escape sequence f force attach read/write
|
||||
g group info i information dump
|
||||
L toggle logging on/off l? break sequence list
|
||||
l0 send break per config file l1-9a-z send specific break sequence
|
||||
m display message of the day n write a note to the logfile
|
||||
o (re)open the tty and log file p playback the last 60 lines
|
||||
P set number of playback lines r replay the last 20 lines
|
||||
R set number of replay lines s spy mode (read only)
|
||||
u show host status v show version info
|
||||
w who is on this console x show console baud info
|
||||
z suspend the connection ! invoke task
|
||||
| attach local command ? print this message
|
||||
<cr> ignore/abort command ^R replay the last line
|
||||
\ooo send character by octal code
|
||||
[disconnect]
|
||||
|
Loading…
x
Reference in New Issue
Block a user