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 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): version 8.1.12 (Sep 5, 2005):
- printf() fix for autologin - patch by Menno Duursma - printf() fix for autologin - patch by Menno Duursma
<druiloor@zonnet.nl> <druiloor@zonnet.nl>
@ -813,5 +823,5 @@ before version 6.05:
and enhancements of various types were applied. 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, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 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 # 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 # 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:*:*) *:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;; exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*) macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE} echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;; exit ;;
@ -764,7 +767,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;; exit ;;
*:FreeBSD:*:*) *: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 ;; exit ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
@ -779,7 +787,7 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[34]*) x86:Interix*:[345]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit ;; exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@ -851,7 +859,7 @@ EOF
#endif #endif
#endif #endif
EOF 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; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
mips64:Linux:*:*) mips64:Linux:*:*)
@ -870,7 +878,7 @@ EOF
#endif #endif
#endif #endif
EOF 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; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
or32:Linux:*:*) or32:Linux:*:*)
@ -919,6 +927,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
@ -964,7 +975,7 @@ EOF
LIBC=gnulibc1 LIBC=gnulibc1
# endif # endif
#else #else
#ifdef __INTEL_COMPILER #if defined(__INTEL_COMPILER) || defined(__PGI)
LIBC=gnu LIBC=gnu
#else #else
LIBC=gnuaout LIBC=gnuaout
@ -974,7 +985,7 @@ EOF
LIBC=dietlibc LIBC=dietlibc
#endif #endif
EOF 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 && { test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}" echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit exit
@ -1185,7 +1196,6 @@ EOF
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1264,6 +1274,9 @@ EOF
i*86:skyos:*:*) i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;; exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #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, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 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. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME 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. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@ -171,6 +172,10 @@ case $os in
-hiux*) -hiux*)
os=-hiuxwe2 os=-hiuxwe2
;; ;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5) -sco5)
os=-sco3.2v5 os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 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. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 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*) -sco*)
os=-sco3.2v2 os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 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 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@ -257,7 +266,7 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| ms1 \ | mt \
| msp430 \ | msp430 \
| ns16k | ns32k \ | ns16k | ns32k \
| or32 \ | or32 \
@ -286,6 +295,9 @@ case $basic_machine in
;; ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;; ;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
@ -336,7 +348,7 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
| mmix-* \ | mmix-* \
| ms1-* \ | mt-* \
| msp430-* \ | msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
@ -696,6 +708,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
;; ;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs) mvs)
basic_machine=i370-ibm basic_machine=i370-ibm
os=-mvs os=-mvs
@ -803,6 +818,12 @@ case $basic_machine in
pc532 | pc532-*) pc532 | pc532-*)
basic_machine=ns32k-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) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
;; ;;
@ -859,6 +880,10 @@ case $basic_machine in
basic_machine=i586-unknown basic_machine=i586-unknown
os=-pw32 os=-pw32
;; ;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k) rom68k)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
os=-coff os=-coff
@ -1174,21 +1199,23 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -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* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*) | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)

View File

@ -1,5 +1,5 @@
.\" $Id: conserver.cf.man,v 1.73 2005/06/09 07:09:31 bryan Exp $ .\" $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 .SH NAME
conserver.cf \- console configuration file for conserver.cf \- console configuration file for
.BR conserver (8) .BR conserver (8)

View File

@ -1,5 +1,5 @@
.\" $Id: conserver.passwd.man,v 1.10 2004/01/08 16:12:33 bryan Exp $ .\" $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 .SH NAME
conserver.passwd \- user access information for conserver.passwd \- user access information for
.BR conserver (8) .BR conserver (8)

View File

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

View File

@ -1,6 +1,6 @@
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine .\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
.\" $Id: conserver.man,v 1.51 2005/04/02 09:59:48 bryan Exp $ .\" $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 .SH NAME
conserver \- console server daemon conserver \- console server daemon
.SH SYNOPSIS .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 * Copyright conserver.com, 2000
* *
@ -1050,6 +1050,9 @@ FileRead(cfp, buf, len)
{ {
int retval = -1; int retval = -1;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) { switch (cfp->ftype) {
case simpleFile: case simpleFile:
case simplePipe: case simplePipe:
@ -1148,6 +1151,10 @@ FileRead(cfp, buf, len)
"FileRead(): failed attempted read of %d byte%s from fd %d", "FileRead(): failed attempted read of %d byte%s from fd %d",
len, (len == 1) ? "" : "s", cfp->fd)); len, (len == 1) ? "" : "s", cfp->fd));
} }
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval; return retval;
} }
@ -1168,14 +1175,21 @@ FileWrite(cfp, bufferonly, buf, len)
int retval = 0; int retval = 0;
int fdout = 0; int fdout = 0;
if (len < 0 && buf != (char *)0)
len = strlen(buf);
if (cfp->ftype == simplePipe) if (cfp->ftype == simplePipe)
fdout = cfp->fdout; fdout = cfp->fdout;
else else
fdout = cfp->fd; 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) { if (fDebug && len > 0 && buf != (char *)0) {
static STRING *tmpString = (STRING *)0; static STRING *tmpString = (STRING *)0;
if (tmpString == (STRING *)0) if (tmpString == (STRING *)0)
@ -1316,22 +1330,29 @@ FileWrite(cfp, bufferonly, buf, len)
break; break;
#endif #endif
default: default:
len_out = -1; retval = -1;
break; break;
} }
/* so, if we saw an error, just bail...all is done anyway */ /* so, if we saw an error, just bail...all is done anyway */
if (retval < 0) if (retval >= 0) {
len_out = retval; if (len_out > 0) {
/* save the rest for later */
if (len_out > 0) { if (len > 0) {
/* save the rest for later */ ShiftString(cfp->wbuf, len_out);
if (len > 0) { } else {
ShiftString(cfp->wbuf, len_out); BuildString((char *)0, cfp->wbuf);
} else { }
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) if (cfp->wbuf->used <= 1)
FD_CLR(fdout, &winit); FD_CLR(fdout, &winit);
else { else {
@ -1341,15 +1362,16 @@ FileWrite(cfp, bufferonly, buf, len)
(cfp->wbuf->used <= 1) ? "" : "s", fdout)); (cfp->wbuf->used <= 1) ? "" : "s", fdout));
} }
if (len_out >= 0) { if (retval >= 0) {
CONDDEBUG((2, "FileWrite(): wrote %d byte%s to fd %d", len_out, CONDDEBUG((2, "FileWrite(): wrote %d byte%s to fd %d", retval,
(len_out == 1) ? "" : "s", fdout)); (retval == 1) ? "" : "s", fdout));
} else { } else {
CONDDEBUG((2, "FileWrite(): write of %d byte%s to fd %d: %s", 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))); strerror(errno)));
} }
return len_out;
return retval;
} }
int int
@ -1743,6 +1765,9 @@ FileStat(cfp, buf)
{ {
int retval = 0; int retval = 0;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) { switch (cfp->ftype) {
case simpleFile: case simpleFile:
retval = fstat(cfp->fd, buf); retval = fstat(cfp->fd, buf);
@ -1763,6 +1788,9 @@ FileStat(cfp, buf)
break; break;
} }
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval; return retval;
} }
@ -1779,6 +1807,9 @@ FileSeek(cfp, offset, whence)
{ {
int retval = 0; int retval = 0;
if (cfp->errored == FLAGTRUE)
return -1;
switch (cfp->ftype) { switch (cfp->ftype) {
case simpleFile: case simpleFile:
retval = lseek(cfp->fd, offset, whence); retval = lseek(cfp->fd, offset, whence);
@ -1799,6 +1830,9 @@ FileSeek(cfp, offset, whence)
break; break;
} }
if (retval < 0)
cfp->errored = FLAGTRUE;
return retval; return retval;
} }
@ -2063,20 +2097,31 @@ FileSend(cfp, msg, len, flags)
#endif #endif
{ {
int retval = 0; 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) { switch (cfp->ftype) {
case simpleFile: case simpleFile:
retval = send(cfp->fd, msg, len, flags); retval = send(fdout, msg, len, flags);
break; break;
case simplePipe: case simplePipe:
retval = send(cfp->fdout, msg, len, flags); retval = send(fdout, msg, len, flags);
break; break;
case simpleSocket: case simpleSocket:
retval = send(cfp->fd, msg, len, flags); retval = send(fdout, msg, len, flags);
break; break;
#if HAVE_OPENSSL #if HAVE_OPENSSL
case SSLSocket: case SSLSocket:
retval = send(cfp->fd, msg, len, flags); retval = send(fdout, msg, len, flags);
break; break;
#endif #endif
default: default:
@ -2084,6 +2129,11 @@ FileSend(cfp, msg, len, flags)
break; break;
} }
if (retval < 0) {
cfp->errored = FLAGTRUE;
FD_CLR(fdout, &winit);
}
return retval; return retval;
} }
@ -2141,6 +2191,9 @@ ProbeInterfaces(bindAddr)
struct ifreq *ifr; struct ifreq *ifr;
#ifdef SIOCGIFFLAGS #ifdef SIOCGIFFLAGS
struct ifreq ifrcopy; struct ifreq ifrcopy;
#endif
#ifdef SIOCGIFNUM
int nifr;
#endif #endif
int sock; int sock;
int r = 0, m = 0; int r = 0, m = 0;
@ -2165,13 +2218,17 @@ ProbeInterfaces(bindAddr)
Error("ProbeInterfaces(): socket(): %s", strerror(errno)); Error("ProbeInterfaces(): socket(): %s", strerror(errno));
Bye(EX_OSERR); Bye(EX_OSERR);
} }
#ifdef SIOCGIFNUM
if (ioctl(sock, SIOCGIFNUM, &nifr) == 0)
bufsize = nifr * sizeof(struct ifreq) + 512;
#endif
while (bufsize) { while (bufsize) {
ifc.ifc_len = bufsize; ifc.ifc_len = bufsize;
ifc.ifc_req = (struct ifreq *)malloc(ifc.ifc_len); ifc.ifc_req = (struct ifreq *)malloc(ifc.ifc_len);
if (ifc.ifc_req == (struct ifreq *)0) if (ifc.ifc_req == (struct ifreq *)0)
OutOfMem(); OutOfMem();
if (ioctl(sock, SIOCGIFCONF, &ifc) != 0) { if (ioctl(sock, SIOCGIFCONF, &ifc) != 0 && errno != EINVAL) {
free(ifc.ifc_req); free(ifc.ifc_req);
close(sock); close(sock);
Error("ProbeInterfaces(): ioctl(SIOCGIFCONF): %s", Error("ProbeInterfaces(): ioctl(SIOCGIFCONF): %s",
@ -2187,6 +2244,8 @@ ProbeInterfaces(bindAddr)
* in (==bufsize). so, we'll assume a 512 byte gap would have * 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 * been big enough to put one more record and as long as we have
* that "buffer zone", we should have all the interfaces. * 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) if (ifc.ifc_len + 512 < bufsize)
break; 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 * Copyright conserver.com, 2000
* *
@ -70,6 +70,7 @@ typedef struct consFile {
int fd; int fd;
int fdout; /* only used when a simplePipe */ int fdout; /* only used when a simplePipe */
STRING *wbuf; STRING *wbuf;
FLAG errored;
FLAG quoteiac; FLAG quoteiac;
FLAG sawiac; FLAG sawiac;
FLAG sawiacsusp; 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 * Copyright conserver.com, 2000
* *
@ -2520,6 +2520,16 @@ DoConsoleRead(pCEServing)
CONDDEBUG((1, "DoConsoleRead(): read %d bytes from fd %d", nr, CONDDEBUG((1, "DoConsoleRead(): read %d bytes from fd %d", nr,
cofile)); 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) { if (pCEServing->type == HOST && pCEServing->raw != FLAGTRUE) {
/* Do a little Telnet Protocol interpretation /* Do a little Telnet Protocol interpretation
* state = 0: normal * 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 * Copyright conserver.com, 2000
* *
@ -14,4 +14,4 @@
@(#) Copyright 2000 conserver.com.\n\ @(#) Copyright 2000 conserver.com.\n\
All rights reserved.\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 $ .\" $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 .SH NAME
console \- console server client program console \- console server client program
.SH SYNOPSIS .SH SYNOPSIS

View File

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

View File

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