Imported from conserver-8.1.13.tar.gz

This commit is contained in:
Bryan Stansell 2006-01-15 09:22:12 -08:00
parent 3cec1dde71
commit c418af32c7
14 changed files with 176 additions and 56 deletions

12
CHANGES
View File

@ -1,6 +1,16 @@
CHANGES
=======
version 8.1.13 (Jan 15, 2006):
- use SIOCGIFNUM for interface count (if available) and catch
EINVAL on Solaris - patch by Peter Jeremy
<peter.jeremy@alcatel.com.au>
- console output now resets idle timer - suggested by Peter
Saunders <pajs@fodder.org.uk>
- bug fix for conserver process running out of control and using
up cpu - debugged with Alexandra N. Kossovsky
<Alexandra.Kossovsky@oktetlabs.ru>
version 8.1.12 (Sep 5, 2005):
- printf() fix for autologin - patch by Menno Duursma
<druiloor@zonnet.nl>
@ -813,5 +823,5 @@ before version 6.05:
and enhancements of various types were applied.
#
# $Id: CHANGES,v 1.210 2005/09/05 23:15:27 bryan Exp $
# $Id: CHANGES,v 1.212 2006/01/15 17:11:42 bryan Exp $
#

29
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-08-03'
timestamp='2006-01-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -206,6 +206,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
@ -764,7 +767,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@ -779,7 +787,7 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
x86:Interix*:[345]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@ -851,7 +859,7 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@ -870,7 +878,7 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@ -919,6 +927,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
@ -964,7 +975,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__PGI)
LIBC=gnu
#else
LIBC=gnuaout
@ -974,7 +985,7 @@ EOF
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@ -1185,7 +1196,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1264,6 +1274,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

45
config.sub vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2006-01-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -119,8 +119,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -171,6 +172,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -187,6 +192,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -239,7 +248,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -257,7 +266,7 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| mt \
| msp430 \
| ns16k | ns32k \
| or32 \
@ -286,6 +295,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@ -336,7 +348,7 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| mt-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
@ -696,6 +708,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@ -803,6 +818,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@ -859,6 +880,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@ -1174,21 +1199,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)

View File

@ -1,5 +1,5 @@
.\" $Id: conserver.cf.man,v 1.73 2005/06/09 07:09:31 bryan Exp $
.TH CONSERVER.CF 5 "2005/06/09" "conserver-8.1.12" "conserver"
.TH CONSERVER.CF 5 "2005/06/09" "conserver-8.1.13" "conserver"
.SH NAME
conserver.cf \- console configuration file for
.BR conserver (8)

View File

@ -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.1.12" "conserver"
.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.1.13" "conserver"
.SH NAME
conserver.passwd \- user access information for
.BR conserver (8)

View File

@ -182,11 +182,11 @@
<H3>Downloading</H3>
<P>The current version, released on Sep 5, 2005, is <A
href="8.1.12.tar.gz">8.1.12.tar.gz</A>. You can get it
<P>The current version, released on Jan 15, 2006, is <A
href="8.1.13.tar.gz">8.1.13.tar.gz</A>. You can get it
via <A href=
"ftp://ftp.conserver.com/conserver/8.1.12.tar.gz">FTP</A>
or <A href="8.1.12.tar.gz">HTTP</A>. See the <A href=
"ftp://ftp.conserver.com/conserver/8.1.13.tar.gz">FTP</A>
or <A href="8.1.13.tar.gz">HTTP</A>. See the <A href=
"CHANGES">CHANGES</A> file for information on the latest
updates.</P>

View File

@ -1,6 +1,6 @@
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
.\" $Id: conserver.man,v 1.51 2005/04/02 09:59:48 bryan Exp $
.TH CONSERVER 8 "2005/04/02" "conserver-8.1.12" "conserver"
.TH CONSERVER 8 "2005/04/02" "conserver-8.1.13" "conserver"
.SH NAME
conserver \- console server daemon
.SH SYNOPSIS

View File

@ -1,5 +1,5 @@
/*
* $Id: cutil.c,v 1.122 2005/06/11 02:31:05 bryan Exp $
* $Id: cutil.c,v 1.125 2006/01/15 17:10:14 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -1050,6 +1050,9 @@ FileRead(cfp, buf, len)
{
int retval = -1;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) {
case simpleFile:
case simplePipe:
@ -1148,6 +1151,10 @@ FileRead(cfp, buf, len)
"FileRead(): failed attempted read of %d byte%s from fd %d",
len, (len == 1) ? "" : "s", cfp->fd));
}
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval;
}
@ -1168,14 +1175,21 @@ FileWrite(cfp, bufferonly, buf, len)
int retval = 0;
int fdout = 0;
if (len < 0 && buf != (char *)0)
len = strlen(buf);
if (cfp->ftype == simplePipe)
fdout = cfp->fdout;
else
fdout = cfp->fd;
if (cfp->errored == FLAGTRUE) {
if (cfp->wbuf->used > 1)
BuildString((char *)0, cfp->wbuf);
FD_CLR(fdout, &winit);
return -1;
}
if (len < 0 && buf != (char *)0)
len = strlen(buf);
if (fDebug && len > 0 && buf != (char *)0) {
static STRING *tmpString = (STRING *)0;
if (tmpString == (STRING *)0)
@ -1316,14 +1330,12 @@ FileWrite(cfp, bufferonly, buf, len)
break;
#endif
default:
len_out = -1;
retval = -1;
break;
}
/* so, if we saw an error, just bail...all is done anyway */
if (retval < 0)
len_out = retval;
if (retval >= 0) {
if (len_out > 0) {
/* save the rest for later */
if (len > 0) {
@ -1332,6 +1344,15 @@ FileWrite(cfp, bufferonly, buf, len)
BuildString((char *)0, cfp->wbuf);
}
}
retval = len_out;
}
if (retval < 0) {
if (cfp->wbuf->used > 1)
BuildString((char *)0, cfp->wbuf);
cfp->errored = FLAGTRUE;
}
if (cfp->wbuf->used <= 1)
FD_CLR(fdout, &winit);
else {
@ -1341,15 +1362,16 @@ FileWrite(cfp, bufferonly, buf, len)
(cfp->wbuf->used <= 1) ? "" : "s", fdout));
}
if (len_out >= 0) {
CONDDEBUG((2, "FileWrite(): wrote %d byte%s to fd %d", len_out,
(len_out == 1) ? "" : "s", fdout));
if (retval >= 0) {
CONDDEBUG((2, "FileWrite(): wrote %d byte%s to fd %d", retval,
(retval == 1) ? "" : "s", fdout));
} else {
CONDDEBUG((2, "FileWrite(): write of %d byte%s to fd %d: %s",
len_orig, (len_out == -1) ? "" : "s", fdout,
len_orig, (retval == -1) ? "" : "s", fdout,
strerror(errno)));
}
return len_out;
return retval;
}
int
@ -1743,6 +1765,9 @@ FileStat(cfp, buf)
{
int retval = 0;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) {
case simpleFile:
retval = fstat(cfp->fd, buf);
@ -1763,6 +1788,9 @@ FileStat(cfp, buf)
break;
}
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval;
}
@ -1779,6 +1807,9 @@ FileSeek(cfp, offset, whence)
{
int retval = 0;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) {
case simpleFile:
retval = lseek(cfp->fd, offset, whence);
@ -1799,6 +1830,9 @@ FileSeek(cfp, offset, whence)
break;
}
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval;
}
@ -2063,20 +2097,31 @@ FileSend(cfp, msg, len, flags)
#endif
{
int retval = 0;
int fdout;
if (cfp->ftype == simplePipe)
fdout = cfp->fdout;
else
fdout = cfp->fd;
if (cfp->errored == FLAGTRUE) {
FD_CLR(fdout, &winit);
return -1;
}
switch (cfp->ftype) {
case simpleFile:
retval = send(cfp->fd, msg, len, flags);
retval = send(fdout, msg, len, flags);
break;
case simplePipe:
retval = send(cfp->fdout, msg, len, flags);
retval = send(fdout, msg, len, flags);
break;
case simpleSocket:
retval = send(cfp->fd, msg, len, flags);
retval = send(fdout, msg, len, flags);
break;
#if HAVE_OPENSSL
case SSLSocket:
retval = send(cfp->fd, msg, len, flags);
retval = send(fdout, msg, len, flags);
break;
#endif
default:
@ -2084,6 +2129,11 @@ FileSend(cfp, msg, len, flags)
break;
}
if (retval < 0) {
cfp->errored = FLAGTRUE;
FD_CLR(fdout, &winit);
}
return retval;
}
@ -2141,6 +2191,9 @@ ProbeInterfaces(bindAddr)
struct ifreq *ifr;
#ifdef SIOCGIFFLAGS
struct ifreq ifrcopy;
#endif
#ifdef SIOCGIFNUM
int nifr;
#endif
int sock;
int r = 0, m = 0;
@ -2165,13 +2218,17 @@ ProbeInterfaces(bindAddr)
Error("ProbeInterfaces(): socket(): %s", strerror(errno));
Bye(EX_OSERR);
}
#ifdef SIOCGIFNUM
if (ioctl(sock, SIOCGIFNUM, &nifr) == 0)
bufsize = nifr * sizeof(struct ifreq) + 512;
#endif
while (bufsize) {
ifc.ifc_len = bufsize;
ifc.ifc_req = (struct ifreq *)malloc(ifc.ifc_len);
if (ifc.ifc_req == (struct ifreq *)0)
OutOfMem();
if (ioctl(sock, SIOCGIFCONF, &ifc) != 0) {
if (ioctl(sock, SIOCGIFCONF, &ifc) != 0 && errno != EINVAL) {
free(ifc.ifc_req);
close(sock);
Error("ProbeInterfaces(): ioctl(SIOCGIFCONF): %s",
@ -2187,6 +2244,8 @@ ProbeInterfaces(bindAddr)
* in (==bufsize). so, we'll assume a 512 byte gap would have
* been big enough to put one more record and as long as we have
* that "buffer zone", we should have all the interfaces.
* so, solaris returns EINVAL if it's too small, so we catch that
* above and since if_len is bufsize, it'll loop again.
*/
if (ifc.ifc_len + 512 < bufsize)
break;

View File

@ -1,5 +1,5 @@
/*
* $Id: cutil.h,v 1.63 2004/05/25 00:38:15 bryan Exp $
* $Id: cutil.h,v 1.64 2006/01/15 17:10:14 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -70,6 +70,7 @@ typedef struct consFile {
int fd;
int fdout; /* only used when a simplePipe */
STRING *wbuf;
FLAG errored;
FLAG quoteiac;
FLAG sawiac;
FLAG sawiacsusp;

View File

@ -1,5 +1,5 @@
/*
* $Id: group.c,v 5.318 2005/06/08 18:09:40 bryan Exp $
* $Id: group.c,v 5.319 2005/11/28 20:46:08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@ -2520,6 +2520,16 @@ DoConsoleRead(pCEServing)
CONDDEBUG((1, "DoConsoleRead(): read %d bytes from fd %d", nr,
cofile));
if (nr > 0) {
pCEServing->lastWrite = time((time_t *)0);
if (pCEServing->idletimeout != (time_t)0 &&
(timers[T_CIDLE] == (time_t)0 ||
timers[T_CIDLE] >
pCEServing->lastWrite + pCEServing->idletimeout))
timers[T_CIDLE] =
pCEServing->lastWrite + pCEServing->idletimeout;
}
if (pCEServing->type == HOST && pCEServing->raw != FLAGTRUE) {
/* Do a little Telnet Protocol interpretation
* state = 0: normal

View File

@ -1,5 +1,5 @@
/*
* $Id: version.h,v 1.71 2005/09/05 23:13:14 bryan Exp $
* $Id: version.h,v 1.72 2006/01/15 17:10:44 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.1.12"
#define THIS_VERSION "conserver.com version 8.1.13"

View File

@ -1,5 +1,5 @@
.\" $Id: console.man,v 1.58 2005/09/05 22:17:33 bryan Exp $
.TH CONSOLE 1 "2005/09/05" "conserver-8.1.12" "conserver"
.TH CONSOLE 1 "2005/09/05" "conserver-8.1.13" "conserver"
.SH NAME
console \- console server client program
.SH SYNOPSIS

View File

@ -4,7 +4,7 @@
#
%define pkg conserver
%define ver 8.1.12
%define ver 8.1.13
# 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="8.1.12"
VERSION="8.1.13"
DESC="Console server and client"
CLASSES=none
ARCH=sparc