mirror of
https://github.com/bstansell/conserver.git
synced 2025-06-25 01:59:08 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
8cd506c093 | |||
29b909ee59 |
22
CHANGES
22
CHANGES
@ -1,6 +1,24 @@
|
|||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
version 8.1.4 (Apr 13, 2004):
|
||||||
|
- fixed macro use in manpages to hopefully be more compatible
|
||||||
|
- removed extra newline of --MARK-- range output
|
||||||
|
- fixed bug where server -b option wasn't working - reported by
|
||||||
|
Nathan R. Hruby <nhruby@uga.edu>
|
||||||
|
- fixed client segfault when using -R, -t, -d, and -b options
|
||||||
|
- added a --with-uds configure option to have all client/server
|
||||||
|
communication happen via unix domain sockets - suggested by
|
||||||
|
William P LePera <lepera@us.ibm.com>
|
||||||
|
|
||||||
|
version 8.1.3 (Mar 22, 2004):
|
||||||
|
- fixed small memory and file descriptor leak in client when
|
||||||
|
using '^Ec;'
|
||||||
|
- '^Ec;' now only disconnects from the previous console only
|
||||||
|
after a successfully move to a new console, allowing you to
|
||||||
|
abort the move - suggested by Christopher T. Beers
|
||||||
|
<ctbeers@syr.edu>
|
||||||
|
|
||||||
version 8.1.2 (Mar 11, 2004):
|
version 8.1.2 (Mar 11, 2004):
|
||||||
- better handling of client command (^Ec|) when user is bumped,
|
- better handling of client command (^Ec|) when user is bumped,
|
||||||
conserver is reconfigured, etc
|
conserver is reconfigured, etc
|
||||||
@ -15,7 +33,7 @@ version 8.1.2 (Mar 11, 2004):
|
|||||||
patch by Bill Sommerfeld <sommerfeld@east.sun.com>
|
patch by Bill Sommerfeld <sommerfeld@east.sun.com>
|
||||||
- added --with-extmsgs configure switch to enable entertaining
|
- added --with-extmsgs configure switch to enable entertaining
|
||||||
messages
|
messages
|
||||||
- marked various undocumented client commands as depreciated so
|
- marked various undocumented client commands as deprecated so
|
||||||
that they can be removed in a future version
|
that they can be removed in a future version
|
||||||
- added ability to "move" to a new console via '^Ec;' -
|
- added ability to "move" to a new console via '^Ec;' -
|
||||||
suggested by Christopher T. Beers <ctbeers@syr.edu>
|
suggested by Christopher T. Beers <ctbeers@syr.edu>
|
||||||
@ -690,5 +708,5 @@ before version 6.05:
|
|||||||
and enhancements of various types were applied.
|
and enhancements of various types were applied.
|
||||||
|
|
||||||
#
|
#
|
||||||
# $Id: CHANGES,v 1.158 2004/03/11 16:31:27 bryan Exp $
|
# $Id: CHANGES,v 1.167 2004/04/13 19:40:07 bryan Exp $
|
||||||
#
|
#
|
||||||
|
18
INSTALL
18
INSTALL
@ -10,6 +10,10 @@ Upgrading?
|
|||||||
new features added to the client if you're considering *not*
|
new features added to the client if you're considering *not*
|
||||||
upgrading.
|
upgrading.
|
||||||
|
|
||||||
|
Version 8.1.3
|
||||||
|
- The '^Ec;' sequence won't work correctly with 8.1.2 (where it
|
||||||
|
was introduced).
|
||||||
|
|
||||||
Version 8.1.2
|
Version 8.1.2
|
||||||
- The 'devicesubst' and 'execsubst' formats have changed from
|
- The 'devicesubst' and 'execsubst' formats have changed from
|
||||||
8.1.1. It's fairly simple to update your config file to the
|
8.1.1. It's fairly simple to update your config file to the
|
||||||
@ -161,6 +165,9 @@ Detailed Instructions
|
|||||||
--with-maxmemb=MAXMEMB Specify maximum consoles per process [16]
|
--with-maxmemb=MAXMEMB Specify maximum consoles per process [16]
|
||||||
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
||||||
--with-trustrevdns Trust reverse DNS information
|
--with-trustrevdns Trust reverse DNS information
|
||||||
|
--with-extmsgs Produce extended messages
|
||||||
|
--with-uds[=DIR] Use Unix domain sockets for client/server
|
||||||
|
communication [/tmp/conserver]
|
||||||
--with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
|
--with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
|
||||||
--with-openssl[=PATH] Compile in OpenSSL support
|
--with-openssl[=PATH] Compile in OpenSSL support
|
||||||
--with-dmalloc[=PATH] Compile in dmalloc support
|
--with-dmalloc[=PATH] Compile in dmalloc support
|
||||||
@ -178,10 +185,11 @@ Detailed Instructions
|
|||||||
A couple of notes. First, --with-libwrap will add tcp_wrappers
|
A couple of notes. First, --with-libwrap will add tcp_wrappers
|
||||||
lookups to all socket connections in the server. --with-openssl
|
lookups to all socket connections in the server. --with-openssl
|
||||||
will add encryption between the client and server when you connect
|
will add encryption between the client and server when you connect
|
||||||
to a console. things such as 'console -q', 'console -w', etc. are
|
to a console. --with-uds will cause the client and server to use
|
||||||
still unencrypted, as well as connections from conserver to any
|
unix domain sockets for their communication, eliminating the
|
||||||
terminal servers. --with-dmalloc should only be used to do memory
|
tcp communication they normally do (which means --with-master and
|
||||||
allocation debugging and not used in production.
|
--with-port are not used). --with-dmalloc should only be used to
|
||||||
|
do memory allocation debugging and not used in production.
|
||||||
|
|
||||||
- Run './configure'. This will detect system specific
|
- Run './configure'. This will detect system specific
|
||||||
information. The --prefix option will redirect where things are
|
information. The --prefix option will redirect where things are
|
||||||
@ -270,5 +278,5 @@ Other Information And Gotchas
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# $Id: INSTALL,v 1.36 2004/02/22 21:04:06 bryan Exp $
|
# $Id: INSTALL,v 1.38 2004/04/13 18:11:58 bryan Exp $
|
||||||
#
|
#
|
||||||
|
4
TODO
4
TODO
@ -102,10 +102,10 @@ Bryan Stansell
|
|||||||
- strict file permission checks on conserver.passwd/conserver.cf : Erik
|
- strict file permission checks on conserver.passwd/conserver.cf : Erik
|
||||||
Sjolund <erik.sjolund@sbc.su.se>
|
Sjolund <erik.sjolund@sbc.su.se>
|
||||||
|
|
||||||
- imbedded startup delays per remote host...or "group" of consoles in
|
- embedded startup delays per remote host...or "group" of consoles in
|
||||||
some way 'cause some ssh connections to console servers need
|
some way 'cause some ssh connections to console servers need
|
||||||
significant throttling : Jay McCanta <mccantaj@amgen.com>
|
significant throttling : Jay McCanta <mccantaj@amgen.com>
|
||||||
|
|
||||||
#
|
#
|
||||||
# $Id: TODO,v 1.46 2004/03/11 16:45:57 bryan Exp $
|
# $Id: TODO,v 1.47 2004/03/12 17:34:49 bryan Exp $
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $Id: autologin.man,v 1.1 2003/11/04 02:36:24 bryan Exp $
|
.\" $Id: autologin.man,v 1.2 2004/03/23 18:32:06 bryan Exp $
|
||||||
.TH AUTOLOGIN 8L PUCC
|
.TH AUTOLOGIN 8L PUCC
|
||||||
.SH NAME
|
.SH NAME
|
||||||
autologin \- create an automatic login session from /etc/inittab
|
autologin \- create an automatic login session from /etc/inittab
|
||||||
@ -112,12 +112,21 @@ environment variable set to
|
|||||||
ss10:2:respawn:/usr/local/etc/autologin \-e TERM=reg20 \-t/dev/tty10 \-lssinfo
|
ss10:2:respawn:/usr/local/etc/autologin \-e TERM=reg20 \-t/dev/tty10 \-lssinfo
|
||||||
.ad
|
.ad
|
||||||
.PP
|
.PP
|
||||||
Adding the following line to \fI/etc/ttytab\fP on a Sun 4.1.\fIx\fP
|
Adding the following line to
|
||||||
|
.I /etc/ttytab
|
||||||
|
on a Sun
|
||||||
|
.RI 4.1. x
|
||||||
machine establishes a root login on the console device:
|
machine establishes a root login on the console device:
|
||||||
|
.br
|
||||||
.na
|
.na
|
||||||
console "/usr/local/etc/autologin \-lroot \-t" xterm on local secure
|
console "/usr/local/etc/autologin \-lroot \-t" xterm on local secure
|
||||||
.ad
|
.ad
|
||||||
Note that \fIinit\fP provides the \fItty\fP argument on the end of the command.
|
.PP
|
||||||
|
Note that
|
||||||
|
.I init
|
||||||
|
provides the
|
||||||
|
.I tty
|
||||||
|
argument on the end of the command.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/bin/su
|
/bin/su
|
||||||
.br
|
.br
|
||||||
|
3
compat.h
3
compat.h
@ -8,6 +8,9 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
#include <sys/un.h>
|
||||||
|
#endif
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
5
config.guess
vendored
5
config.guess
vendored
@ -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 Free Software Foundation, Inc.
|
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2004-03-03'
|
timestamp='2004-03-12'
|
||||||
|
|
||||||
# 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
|
||||||
@ -853,6 +853,9 @@ EOF
|
|||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
m32r*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
|
exit 0 ;;
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -324,12 +324,18 @@
|
|||||||
/* Defined if we trust reverse DNS */
|
/* Defined if we trust reverse DNS */
|
||||||
#undef TRUST_REVERSE_DNS
|
#undef TRUST_REVERSE_DNS
|
||||||
|
|
||||||
|
/* Directory for Unix domain sockets */
|
||||||
|
#undef UDSDIR
|
||||||
|
|
||||||
/* Defined if we produce extended messages */
|
/* Defined if we produce extended messages */
|
||||||
#undef USE_EXTENDED_MESSAGES
|
#undef USE_EXTENDED_MESSAGES
|
||||||
|
|
||||||
/* use tcp_wrappers libwrap */
|
/* use tcp_wrappers libwrap */
|
||||||
#undef USE_LIBWRAP
|
#undef USE_LIBWRAP
|
||||||
|
|
||||||
|
/* Defined if we use Unix domain sockets */
|
||||||
|
#undef USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
|
||||||
/* Define to 1 if on AIX 3.
|
/* Define to 1 if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
We just want to avoid a redefinition error message. */
|
We just want to avoid a redefinition error message. */
|
||||||
|
12
config.sub
vendored
12
config.sub
vendored
@ -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 Free Software Foundation, Inc.
|
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2004-02-23'
|
timestamp='2004-03-12'
|
||||||
|
|
||||||
# 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
|
||||||
@ -237,7 +237,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 | m68000 | m68k | m88k | mcore \
|
| m32r | m32rle | m68000 | m68k | m88k | mcore \
|
||||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||||
| mips16 \
|
| mips16 \
|
||||||
| mips64 | mips64el \
|
| mips64 | mips64el \
|
||||||
@ -262,7 +262,7 @@ case $basic_machine in
|
|||||||
| pyramid \
|
| pyramid \
|
||||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sh64 | sh64le \
|
| sh64 | sh64le \
|
||||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||||||
| strongarm \
|
| strongarm \
|
||||||
| tahoe | thumb | tic4x | tic80 | tron \
|
| tahoe | thumb | tic4x | tic80 | tron \
|
||||||
| v850 | v850e \
|
| v850 | v850e \
|
||||||
@ -308,7 +308,7 @@ case $basic_machine in
|
|||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
| m32r-* \
|
| m32r-* | m32rle-* \
|
||||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||||
| m88110-* | m88k-* | mcore-* \
|
| m88110-* | m88k-* | mcore-* \
|
||||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||||
@ -336,7 +336,7 @@ case $basic_machine in
|
|||||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||||
| tahoe-* | thumb-* \
|
| tahoe-* | thumb-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
| tron-* \
|
| tron-* \
|
||||||
@ -1081,7 +1081,7 @@ case $basic_machine in
|
|||||||
sh64)
|
sh64)
|
||||||
basic_machine=sh64-unknown
|
basic_machine=sh64-unknown
|
||||||
;;
|
;;
|
||||||
sparc | sparcv9 | sparcv9b)
|
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||||
basic_machine=sparc-sun
|
basic_machine=sparc-sun
|
||||||
;;
|
;;
|
||||||
cydra)
|
cydra)
|
||||||
|
51
configure
vendored
51
configure
vendored
@ -857,6 +857,9 @@ Optional Packages:
|
|||||||
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
||||||
--with-trustrevdns Trust reverse DNS information
|
--with-trustrevdns Trust reverse DNS information
|
||||||
--with-extmsgs Produce extended messages
|
--with-extmsgs Produce extended messages
|
||||||
|
--with-uds[=DIR]
|
||||||
|
Use Unix domain sockets for client/server
|
||||||
|
communication [/tmp/conserver]
|
||||||
--with-libwrap[=PATH]
|
--with-libwrap[=PATH]
|
||||||
Compile in libwrap (tcp_wrappers) support
|
Compile in libwrap (tcp_wrappers) support
|
||||||
--with-openssl[=PATH]
|
--with-openssl[=PATH]
|
||||||
@ -1312,6 +1315,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_headers="$ac_config_headers config.h"
|
ac_config_headers="$ac_config_headers config.h"
|
||||||
|
|
||||||
@ -1692,6 +1696,53 @@ else
|
|||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking whether to use Unix domain sockets" >&5
|
||||||
|
echo $ECHO_N "checking whether to use Unix domain sockets... $ECHO_C" >&6
|
||||||
|
|
||||||
|
# Check whether --with-uds or --without-uds was given.
|
||||||
|
if test "${with_uds+set}" = set; then
|
||||||
|
withval="$with_uds"
|
||||||
|
case "$withval" in
|
||||||
|
yes)
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define UDSDIR "/tmp/conserver"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define USE_UNIX_DOMAIN_SOCKETS 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: result: /tmp/conserver" >&5
|
||||||
|
echo "${ECHO_T}/tmp/conserver" >&6
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define UDSDIR "$withval"
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define USE_UNIX_DOMAIN_SOCKETS 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: result: '$withval'" >&5
|
||||||
|
echo "${ECHO_T}'$withval'" >&6
|
||||||
|
if expr "$withval" : '/' >/dev/null 2>&1; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** WARNING *** you may have better success using a fully-qualified path"
|
||||||
|
echo "*** WARNING *** instead of '$withval'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi;
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
59
configure.in
59
configure.in
@ -17,9 +17,12 @@ AH_TEMPLATE([HAVE_DMALLOC], [have dmalloc support])
|
|||||||
AH_TEMPLATE([HAVE_SA_LEN],[Defined if sa_len member exists in struct sockaddr])
|
AH_TEMPLATE([HAVE_SA_LEN],[Defined if sa_len member exists in struct sockaddr])
|
||||||
AH_TEMPLATE([TRUST_REVERSE_DNS],[Defined if we trust reverse DNS])
|
AH_TEMPLATE([TRUST_REVERSE_DNS],[Defined if we trust reverse DNS])
|
||||||
AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages])
|
AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages])
|
||||||
|
AH_TEMPLATE([USE_UNIX_DOMAIN_SOCKETS],[Defined if we use Unix domain sockets])
|
||||||
|
AH_TEMPLATE([UDSDIR], [Directory for Unix domain sockets])
|
||||||
|
|
||||||
dnl ### Normal initialization. ######################################
|
dnl ### Normal initialization. ######################################
|
||||||
AC_INIT
|
AC_INIT
|
||||||
|
AC_PREREQ(2.59)
|
||||||
AC_CONFIG_SRCDIR([conserver/main.c])
|
AC_CONFIG_SRCDIR([conserver/main.c])
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
@ -49,7 +52,7 @@ dnl AC_MSG_RESULT($with_64bit)
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for port number specification)
|
AC_MSG_CHECKING(for port number specification)
|
||||||
AC_ARG_WITH(port,
|
AC_ARG_WITH(port,
|
||||||
AC_HELP_STRING([--with-port=PORT],[Specify port number @<:@conserver@:>@]),
|
AS_HELP_STRING([--with-port=PORT],[Specify port number @<:@conserver@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
|
AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
|
||||||
@ -65,7 +68,7 @@ AC_ARG_WITH(port,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for secondary channel base port)
|
AC_MSG_CHECKING(for secondary channel base port)
|
||||||
AC_ARG_WITH(base,
|
AC_ARG_WITH(base,
|
||||||
AC_HELP_STRING([--with-base=PORT], [Base port for secondary channel @<:@0@:>@]),
|
AS_HELP_STRING([--with-base=PORT], [Base port for secondary channel @<:@0@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(DEFBASEPORT, "0")
|
AC_DEFINE_UNQUOTED(DEFBASEPORT, "0")
|
||||||
@ -81,7 +84,7 @@ AC_ARG_WITH(base,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for master conserver hostname)
|
AC_MSG_CHECKING(for master conserver hostname)
|
||||||
AC_ARG_WITH(master,
|
AC_ARG_WITH(master,
|
||||||
AC_HELP_STRING([--with-master=MASTER],[Specify master server hostname @<:@console@:>@]),
|
AS_HELP_STRING([--with-master=MASTER],[Specify master server hostname @<:@console@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(MASTERHOST, "console")
|
AC_DEFINE_UNQUOTED(MASTERHOST, "console")
|
||||||
@ -97,7 +100,7 @@ AC_ARG_WITH(master,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for configuration filename)
|
AC_MSG_CHECKING(for configuration filename)
|
||||||
AC_ARG_WITH(cffile,
|
AC_ARG_WITH(cffile,
|
||||||
AC_HELP_STRING([--with-cffile=CFFILE],[Specify config filename @<:@SYSCONFDIR/conserver.cf@:>@]),
|
AS_HELP_STRING([--with-cffile=CFFILE],[Specify config filename @<:@SYSCONFDIR/conserver.cf@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/conserver.cf"])
|
AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/conserver.cf"])
|
||||||
@ -117,7 +120,7 @@ AC_ARG_WITH(cffile,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for password filename)
|
AC_MSG_CHECKING(for password filename)
|
||||||
AC_ARG_WITH(pwdfile,
|
AC_ARG_WITH(pwdfile,
|
||||||
AC_HELP_STRING([--with-pwdfile=PWDFILE],[Specify password filename @<:@SYSCONFDIR/conserver.passwd@:>@]),
|
AS_HELP_STRING([--with-pwdfile=PWDFILE],[Specify password filename @<:@SYSCONFDIR/conserver.passwd@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/conserver.passwd"])
|
AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/conserver.passwd"])
|
||||||
@ -137,7 +140,7 @@ AC_ARG_WITH(pwdfile,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for log filename)
|
AC_MSG_CHECKING(for log filename)
|
||||||
AC_ARG_WITH(logfile,
|
AC_ARG_WITH(logfile,
|
||||||
AC_HELP_STRING([--with-logfile=LOGFILE],[Specify log filename @<:@/var/log/conserver@:>@]),
|
AS_HELP_STRING([--with-logfile=LOGFILE],[Specify log filename @<:@/var/log/conserver@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
|
AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
|
||||||
@ -154,7 +157,7 @@ AC_ARG_WITH(logfile,
|
|||||||
AC_SUBST(PIDFILE)
|
AC_SUBST(PIDFILE)
|
||||||
AC_MSG_CHECKING(for PID filename)
|
AC_MSG_CHECKING(for PID filename)
|
||||||
AC_ARG_WITH(pidfile,
|
AC_ARG_WITH(pidfile,
|
||||||
AC_HELP_STRING([--with-pidfile=PIDFILE],[Specify PID filepath @<:@/var/run/conserver.pid@:>@]),
|
AS_HELP_STRING([--with-pidfile=PIDFILE],[Specify PID filepath @<:@/var/run/conserver.pid@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
PIDFILE="/var/run/conserver.pid"
|
PIDFILE="/var/run/conserver.pid"
|
||||||
@ -169,7 +172,7 @@ AC_MSG_RESULT('$PIDFILE')
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for MAXMEMB setting)
|
AC_MSG_CHECKING(for MAXMEMB setting)
|
||||||
AC_ARG_WITH(maxmemb,
|
AC_ARG_WITH(maxmemb,
|
||||||
AC_HELP_STRING([--with-maxmemb=MAXMEMB],[Specify maximum consoles per process @<:@16@:>@]),
|
AS_HELP_STRING([--with-maxmemb=MAXMEMB],[Specify maximum consoles per process @<:@16@:>@]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
AC_DEFINE_UNQUOTED(MAXMEMB, 16)
|
AC_DEFINE_UNQUOTED(MAXMEMB, 16)
|
||||||
@ -191,7 +194,7 @@ AC_ARG_WITH(maxmemb,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for connect() timeout)
|
AC_MSG_CHECKING(for connect() timeout)
|
||||||
AC_ARG_WITH(timeout,
|
AC_ARG_WITH(timeout,
|
||||||
AC_HELP_STRING([--with-timeout=TIMEOUT],[Specify connect() timeout in seconds @<:@10@:>@]),
|
AS_HELP_STRING([--with-timeout=TIMEOUT],[Specify connect() timeout in seconds @<:@10@:>@]),
|
||||||
[if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 &&
|
[if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 &&
|
||||||
test "$withval" -gt 0 -a "$withval" -lt 300; then
|
test "$withval" -gt 0 -a "$withval" -lt 300; then
|
||||||
AC_DEFINE_UNQUOTED(CONNECTTIMEOUT, $withval)
|
AC_DEFINE_UNQUOTED(CONNECTTIMEOUT, $withval)
|
||||||
@ -205,7 +208,7 @@ AC_ARG_WITH(timeout,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(whether to trust reverse DNS)
|
AC_MSG_CHECKING(whether to trust reverse DNS)
|
||||||
AC_ARG_WITH(trustrevdns,
|
AC_ARG_WITH(trustrevdns,
|
||||||
AC_HELP_STRING([--with-trustrevdns],[Trust reverse DNS information]),
|
AS_HELP_STRING([--with-trustrevdns],[Trust reverse DNS information]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes)
|
yes)
|
||||||
AC_DEFINE(TRUST_REVERSE_DNS)
|
AC_DEFINE(TRUST_REVERSE_DNS)
|
||||||
@ -218,7 +221,7 @@ AC_ARG_WITH(trustrevdns,
|
|||||||
|
|
||||||
AC_MSG_CHECKING(whether to display extended messages)
|
AC_MSG_CHECKING(whether to display extended messages)
|
||||||
AC_ARG_WITH(extmsgs,
|
AC_ARG_WITH(extmsgs,
|
||||||
AC_HELP_STRING([--with-extmsgs],[Produce extended messages]),
|
AS_HELP_STRING([--with-extmsgs],[Produce extended messages]),
|
||||||
[case "$withval" in
|
[case "$withval" in
|
||||||
yes)
|
yes)
|
||||||
AC_DEFINE(USE_EXTENDED_MESSAGES)
|
AC_DEFINE(USE_EXTENDED_MESSAGES)
|
||||||
@ -229,6 +232,32 @@ AC_ARG_WITH(extmsgs,
|
|||||||
;;
|
;;
|
||||||
esac],[AC_MSG_RESULT(no)])
|
esac],[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to use Unix domain sockets)
|
||||||
|
AC_ARG_WITH(uds,
|
||||||
|
AS_HELP_STRING([--with-uds@<:@=DIR@:>@ ],
|
||||||
|
[Use Unix domain sockets for client/server communication @<:@/tmp/conserver@:>@]),
|
||||||
|
[case "$withval" in
|
||||||
|
yes)
|
||||||
|
AC_DEFINE_UNQUOTED(UDSDIR, "/tmp/conserver")
|
||||||
|
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
||||||
|
AC_MSG_RESULT([/tmp/conserver])
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_DEFINE_UNQUOTED(UDSDIR, "$withval")
|
||||||
|
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
||||||
|
AC_MSG_RESULT('$withval')
|
||||||
|
if expr "$withval" : '/' >/dev/null 2>&1; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** WARNING *** you may have better success using a fully-qualified path"
|
||||||
|
echo "*** WARNING *** instead of '$withval'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac],[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
dnl ### Check for compiler et al. ###################################
|
dnl ### Check for compiler et al. ###################################
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
@ -315,7 +344,7 @@ AC_SUBST(CONSLIBS)
|
|||||||
AC_SUBST(CONSCPPFLAGS)
|
AC_SUBST(CONSCPPFLAGS)
|
||||||
AC_SUBST(CONSLDFLAGS)
|
AC_SUBST(CONSLDFLAGS)
|
||||||
AC_ARG_WITH(libwrap,
|
AC_ARG_WITH(libwrap,
|
||||||
AC_HELP_STRING([--with-libwrap@<:@=PATH@:>@],
|
AS_HELP_STRING([--with-libwrap@<:@=PATH@:>@],
|
||||||
[Compile in libwrap (tcp_wrappers) support]),
|
[Compile in libwrap (tcp_wrappers) support]),
|
||||||
[if test "$withval" != "no"; then
|
[if test "$withval" != "no"; then
|
||||||
if test "$withval" != "yes"; then
|
if test "$withval" != "yes"; then
|
||||||
@ -365,7 +394,7 @@ AC_ARG_WITH(libwrap,
|
|||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(openssl,
|
AC_ARG_WITH(openssl,
|
||||||
AC_HELP_STRING([--with-openssl@<:@=PATH@:>@],
|
AS_HELP_STRING([--with-openssl@<:@=PATH@:>@],
|
||||||
[Compile in OpenSSL support]),
|
[Compile in OpenSSL support]),
|
||||||
[if test "$withval" != "no"; then
|
[if test "$withval" != "no"; then
|
||||||
if test "$withval" != "yes"; then
|
if test "$withval" != "yes"; then
|
||||||
@ -403,7 +432,7 @@ AC_ARG_WITH(openssl,
|
|||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(dmalloc,
|
AC_ARG_WITH(dmalloc,
|
||||||
AC_HELP_STRING([--with-dmalloc@<:@=PATH@:>@],
|
AS_HELP_STRING([--with-dmalloc@<:@=PATH@:>@],
|
||||||
[Compile in dmalloc support]),
|
[Compile in dmalloc support]),
|
||||||
[if test "$withval" != "no"; then
|
[if test "$withval" != "no"; then
|
||||||
if test "$withval" != "yes"; then
|
if test "$withval" != "yes"; then
|
||||||
@ -478,7 +507,7 @@ dnl fi],[AC_MSG_RESULT(no)])
|
|||||||
|
|
||||||
AC_MSG_CHECKING(for PAM support)
|
AC_MSG_CHECKING(for PAM support)
|
||||||
AC_ARG_WITH(pam,
|
AC_ARG_WITH(pam,
|
||||||
AC_HELP_STRING([--with-pam],
|
AS_HELP_STRING([--with-pam],
|
||||||
[Enable PAM support]),
|
[Enable PAM support]),
|
||||||
[if test "$withval" = yes; then
|
[if test "$withval" = yes; then
|
||||||
oLIBS="$LIBS"
|
oLIBS="$LIBS"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" $Id: conserver.cf.man,v 1.58 2004/02/24 02:59:36 bryan Exp $
|
.\" $Id: conserver.cf.man,v 1.61 2004/03/26 13:03:01 bryan Exp $
|
||||||
.TH CONSERVER.CF 5 "2004/02/24" "conserver-8.1.2" "conserver"
|
.TH CONSERVER.CF 5 "2004/03/26" "conserver-8.1.4" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver.cf \- console configuration file for
|
conserver.cf \- console configuration file for
|
||||||
.BR conserver (8)
|
.BR conserver (8)
|
||||||
@ -123,7 +123,7 @@ fashion (top down), so order is important.
|
|||||||
.RS
|
.RS
|
||||||
.TP 15
|
.TP 15
|
||||||
.B admin
|
.B admin
|
||||||
.RI "[ [\fB!\fP]" username ,...
|
.RI "[ [\f3!\fP]" username ,...
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Define a list of users making up the admin list for the console server.
|
Define a list of users making up the admin list for the console server.
|
||||||
@ -264,7 +264,8 @@ all conserver hosts.
|
|||||||
.RS
|
.RS
|
||||||
.TP 15
|
.TP 15
|
||||||
.B defaultaccess
|
.B defaultaccess
|
||||||
.RB [ " rejected " | " trusted " | " allowed " ]
|
.RB [ " rejected " | " trusted "
|
||||||
|
.RB | " allowed " ]
|
||||||
.br
|
.br
|
||||||
Set the default access permission for all hosts not matched by
|
Set the default access permission for all hosts not matched by
|
||||||
an access list (see the
|
an access list (see the
|
||||||
@ -272,7 +273,9 @@ an access list (see the
|
|||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
.B daemonmode
|
.B daemonmode
|
||||||
.RB [ " yes " | " true " | " on " | " no " | " false " | " off " ]
|
.RB [ " yes " | " true "
|
||||||
|
.RB | " on " | " no "
|
||||||
|
.RB | " false " | " off " ]
|
||||||
.br
|
.br
|
||||||
Set whether or not to become a daemon when run (see the
|
Set whether or not to become a daemon when run (see the
|
||||||
.B \-d
|
.B \-d
|
||||||
@ -300,7 +303,9 @@ Set the port used by the master conserver process (see the
|
|||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
.B redirect
|
.B redirect
|
||||||
.RB [ " yes " | " true " | " on " | " no " | " false " | " off " ]
|
.RB [ " yes " | " true "
|
||||||
|
.RB | " on " | " no "
|
||||||
|
.RB | " false " | " off " ]
|
||||||
.br
|
.br
|
||||||
Turn redirection on or off (see the
|
Turn redirection on or off (see the
|
||||||
.B \-R
|
.B \-R
|
||||||
@ -309,7 +314,7 @@ command-line flag).
|
|||||||
.B reinitcheck
|
.B reinitcheck
|
||||||
.I number
|
.I number
|
||||||
.br
|
.br
|
||||||
Set the number of seconds used between reinitialization checks (see the
|
Set the number of minutes used between reinitialization checks (see the
|
||||||
.B \-O
|
.B \-O
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
@ -321,7 +326,9 @@ Set the base port number used by child processes (see the
|
|||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
.B setproctitle
|
.B setproctitle
|
||||||
.RB [ " yes " | " true " | " on " | " no " | " false " | " off " ]
|
.RB [ " yes " | " true "
|
||||||
|
.RB | " on " | " no "
|
||||||
|
.RB | " false " | " off " ]
|
||||||
.br
|
.br
|
||||||
Set whether or not the process title shows master/group functionality
|
Set whether or not the process title shows master/group functionality
|
||||||
as well as the port number the process is listening on and how many
|
as well as the port number the process is listening on and how many
|
||||||
@ -340,7 +347,9 @@ credentials file location (see the
|
|||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
.B sslrequired
|
.B sslrequired
|
||||||
.RB [ " yes " | " true " | " on " | " no " | " false " | " off " ]
|
.RB [ " yes " | " true "
|
||||||
|
.RB | " on " | " no "
|
||||||
|
.RB | " false " | " off " ]
|
||||||
.br
|
.br
|
||||||
Set whether or not encryption is required when talking to clients (see the
|
Set whether or not encryption is required when talking to clients (see the
|
||||||
.B \-E
|
.B \-E
|
||||||
@ -388,8 +397,11 @@ of their definition).
|
|||||||
.RS
|
.RS
|
||||||
.TP 15
|
.TP 15
|
||||||
.B baud
|
.B baud
|
||||||
.RB [ " 300 " | " 600 " | " 1800 " | " 2400 " | " 4800"
|
.RB [ " 300 " | " 600 "
|
||||||
.RB | " 9600 " | " 19200 " | " 38400 " | " 57600 " | " 115200 " ]
|
.RB | " 1800 " | " 2400 "
|
||||||
|
.RB | " 4800 " | " 9600 "
|
||||||
|
.RB | " 19200 " | " 38400 "
|
||||||
|
.RB | " 57600 " | " 115200 " ]
|
||||||
.br
|
.br
|
||||||
Assign the baud rate to the console.
|
Assign the baud rate to the console.
|
||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
@ -411,7 +423,7 @@ as the access to the console.
|
|||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
.TP
|
.TP
|
||||||
.B devicesubst
|
.B devicesubst
|
||||||
.RI [ c = t [ n ] f "[,...]"
|
[\f2c\fP=\f2t\fP[\f2n\fP]\f2f\fP[,...]
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Perform character substitutions on the
|
Perform character substitutions on the
|
||||||
@ -419,7 +431,7 @@ Perform character substitutions on the
|
|||||||
value.
|
value.
|
||||||
A series of replacements can be defined by specifying a
|
A series of replacements can be defined by specifying a
|
||||||
comma-separated list of
|
comma-separated list of
|
||||||
.IR c = t [ n ] f
|
\f2c\fP=\f2t\fP[\f2n\fP]\f2f\fP
|
||||||
sequences where
|
sequences where
|
||||||
.I c
|
.I c
|
||||||
is any printable character,
|
is any printable character,
|
||||||
@ -488,14 +500,14 @@ Assign the string
|
|||||||
.I command
|
.I command
|
||||||
as the command to access the console.
|
as the command to access the console.
|
||||||
Conserver will run the command by
|
Conserver will run the command by
|
||||||
invoking ``/bin/sh -ce "\fIcommand\fP"''.
|
invoking ``/bin/sh -ce "\f2command\fP"''.
|
||||||
If the null string (``""'') is used or no
|
If the null string (``""'') is used or no
|
||||||
.B exec
|
.B exec
|
||||||
keyword is specified, conserver will use the command ``/bin/sh -i''.
|
keyword is specified, conserver will use the command ``/bin/sh -i''.
|
||||||
Only consoles of type ``exec'' will use this value.
|
Only consoles of type ``exec'' will use this value.
|
||||||
.TP
|
.TP
|
||||||
.B execsubst
|
.B execsubst
|
||||||
.RI [ c = t [ n ] f "[,...]"
|
[\f2c\fP=\f2t\fP[\f2n\fP]\f2f\fP[,...]
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Perform character substitutions on the
|
Perform character substitutions on the
|
||||||
@ -543,7 +555,7 @@ use the default delay time.
|
|||||||
The default string is ``\en''.
|
The default string is ``\en''.
|
||||||
.TP
|
.TP
|
||||||
.B idletimeout
|
.B idletimeout
|
||||||
.BR \fInumber\fP [ s | m | h ]
|
\f2number\fP[\f3s\fP|\f3m\fP|\f3h\fP]
|
||||||
.br
|
.br
|
||||||
Set the idle timeout of the console to
|
Set the idle timeout of the console to
|
||||||
.I number
|
.I number
|
||||||
@ -577,7 +589,7 @@ If the null string (``""'') is used, the command is unset and
|
|||||||
nothing is invoked.
|
nothing is invoked.
|
||||||
.TP
|
.TP
|
||||||
.B initsubst
|
.B initsubst
|
||||||
.RI [ c = t [ n ] f "[,...]"
|
[\f2c\fP=\f2t\fP[\f2n\fP]\f2f\fP[,...]
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Perform character substitutions on the
|
Perform character substitutions on the
|
||||||
@ -602,7 +614,7 @@ If the null string (``""'') is used, the logfile name is unset and
|
|||||||
no logging will occur.
|
no logging will occur.
|
||||||
.TP
|
.TP
|
||||||
.B logfilemax
|
.B logfilemax
|
||||||
.BR \fInumber\fP [ k | m ]
|
\f2number\fP[\f3k\fP|\f3m\fP]
|
||||||
.br
|
.br
|
||||||
Enable automatic rotation of
|
Enable automatic rotation of
|
||||||
.B logfile
|
.B logfile
|
||||||
@ -772,7 +784,9 @@ Default is
|
|||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B parity
|
.B parity
|
||||||
.RB [ " even " | " mark " | " none " | " odd " | " space " ]
|
.RB [ " even " | " mark "
|
||||||
|
.RB | " none " | " odd "
|
||||||
|
.RB | " space " ]
|
||||||
.br
|
.br
|
||||||
Set the parity option for the console.
|
Set the parity option for the console.
|
||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
@ -858,7 +872,7 @@ console option still applies when data is read by the server, and if enabled,
|
|||||||
can impact the encapsulation process.
|
can impact the encapsulation process.
|
||||||
.TP
|
.TP
|
||||||
.B ro
|
.B ro
|
||||||
.RI "[ [\fB!\fP]" username ,...
|
.RI "[ [\f3!\fP]" username ,...
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Define a list of users making up the read-only access list
|
Define a list of users making up the read-only access list
|
||||||
@ -874,7 +888,7 @@ If the null string (``""'') is used, any
|
|||||||
users previously defined for the console's read-only list are removed.
|
users previously defined for the console's read-only list are removed.
|
||||||
.TP
|
.TP
|
||||||
.B rw
|
.B rw
|
||||||
.RI "[ [\fB!\fP]" username ,...
|
.RI "[ [\f3!\fP]" username ,...
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Define a list of users making up the read-write access list
|
Define a list of users making up the read-write access list
|
||||||
@ -891,7 +905,7 @@ users previously defined for the console's read-write list are removed.
|
|||||||
.TP
|
.TP
|
||||||
.B timestamp
|
.B timestamp
|
||||||
[
|
[
|
||||||
.RB [ \fInumber\fP [ m | h | d | l ]][ a ][ b ]
|
[\f2number\fP[\f3m\fP|\f3h\fP|\f3d\fP|\f3l\fP]][\f3a\fP][\f3b\fP]
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Specifies the time between timestamps applied to the console
|
Specifies the time between timestamps applied to the console
|
||||||
@ -922,7 +936,8 @@ A
|
|||||||
can be specified to add logging of break sequences sent to the console.
|
can be specified to add logging of break sequences sent to the console.
|
||||||
.TP
|
.TP
|
||||||
.B type
|
.B type
|
||||||
.RB [ " device " | " exec " | " host " ]
|
.RB [ " device " | " exec "
|
||||||
|
.RB | " host " ]
|
||||||
.br
|
.br
|
||||||
Set the type of console.
|
Set the type of console.
|
||||||
The type
|
The type
|
||||||
@ -951,7 +966,7 @@ Define a user group identified as
|
|||||||
.RS
|
.RS
|
||||||
.TP 15
|
.TP 15
|
||||||
.B users
|
.B users
|
||||||
.RI "[ [\fB!\fP]" username ,...
|
.RI "[ [\f3!\fP]" username ,...
|
||||||
| "" ]
|
| "" ]
|
||||||
.br
|
.br
|
||||||
Define a list of users making up the group
|
Define a list of users making up the group
|
||||||
|
@ -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.2" "conserver"
|
.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.1.4" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver.passwd \- user access information for
|
conserver.passwd \- user access information for
|
||||||
.BR conserver (8)
|
.BR conserver (8)
|
||||||
|
@ -181,11 +181,11 @@
|
|||||||
|
|
||||||
<H3>Downloading</H3>
|
<H3>Downloading</H3>
|
||||||
|
|
||||||
<P>The current version, released on Mar 11, 2004, is <A
|
<P>The current version, released on Apr 13, 2004, is <A
|
||||||
href="8.1.2.tar.gz">8.1.2.tar.gz</A>. You can get it via
|
href="8.1.4.tar.gz">8.1.4.tar.gz</A>. You can get it via
|
||||||
<A href=
|
<A href=
|
||||||
"ftp://ftp.conserver.com/conserver/8.1.2.tar.gz">FTP</A>
|
"ftp://ftp.conserver.com/conserver/8.1.4.tar.gz">FTP</A>
|
||||||
or <A href="8.1.2.tar.gz">HTTP</A>. See the <A href=
|
or <A href="8.1.4.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>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: client.c,v 5.80 2004/03/10 02:55:45 bryan Exp $
|
* $Id: client.c,v 5.83 2004/04/13 18:12:00 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -315,8 +315,7 @@ Replay(pCE, fdOut, iBack)
|
|||||||
if ((char *)0 != s) {
|
if ((char *)0 != s) {
|
||||||
*s = '\000';
|
*s = '\000';
|
||||||
}
|
}
|
||||||
FileWrite(fdOut, FLAGTRUE, lines[i].line->string,
|
FileWrite(fdOut, FLAGTRUE, lines[i].line->string, -1);
|
||||||
lines[i].line->used - 1);
|
|
||||||
FileWrite(fdOut, FLAGTRUE, " .. ", 4);
|
FileWrite(fdOut, FLAGTRUE, " .. ", 4);
|
||||||
|
|
||||||
/* build the end string by removing the leading "[-- MARK -- "
|
/* build the end string by removing the leading "[-- MARK -- "
|
||||||
@ -379,7 +378,7 @@ typedef struct HLnode {
|
|||||||
|
|
||||||
static HELP aHLTable[] = {
|
static HELP aHLTable[] = {
|
||||||
{WHEN_ALWAYS, ". disconnect"},
|
{WHEN_ALWAYS, ". disconnect"},
|
||||||
{WHEN_ALWAYS, "; switch to another console"},
|
{WHEN_ALWAYS, "; move to another console"},
|
||||||
{WHEN_ALWAYS, "a attach read/write"},
|
{WHEN_ALWAYS, "a attach read/write"},
|
||||||
{WHEN_ALWAYS, "b send broadcast message"},
|
{WHEN_ALWAYS, "b send broadcast message"},
|
||||||
{WHEN_ATTACH, "c toggle flow control"},
|
{WHEN_ATTACH, "c toggle flow control"},
|
||||||
@ -488,15 +487,31 @@ ClientAccessOk(pCL)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
char *peername = (char *)0;
|
char *peername = (char *)0;
|
||||||
|
int retval = 1;
|
||||||
|
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct in_addr addr;
|
||||||
|
|
||||||
|
# if HAVE_INET_ATON
|
||||||
|
inet_aton("127.0.0.1", &addr);
|
||||||
|
# else
|
||||||
|
addr.s_addr = inet_addr("127.0.0.1");
|
||||||
|
# endif
|
||||||
|
pCL->caccess = AccType(&addr, &peername);
|
||||||
|
if (pCL->caccess == 'r') {
|
||||||
|
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
|
||||||
|
-1);
|
||||||
|
retval = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
int cfd;
|
int cfd;
|
||||||
struct sockaddr_in in_port;
|
struct sockaddr_in in_port;
|
||||||
int retval = 1;
|
|
||||||
int getpeer = -1;
|
int getpeer = -1;
|
||||||
|
|
||||||
cfd = FileFDNum(pCL->fd);
|
cfd = FileFDNum(pCL->fd);
|
||||||
pCL->caccess = 'r';
|
pCL->caccess = 'r';
|
||||||
#if defined(USE_LIBWRAP)
|
# if defined(USE_LIBWRAP)
|
||||||
{
|
{
|
||||||
struct request_info request;
|
struct request_info request;
|
||||||
request_init(&request, RQ_DAEMON, progname, RQ_FILE, cfd, 0);
|
request_init(&request, RQ_DAEMON, progname, RQ_FILE, cfd, 0);
|
||||||
@ -508,7 +523,7 @@ ClientAccessOk(pCL)
|
|||||||
goto setpeer;
|
goto setpeer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
so = sizeof(in_port);
|
so = sizeof(in_port);
|
||||||
if (-1 ==
|
if (-1 ==
|
||||||
@ -523,16 +538,22 @@ ClientAccessOk(pCL)
|
|||||||
-1);
|
-1);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
setpeer:
|
setpeer:
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pCL->peername != (STRING *)0) {
|
if (pCL->peername != (STRING *)0) {
|
||||||
BuildString((char *)0, pCL->peername);
|
BuildString((char *)0, pCL->peername);
|
||||||
if (peername != (char *)0)
|
if (peername != (char *)0)
|
||||||
BuildString(peername, pCL->peername);
|
BuildString(peername, pCL->peername);
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
else
|
||||||
|
BuildString("127.0.0.1", pCL->peername);
|
||||||
|
#else
|
||||||
else if (getpeer != -1)
|
else if (getpeer != -1)
|
||||||
BuildString(inet_ntoa(in_port.sin_addr), pCL->peername);
|
BuildString(inet_ntoa(in_port.sin_addr), pCL->peername);
|
||||||
else
|
else
|
||||||
BuildString("<unknown>", pCL->peername);
|
BuildString("<unknown>", pCL->peername);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (peername != (char *)0)
|
if (peername != (char *)0)
|
||||||
free(peername);
|
free(peername);
|
||||||
|
@ -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.42 2004/03/11 17:52:08 bryan Exp $
|
.\" $Id: conserver.man,v 1.46 2004/04/13 18:19:26 bryan Exp $
|
||||||
.TH CONSERVER 8 "2004/03/11" "conserver-8.1.2" "conserver"
|
.TH CONSERVER 8 "2004/04/13" "conserver-8.1.4" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver \- console server daemon
|
conserver \- console server daemon
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -11,7 +11,7 @@ conserver \- console server daemon
|
|||||||
.RB [ \-m
|
.RB [ \-m
|
||||||
.IR max ]
|
.IR max ]
|
||||||
.RB [ \-M
|
.RB [ \-M
|
||||||
.IR addr ]
|
.IR master ]
|
||||||
.RB [ \-p
|
.RB [ \-p
|
||||||
.IR port ]
|
.IR port ]
|
||||||
.RB [ \-b
|
.RB [ \-b
|
||||||
@ -50,7 +50,7 @@ knowledge of the distribution of consoles among servers.)
|
|||||||
.B Conserver
|
.B Conserver
|
||||||
forks a child for each group of consoles it must manage
|
forks a child for each group of consoles it must manage
|
||||||
and assigns each process a port number to listen on.
|
and assigns each process a port number to listen on.
|
||||||
The maximum number of consoles managed by each child process is set using
|
The maximum number of consoles managed by each child process is set using the
|
||||||
.B \-m
|
.B \-m
|
||||||
option.
|
option.
|
||||||
The
|
The
|
||||||
@ -76,14 +76,31 @@ the
|
|||||||
.BR conserver.cf (5)
|
.BR conserver.cf (5)
|
||||||
access list.
|
access list.
|
||||||
.PP
|
.PP
|
||||||
|
When Unix domain sockets are used between the client and
|
||||||
|
server (enabled using
|
||||||
|
.BR --with-uds ),
|
||||||
|
authentication checks are done on the hardcoded address ``127.0.0.1''.
|
||||||
|
Automatic client redirection is also disabled (as if the
|
||||||
|
.B \-R
|
||||||
|
option was used) since the client cannot communicate with remote servers.
|
||||||
|
The directory used to hold the sockets is checked to make sure it's empty
|
||||||
|
when the server starts.
|
||||||
|
The server will
|
||||||
|
.B not
|
||||||
|
remove any files in the directory itself, just in case the directory is
|
||||||
|
accidentally specified as ``/etc'' or some other critical location.
|
||||||
|
The server will do it's best to remove all the sockets when it shuts down,
|
||||||
|
but it could stop ungracefully (crash, ``kill -9'', etc)
|
||||||
|
and leave files behind.
|
||||||
|
It's would then be up to the admin (or a creative startup script) to clean
|
||||||
|
up the directory before the server will start again.
|
||||||
|
.PP
|
||||||
.B Conserver
|
.B Conserver
|
||||||
completely controls any connection to a console.
|
completely controls any connection to a console.
|
||||||
All escape sequences given by the user to
|
All escape sequences given by the user to
|
||||||
.B console
|
.B console
|
||||||
are passed to the server without interpretation.
|
are passed to the server without interpretation.
|
||||||
The server recognizes and processes all escape sequences,
|
The server recognizes and processes all escape sequences.
|
||||||
The suspend sequence is recognized by the server and sent back to the
|
|
||||||
client as a TCP out-of-band command, which the client processes.
|
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B conserver
|
.B conserver
|
||||||
@ -217,7 +234,7 @@ option.
|
|||||||
.B \-d
|
.B \-d
|
||||||
Become a daemon.
|
Become a daemon.
|
||||||
Disconnects from the controlling terminal and sends
|
Disconnects from the controlling terminal and sends
|
||||||
all output to the logfile (see
|
all output (including any debug output) to the logfile (see
|
||||||
.BR \-L ).
|
.BR \-L ).
|
||||||
.TP
|
.TP
|
||||||
.B \-D
|
.B \-D
|
||||||
@ -271,11 +288,20 @@ may be changed at compile time using the
|
|||||||
.B --with-maxmemb
|
.B --with-maxmemb
|
||||||
option.
|
option.
|
||||||
.TP
|
.TP
|
||||||
.BI \-M addr
|
.BI \-M master
|
||||||
Set the address to listen on.
|
Normally, this allows conserver to bind to a
|
||||||
This allows conserver to bind to a
|
|
||||||
particular IP address (like `127.0.0.1') instead of all interfaces.
|
particular IP address (like `127.0.0.1') instead of all interfaces.
|
||||||
The default is to bind to all addresses.
|
The default is to bind to all addresses.
|
||||||
|
However, if
|
||||||
|
.B --with-uds
|
||||||
|
was used to enable Unix domain sockets for client/server communication,
|
||||||
|
this points conserver to the directory where it should store the sockets.
|
||||||
|
The default
|
||||||
|
.IR master
|
||||||
|
directory, ``/tmp/conserver'',
|
||||||
|
may be changed at compile time using the
|
||||||
|
.B --with-uds
|
||||||
|
option.
|
||||||
.TP
|
.TP
|
||||||
.B \-n
|
.B \-n
|
||||||
Obsolete (now a no-op); see
|
Obsolete (now a no-op); see
|
||||||
@ -301,6 +327,9 @@ The default
|
|||||||
may be changed at compile time using the
|
may be changed at compile time using the
|
||||||
.B --with-port
|
.B --with-port
|
||||||
option.
|
option.
|
||||||
|
If the
|
||||||
|
.B --with-uds
|
||||||
|
option was used, this option is ignored.
|
||||||
.TP
|
.TP
|
||||||
.BI \-P passwd
|
.BI \-P passwd
|
||||||
Read the table of authorized user data from the file
|
Read the table of authorized user data from the file
|
||||||
@ -334,7 +363,7 @@ Since this is
|
|||||||
.I highly
|
.I highly
|
||||||
environment-specific, conserver cannot do the check internally.
|
environment-specific, conserver cannot do the check internally.
|
||||||
.RS
|
.RS
|
||||||
.TP 8
|
.TP 9
|
||||||
.I name
|
.I name
|
||||||
The name of the console.
|
The name of the console.
|
||||||
.TP
|
.TP
|
||||||
@ -443,6 +472,9 @@ the master conserver process ID
|
|||||||
.TP
|
.TP
|
||||||
.B /var/log/conserver
|
.B /var/log/conserver
|
||||||
log of errors and informational messages
|
log of errors and informational messages
|
||||||
|
.TP
|
||||||
|
.B /tmp/conserver
|
||||||
|
directory to hold Unix domain sockets (if enabled)
|
||||||
.PD
|
.PD
|
||||||
.PP
|
.PP
|
||||||
Additionally, output from individual consoles may be logged
|
Additionally, output from individual consoles may be logged
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: cutil.c,v 1.115 2004/03/11 16:23:59 bryan Exp $
|
* $Id: cutil.c,v 1.116 2004/03/19 05:23:21 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -839,6 +839,9 @@ FileUnopen(cfp)
|
|||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
if (cfp == (CONSFILE *)0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (cfp->ftype) {
|
switch (cfp->ftype) {
|
||||||
case simpleFile:
|
case simpleFile:
|
||||||
retval = cfp->fd;
|
retval = cfp->fd;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: group.c,v 5.289 2004/03/10 02:55:45 bryan Exp $
|
* $Id: group.c,v 5.293 2004/04/13 18:12:00 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -1265,7 +1265,14 @@ DeUtmp(pGE, sfd)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
CONSENT *pCE;
|
CONSENT *pCE;
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct sockaddr_un lstn_port;
|
||||||
|
socklen_t so;
|
||||||
|
|
||||||
|
so = sizeof(lstn_port);
|
||||||
|
if (getsockname(sfd, (struct sockaddr *)&lstn_port, &so) != -1)
|
||||||
|
unlink(lstn_port.sun_path);
|
||||||
|
#endif
|
||||||
/* shut down the socket */
|
/* shut down the socket */
|
||||||
close(sfd);
|
close(sfd);
|
||||||
|
|
||||||
@ -3264,8 +3271,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
"%c%c", OB_IAC, OB_GOTO);
|
"%c%c", OB_IAC, OB_GOTO);
|
||||||
FileSetQuoteIAC(pCLServing->fd,
|
FileSetQuoteIAC(pCLServing->fd,
|
||||||
FLAGTRUE);
|
FLAGTRUE);
|
||||||
DisconnectClient(pGE, pCLServing,
|
goto bottomSuspend;
|
||||||
(char *)0, FLAGFALSE);
|
|
||||||
} else {
|
} else {
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"connected]\r\n", -1);
|
"connected]\r\n", -1);
|
||||||
@ -3283,9 +3289,9 @@ DoClientRead(pGE, pCLServing)
|
|||||||
"no drop line]\r\n", -1);
|
"no drop line]\r\n", -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#define DEPRECIATED FileWrite(pCLServing->fd, FLAGFALSE, "<use of DEPRECIATED (and undocumented) key> ", -1)
|
#define DEPRECATED FileWrite(pCLServing->fd, FLAGFALSE, "<use of DEPRECATED (and undocumented) key> ", -1)
|
||||||
case 'B':
|
case 'B':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'b': /* broadcast message */
|
case 'b': /* broadcast message */
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"Enter message: ", -1);
|
"Enter message: ", -1);
|
||||||
@ -3293,28 +3299,28 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'A':
|
case 'A':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'a': /* attach */
|
case 'a': /* attach */
|
||||||
CommandAttach(pGE, pCLServing, pCEServing,
|
CommandAttach(pGE, pCLServing, pCEServing,
|
||||||
tyme);
|
tyme);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'c':
|
case 'c':
|
||||||
CommandChangeFlow(pGE, pCLServing,
|
CommandChangeFlow(pGE, pCLServing,
|
||||||
pCEServing, tyme);
|
pCEServing, tyme);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'D':
|
case 'D':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'd': /* down a console */
|
case 'd': /* down a console */
|
||||||
CommandDown(pGE, pCLServing, pCEServing,
|
CommandDown(pGE, pCLServing, pCEServing,
|
||||||
tyme);
|
tyme);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'e': /* redefine escape keys */
|
case 'e': /* redefine escape keys */
|
||||||
pCLServing->iState = S_CATTN;
|
pCLServing->iState = S_CATTN;
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
@ -3322,14 +3328,14 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'f': /* force attach */
|
case 'f': /* force attach */
|
||||||
CommandForce(pGE, pCLServing, pCEServing,
|
CommandForce(pGE, pCLServing, pCEServing,
|
||||||
tyme);
|
tyme);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'g': /* group info */
|
case 'g': /* group info */
|
||||||
FilePrint(pCLServing->fd, FLAGFALSE,
|
FilePrint(pCLServing->fd, FLAGFALSE,
|
||||||
"group %s]\r\n",
|
"group %s]\r\n",
|
||||||
@ -3340,14 +3346,14 @@ DoClientRead(pGE, pCLServing)
|
|||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
case 'P': /* DEC vt100 pf1 */
|
case 'P': /* DEC vt100 pf1 */
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'h': /* help */
|
case 'h': /* help */
|
||||||
case '?':
|
case '?':
|
||||||
HelpUser(pCLServing);
|
HelpUser(pCLServing);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'I':
|
case 'I':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'i':
|
case 'i':
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"info]\r\n", -1);
|
"info]\r\n", -1);
|
||||||
@ -3383,7 +3389,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'O':
|
case 'O':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'o': /* close and re-open line */
|
case 'o': /* close and re-open line */
|
||||||
CommandOpen(pGE, pCLServing, pCEServing,
|
CommandOpen(pGE, pCLServing, pCEServing,
|
||||||
tyme);
|
tyme);
|
||||||
@ -3396,7 +3402,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'R': /* DEC vt100 pf3 */
|
case 'R': /* DEC vt100 pf3 */
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'r': /* replay 20 lines */
|
case 'r': /* replay 20 lines */
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"replay]\r\n", -1);
|
"replay]\r\n", -1);
|
||||||
@ -3410,7 +3416,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S': /* DEC vt100 pf4 */
|
case 'S': /* DEC vt100 pf4 */
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 's': /* spy mode */
|
case 's': /* spy mode */
|
||||||
pCLServing->fwantwr = 0;
|
pCLServing->fwantwr = 0;
|
||||||
if (!pCLServing->fwr) {
|
if (!pCLServing->fwr) {
|
||||||
@ -3428,7 +3434,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'U':
|
case 'U':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'u': /* hosts on server this */
|
case 'u': /* hosts on server this */
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"hosts]\r\n", -1);
|
"hosts]\r\n", -1);
|
||||||
@ -3437,7 +3443,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'v': /* version */
|
case 'v': /* version */
|
||||||
FilePrint(pCLServing->fd, FLAGFALSE,
|
FilePrint(pCLServing->fd, FLAGFALSE,
|
||||||
"version `%s']\r\n",
|
"version `%s']\r\n",
|
||||||
@ -3445,7 +3451,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'w': /* who */
|
case 'w': /* who */
|
||||||
FilePrint(pCLServing->fd, FLAGFALSE,
|
FilePrint(pCLServing->fd, FLAGFALSE,
|
||||||
"who %s]\r\n",
|
"who %s]\r\n",
|
||||||
@ -3455,7 +3461,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'X':
|
case 'X':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'x':
|
case 'x':
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"examine]\r\n", -1);
|
"examine]\r\n", -1);
|
||||||
@ -3479,13 +3485,14 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Z':
|
case 'Z':
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case 'z': /* suspend the client */
|
case 'z': /* suspend the client */
|
||||||
case '\032':
|
case '\032':
|
||||||
FileSetQuoteIAC(pCLServing->fd, FLAGFALSE);
|
FileSetQuoteIAC(pCLServing->fd, FLAGFALSE);
|
||||||
FilePrint(pCLServing->fd, FLAGFALSE,
|
FilePrint(pCLServing->fd, FLAGFALSE,
|
||||||
"%c%c", OB_IAC, OB_SUSP);
|
"%c%c", OB_IAC, OB_SUSP);
|
||||||
FileSetQuoteIAC(pCLServing->fd, FLAGTRUE);
|
FileSetQuoteIAC(pCLServing->fd, FLAGTRUE);
|
||||||
|
bottomSuspend:
|
||||||
pCLServing->fcon = 0;
|
pCLServing->fcon = 0;
|
||||||
pCLServing->iState = S_SUSP;
|
pCLServing->iState = S_SUSP;
|
||||||
if (pCEServing->pCLwr == pCLServing) {
|
if (pCEServing->pCLwr == pCLServing) {
|
||||||
@ -3547,7 +3554,7 @@ DoClientRead(pGE, pCLServing)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Q': /* DEC vt100 PF2 */
|
case 'Q': /* DEC vt100 PF2 */
|
||||||
DEPRECIATED;
|
DEPRECATED;
|
||||||
case '.': /* disconnect */
|
case '.': /* disconnect */
|
||||||
case '\004':
|
case '\004':
|
||||||
case '\003':
|
case '\003':
|
||||||
@ -4469,18 +4476,53 @@ Spawn(pGE)
|
|||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int sfd;
|
int sfd;
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct sockaddr_un lstn_port;
|
||||||
|
static STRING *portPath = (STRING *)0;
|
||||||
|
#else
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
struct sockaddr_in lstn_port;
|
|
||||||
int true = 1;
|
int true = 1;
|
||||||
unsigned short portInc = 0;
|
unsigned short portInc = 0;
|
||||||
|
struct sockaddr_in lstn_port;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get a socket for listening
|
/* get a socket for listening */
|
||||||
*/
|
|
||||||
#if HAVE_MEMSET
|
#if HAVE_MEMSET
|
||||||
memset((void *)&lstn_port, 0, sizeof(lstn_port));
|
memset((void *)&lstn_port, 0, sizeof(lstn_port));
|
||||||
#else
|
#else
|
||||||
bzero((char *)&lstn_port, sizeof(lstn_port));
|
bzero((char *)&lstn_port, sizeof(lstn_port));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
lstn_port.sun_family = AF_UNIX;
|
||||||
|
|
||||||
|
if (portPath == (STRING *)0)
|
||||||
|
portPath = AllocString();
|
||||||
|
BuildStringPrint(portPath, "%s/%u", interface, pGE->id);
|
||||||
|
if (portPath->used > sizeof(lstn_port.sun_path)) {
|
||||||
|
Error("Spawn(): path to socket too long: %s", portPath->string);
|
||||||
|
Bye(EX_OSERR);
|
||||||
|
}
|
||||||
|
strcpy(lstn_port.sun_path, portPath->string);
|
||||||
|
|
||||||
|
/* create a socket to listen on
|
||||||
|
* (prepared by master so he can see the port number of the kid)
|
||||||
|
*/
|
||||||
|
if ((sfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||||
|
Error("Spawn(): socket(): %s", strerror(errno));
|
||||||
|
Bye(EX_OSERR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SetFlags(sfd, O_NONBLOCK, 0))
|
||||||
|
Bye(EX_OSERR);
|
||||||
|
|
||||||
|
if (bind(sfd, (struct sockaddr *)&lstn_port, sizeof(lstn_port)) < 0) {
|
||||||
|
Error("Spawn(): bind(%s): %s", lstn_port.sun_path,
|
||||||
|
strerror(errno));
|
||||||
|
Bye(EX_OSERR);
|
||||||
|
}
|
||||||
|
pGE->port = pGE->id;
|
||||||
|
#else
|
||||||
lstn_port.sin_family = AF_INET;
|
lstn_port.sin_family = AF_INET;
|
||||||
lstn_port.sin_addr.s_addr = bindAddr;
|
lstn_port.sin_addr.s_addr = bindAddr;
|
||||||
lstn_port.sin_port = htons(bindBasePort);
|
lstn_port.sin_port = htons(bindBasePort);
|
||||||
@ -4492,24 +4534,24 @@ Spawn(pGE)
|
|||||||
Error("Spawn(): socket(): %s", strerror(errno));
|
Error("Spawn(): socket(): %s", strerror(errno));
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
#if HAVE_SETSOCKOPT
|
# if HAVE_SETSOCKOPT
|
||||||
if (setsockopt
|
if (setsockopt
|
||||||
(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true)) < 0) {
|
(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true)) < 0) {
|
||||||
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
|
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (!SetFlags(sfd, O_NONBLOCK, 0))
|
if (!SetFlags(sfd, O_NONBLOCK, 0))
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
|
|
||||||
while (bind(sfd, (struct sockaddr *)&lstn_port, sizeof(lstn_port)) < 0) {
|
while (bind(sfd, (struct sockaddr *)&lstn_port, sizeof(lstn_port)) < 0) {
|
||||||
if (bindBasePort && (
|
if (bindBasePort && (
|
||||||
#if defined(EADDRINUSE)
|
# if defined(EADDRINUSE)
|
||||||
(errno == EADDRINUSE) ||
|
(errno == EADDRINUSE) ||
|
||||||
#endif
|
# endif
|
||||||
(errno == EACCES)) && portInc++) {
|
(errno == EACCES)) && ++portInc) {
|
||||||
lstn_port.sin_port = htons(bindBasePort + portInc);
|
lstn_port.sin_port = htons(bindBasePort + portInc);
|
||||||
} else {
|
} else {
|
||||||
Error("Spawn(): bind(%hu): %s", ntohs(lstn_port.sin_port),
|
Error("Spawn(): bind(%hu): %s", ntohs(lstn_port.sin_port),
|
||||||
@ -4524,6 +4566,7 @@ Spawn(pGE)
|
|||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
pGE->port = ntohs(lstn_port.sin_port);
|
pGE->port = ntohs(lstn_port.sin_port);
|
||||||
|
#endif
|
||||||
|
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@ -4587,12 +4630,20 @@ Spawn(pGE)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (listen(sfd, SOMAXCONN) < 0) {
|
if (listen(sfd, SOMAXCONN) < 0) {
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
Error("Spawn(): listen(%s): %s", lstn_port.sun_path,
|
||||||
|
strerror(errno));
|
||||||
|
#else
|
||||||
Error("Spawn(): listen(%hu): %s", pGE->port, strerror(errno));
|
Error("Spawn(): listen(%hu): %s", pGE->port, strerror(errno));
|
||||||
|
#endif
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
Kiddie(pGE, sfd);
|
Kiddie(pGE, sfd);
|
||||||
|
|
||||||
/* should never get here...but on errors we could */
|
/* should never get here...but on errors we could */
|
||||||
close(sfd);
|
close(sfd);
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
unlink(lstn_port.sun_path);
|
||||||
|
#endif
|
||||||
Bye(EX_SOFTWARE);
|
Bye(EX_SOFTWARE);
|
||||||
}
|
}
|
||||||
|
142
conserver/main.c
142
conserver/main.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: main.c,v 5.178 2004/03/11 16:23:59 bryan Exp $
|
* $Id: main.c,v 5.179 2004/04/13 18:12:00 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -41,6 +41,7 @@
|
|||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
#include <dirent.h>
|
||||||
#if HAVE_SYS_SOCKIO_H
|
#if HAVE_SYS_SOCKIO_H
|
||||||
# include <sys/sockio.h>
|
# include <sys/sockio.h>
|
||||||
#endif
|
#endif
|
||||||
@ -523,7 +524,7 @@ Usage(wantfull)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
static char u_terse[] =
|
static char u_terse[] =
|
||||||
"[-7dDEFhinoRSuvV] [-a type] [-m max] [-M addr] [-p port] [-b port] [-c cred] [-C config] [-P passwd] [-L logfile] [-O min] [-U logfile]";
|
"[-7dDEFhinoRSuvV] [-a type] [-m max] [-M master] [-p port] [-b port] [-c cred] [-C config] [-P passwd] [-L logfile] [-O min] [-U logfile]";
|
||||||
static char *full[] = {
|
static char *full[] = {
|
||||||
"7 strip the high bit off all console data",
|
"7 strip the high bit off all console data",
|
||||||
"a type set the default access type",
|
"a type set the default access type",
|
||||||
@ -546,11 +547,19 @@ Usage(wantfull)
|
|||||||
"i initialize console connections on demand",
|
"i initialize console connections on demand",
|
||||||
"L logfile give a new logfile path to the server process",
|
"L logfile give a new logfile path to the server process",
|
||||||
"m max maximum consoles managed per process",
|
"m max maximum consoles managed per process",
|
||||||
"M addr address to listen on (all addresses by default)",
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
"M master directory that holds the Unix domain sockets",
|
||||||
|
#else
|
||||||
|
"M master address to listen on (all addresses by default)",
|
||||||
|
#endif
|
||||||
"n obsolete - see -u",
|
"n obsolete - see -u",
|
||||||
"o reopen downed console on client connect",
|
"o reopen downed console on client connect",
|
||||||
"O min reopen all downed consoles every <min> minutes",
|
"O min reopen all downed consoles every <min> minutes",
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
"p port ignored - Unix domain sockets compiled into code",
|
||||||
|
#else
|
||||||
"p port port to listen on",
|
"p port port to listen on",
|
||||||
|
#endif
|
||||||
"P passwd give a new passwd file to the server process",
|
"P passwd give a new passwd file to the server process",
|
||||||
"R disable automatic client redirection",
|
"R disable automatic client redirection",
|
||||||
"S syntax check of configuration file",
|
"S syntax check of configuration file",
|
||||||
@ -616,9 +625,13 @@ Version()
|
|||||||
Msg("default pidfile is `%s'", PIDFILE);
|
Msg("default pidfile is `%s'", PIDFILE);
|
||||||
Msg("default limit is %d member%s per group", MAXMEMB,
|
Msg("default limit is %d member%s per group", MAXMEMB,
|
||||||
MAXMEMB == 1 ? "" : "s");
|
MAXMEMB == 1 ? "" : "s");
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
Msg("default socket directory `%s'", UDSDIR);
|
||||||
|
#else
|
||||||
Msg("default primary port referenced as `%s'", defConfig.primaryport);
|
Msg("default primary port referenced as `%s'", defConfig.primaryport);
|
||||||
Msg("default secondary base port referenced as `%s'",
|
Msg("default secondary base port referenced as `%s'",
|
||||||
defConfig.secondaryport);
|
defConfig.secondaryport);
|
||||||
|
#endif
|
||||||
|
|
||||||
BuildString((char *)0, acA1);
|
BuildString((char *)0, acA1);
|
||||||
if (optionlist[0] == (char *)0)
|
if (optionlist[0] == (char *)0)
|
||||||
@ -1153,6 +1166,94 @@ ProbeInterfaces()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This makes sure a directory exists and tries to create it if it
|
||||||
|
* doesn't. returns 0 for success, -1 for error
|
||||||
|
*/
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
int
|
||||||
|
#if PROTOTYPES
|
||||||
|
VerifyEmptyDirectory(char *d)
|
||||||
|
#else
|
||||||
|
VerifyEmptyDirectory(d)
|
||||||
|
char *d;
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
struct stat dstat;
|
||||||
|
DIR *dir;
|
||||||
|
struct dirent *de;
|
||||||
|
STRING *path = (STRING *)0;
|
||||||
|
int retval = 0;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
if (stat(d, &dstat) == -1) {
|
||||||
|
if (errno == ENOENT) {
|
||||||
|
if (mkdir(d, 0755) == -1) {
|
||||||
|
Error("mkdir(%s): %s", d, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
CONDDEBUG((1, "VerifyEmptyDirectory: created `%s'", d));
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
Error("stat(%s): %s", d, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (S_ISDIR(dstat.st_mode))
|
||||||
|
break;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* now make sure it's empty...erase anything you see, etc */
|
||||||
|
if ((dir = opendir(d)) == (DIR *) 0) {
|
||||||
|
Error("opendir(%s): %s", d, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((de = readdir(dir)) != (struct dirent *)0) {
|
||||||
|
if ((strcmp(de->d_name, ".") == 0) ||
|
||||||
|
(strcmp(de->d_name, "..") == 0))
|
||||||
|
continue;
|
||||||
|
/* we're going to just let the user deal with non-empty directories */
|
||||||
|
Error("non-empty directory `%s'", d);
|
||||||
|
retval = -1;
|
||||||
|
break;
|
||||||
|
/* this is probably too extreme. if someone happens to point conserver
|
||||||
|
* at /etc, for example, it could (if running as root) nuke the password
|
||||||
|
* database, config files, etc. too many important files could be
|
||||||
|
* shredded with a small typo.
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
|
if (path == (STRING *)0)
|
||||||
|
path = AllocString();
|
||||||
|
BuildStringPrint(path, "%s/%s", d, de->d_name);
|
||||||
|
if (stat(path->string, &dstat) == -1) {
|
||||||
|
Error("stat(%s): %s", path->string, strerror(errno));
|
||||||
|
retval = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (S_ISDIR(dstat.st_mode)) {
|
||||||
|
if (rmdir(path->string) != 0) {
|
||||||
|
Error("rmdir(%s): %s", path->string, strerror(errno));
|
||||||
|
retval = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (unlink(path->string) != 0) {
|
||||||
|
Error("unlink(%s): %s", path->string, strerror(errno));
|
||||||
|
retval = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path != (STRING *)0)
|
||||||
|
DestroyString(path);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* find out where/who we are (ksb)
|
/* find out where/who we are (ksb)
|
||||||
* parse optons
|
* parse optons
|
||||||
* read in the config file, open the log file
|
* read in the config file, open the log file
|
||||||
@ -1180,8 +1281,10 @@ main(argc, argv)
|
|||||||
char *curuser = (char *)0;
|
char *curuser = (char *)0;
|
||||||
int curuid = 0;
|
int curuid = 0;
|
||||||
GRPENT *pGE = (GRPENT *)0;
|
GRPENT *pGE = (GRPENT *)0;
|
||||||
|
#if !USE_UNIX_DOMAIN_SOCKETS
|
||||||
#if HAVE_INET_ATON
|
#if HAVE_INET_ATON
|
||||||
struct in_addr inetaddr;
|
struct in_addr inetaddr;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
isMultiProc = 1; /* make sure stuff has the pid */
|
isMultiProc = 1; /* make sure stuff has the pid */
|
||||||
@ -1379,34 +1482,43 @@ main(argc, argv)
|
|||||||
if (fSyntaxOnly)
|
if (fSyntaxOnly)
|
||||||
Msg("performing configuration file syntax check");
|
Msg("performing configuration file syntax check");
|
||||||
|
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
/* Don't do any redirects if we're purely local
|
||||||
|
* (but it allows them to see where remote consoles are)
|
||||||
|
*/
|
||||||
|
optConf->redirect = FLAGFALSE;
|
||||||
|
if (interface == (char *)0)
|
||||||
|
interface = UDSDIR;
|
||||||
|
#else
|
||||||
/* set up the address to bind to */
|
/* set up the address to bind to */
|
||||||
if (interface == (char *)0 ||
|
if (interface == (char *)0 ||
|
||||||
(interface[0] == '*' && interface[1] == '\000'))
|
(interface[0] == '*' && interface[1] == '\000'))
|
||||||
bindAddr = INADDR_ANY;
|
bindAddr = INADDR_ANY;
|
||||||
else {
|
else {
|
||||||
#if HAVE_INET_ATON
|
# if HAVE_INET_ATON
|
||||||
if (inet_aton(interface, &inetaddr) == 0) {
|
if (inet_aton(interface, &inetaddr) == 0) {
|
||||||
Error("inet_aton(%s): %s", interface, "invalid IP address");
|
Error("inet_aton(%s): %s", interface, "invalid IP address");
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
bindAddr = inetaddr.s_addr;
|
bindAddr = inetaddr.s_addr;
|
||||||
#else
|
# else
|
||||||
bindAddr = inet_addr(interface);
|
bindAddr = inet_addr(interface);
|
||||||
if (bindAddr == (in_addr_t) (-1)) {
|
if (bindAddr == (in_addr_t) (-1)) {
|
||||||
Error("inet_addr(%s): %s", interface, "invalid IP address");
|
Error("inet_addr(%s): %s", interface, "invalid IP address");
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
if (fDebug) {
|
if (fDebug) {
|
||||||
struct in_addr ba;
|
struct in_addr ba;
|
||||||
ba.s_addr = bindAddr;
|
ba.s_addr = bindAddr;
|
||||||
CONDDEBUG((1, "main(): bind address set to `%s'", inet_ntoa(ba)));
|
CONDDEBUG((1, "main(): bind address set to `%s'", inet_ntoa(ba)));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* must do all this so IsMe() works right */
|
/* must do all this so IsMe() works right */
|
||||||
if (gethostname(myHostname, MAXHOSTNAME) != 0) {
|
if (gethostname(myHostname, MAXHOSTNAME) != 0) {
|
||||||
Error("gethostname(): %s", interface, strerror(errno));
|
Error("gethostname(): %s", strerror(errno));
|
||||||
Bye(EX_OSERR);
|
Bye(EX_OSERR);
|
||||||
}
|
}
|
||||||
ProbeInterfaces();
|
ProbeInterfaces();
|
||||||
@ -1423,6 +1535,7 @@ main(argc, argv)
|
|||||||
ReadCfg(pcConfig, fpConfig);
|
ReadCfg(pcConfig, fpConfig);
|
||||||
fclose(fpConfig);
|
fclose(fpConfig);
|
||||||
|
|
||||||
|
#if !USE_UNIX_DOMAIN_SOCKETS
|
||||||
/* set up the port to bind to */
|
/* set up the port to bind to */
|
||||||
if (optConf->primaryport != (char *)0)
|
if (optConf->primaryport != (char *)0)
|
||||||
config->primaryport = StrDup(optConf->primaryport);
|
config->primaryport = StrDup(optConf->primaryport);
|
||||||
@ -1482,6 +1595,7 @@ main(argc, argv)
|
|||||||
bindBasePort = ntohs((unsigned short)pSE->s_port);
|
bindBasePort = ntohs((unsigned short)pSE->s_port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (optConf->passwdfile != (char *)0)
|
if (optConf->passwdfile != (char *)0)
|
||||||
config->passwdfile = StrDup(optConf->passwdfile);
|
config->passwdfile = StrDup(optConf->passwdfile);
|
||||||
@ -1580,7 +1694,13 @@ main(argc, argv)
|
|||||||
|
|
||||||
if (pGroups == (GRPENT *)0 && pRCList == (REMOTE *)0) {
|
if (pGroups == (GRPENT *)0 && pRCList == (REMOTE *)0) {
|
||||||
Error("no consoles found in configuration file");
|
Error("no consoles found in configuration file");
|
||||||
} else if (!fSyntaxOnly) {
|
} else if (fSyntaxOnly) {
|
||||||
|
/* short-circuit */
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
} else if (VerifyEmptyDirectory(interface) == -1) {
|
||||||
|
Error("Master(): %s: unusable socket directory", interface);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
/* Prep the SSL layer */
|
/* Prep the SSL layer */
|
||||||
SetupSSL();
|
SetupSSL();
|
||||||
@ -1603,7 +1723,6 @@ main(argc, argv)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
Spawn(pGE);
|
Spawn(pGE);
|
||||||
|
|
||||||
Verbose("group #%d pid %lu on port %hu", pGE->id,
|
Verbose("group #%d pid %lu on port %hu", pGE->id,
|
||||||
(unsigned long)pGE->pid, pGE->port);
|
(unsigned long)pGE->pid, pGE->port);
|
||||||
}
|
}
|
||||||
@ -1617,8 +1736,13 @@ main(argc, argv)
|
|||||||
local += pGE->imembers;
|
local += pGE->imembers;
|
||||||
for (pRC = pRCList; (REMOTE *)0 != pRC; pRC = pRC->pRCnext)
|
for (pRC = pRCList; (REMOTE *)0 != pRC; pRC = pRC->pRCnext)
|
||||||
remote++;
|
remote++;
|
||||||
|
# if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
setproctitle("master: port 0, %d local, %d remote", local,
|
||||||
|
remote);
|
||||||
|
#else
|
||||||
setproctitle("master: port %hu, %d local, %d remote", bindPort,
|
setproctitle("master: port %hu, %d local, %d remote", bindPort,
|
||||||
local, remote);
|
local, remote);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: main.h,v 5.51 2003/11/10 15:37:24 bryan Exp $
|
* $Id: main.h,v 5.52 2004/04/13 18:12:00 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -49,6 +49,9 @@ extern CONFIG *optConf;
|
|||||||
extern CONFIG *config;
|
extern CONFIG *config;
|
||||||
extern CONFIG defConfig;
|
extern CONFIG defConfig;
|
||||||
extern CONSFILE *unifiedlog;
|
extern CONSFILE *unifiedlog;
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
extern char *interface;
|
||||||
|
#endif
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
extern SSL_CTX *ctx;
|
extern SSL_CTX *ctx;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: master.c,v 5.124 2003/12/25 19:22:00 bryan Exp $
|
* $Id: master.c,v 5.125 2004/04/13 18:12:00 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -569,6 +569,9 @@ DoNormalRead(pCLServing)
|
|||||||
int iSep = 1;
|
int iSep = 1;
|
||||||
|
|
||||||
if ((GRPENT *)0 != pGroups) {
|
if ((GRPENT *)0 != pGroups) {
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
FilePrint(pCLServing->fd, FLAGTRUE, "@0");
|
||||||
|
#else
|
||||||
struct sockaddr_in lcl;
|
struct sockaddr_in lcl;
|
||||||
socklen_t so = sizeof(lcl);
|
socklen_t so = sizeof(lcl);
|
||||||
if (-1 ==
|
if (-1 ==
|
||||||
@ -583,6 +586,7 @@ DoNormalRead(pCLServing)
|
|||||||
}
|
}
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, "@%s",
|
FilePrint(pCLServing->fd, FLAGTRUE, "@%s",
|
||||||
inet_ntoa(lcl.sin_addr));
|
inet_ntoa(lcl.sin_addr));
|
||||||
|
#endif
|
||||||
iSep = 0;
|
iSep = 0;
|
||||||
}
|
}
|
||||||
if (config->redirect == FLAGTRUE) {
|
if (config->redirect == FLAGTRUE) {
|
||||||
@ -673,8 +677,13 @@ Master()
|
|||||||
int msfd;
|
int msfd;
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
fd_set rmask, wmask;
|
fd_set rmask, wmask;
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct sockaddr_un master_port;
|
||||||
|
static STRING *portPath = (STRING *)0;
|
||||||
|
#else
|
||||||
struct sockaddr_in master_port;
|
struct sockaddr_in master_port;
|
||||||
int true = 1;
|
int true = 1;
|
||||||
|
#endif
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
CONSCLIENT *pCLServing = (CONSCLIENT *)0;
|
CONSCLIENT *pCLServing = (CONSCLIENT *)0;
|
||||||
CONSCLIENT *pCL = (CONSCLIENT *)0;
|
CONSCLIENT *pCL = (CONSCLIENT *)0;
|
||||||
@ -715,6 +724,40 @@ Master()
|
|||||||
#else
|
#else
|
||||||
bzero((char *)&master_port, sizeof(master_port));
|
bzero((char *)&master_port, sizeof(master_port));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
master_port.sun_family = AF_UNIX;
|
||||||
|
|
||||||
|
if (portPath == (STRING *)0)
|
||||||
|
portPath = AllocString();
|
||||||
|
BuildStringPrint(portPath, "%s/0", interface);
|
||||||
|
if (portPath->used > sizeof(master_port.sun_path)) {
|
||||||
|
Error("Master(): path to socket too long: %s", portPath->string);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
strcpy(master_port.sun_path, portPath->string);
|
||||||
|
|
||||||
|
if ((msfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||||
|
Error("Master(): socket(AF_UNIX,SOCK_STREAM): %s",
|
||||||
|
strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SetFlags(msfd, O_NONBLOCK, 0))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (bind(msfd, (struct sockaddr *)&master_port, sizeof(master_port)) <
|
||||||
|
0) {
|
||||||
|
Error("Master(): bind(%s): %s", master_port.sun_path,
|
||||||
|
strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (listen(msfd, SOMAXCONN) < 0) {
|
||||||
|
Error("Master(): listen(%s): %s", master_port.sun_path,
|
||||||
|
strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#else
|
||||||
master_port.sin_family = AF_INET;
|
master_port.sin_family = AF_INET;
|
||||||
master_port.sin_addr.s_addr = bindAddr;
|
master_port.sin_addr.s_addr = bindAddr;
|
||||||
master_port.sin_port = htons(bindPort);
|
master_port.sin_port = htons(bindPort);
|
||||||
@ -724,7 +767,7 @@ Master()
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if HAVE_SETSOCKOPT
|
# if HAVE_SETSOCKOPT
|
||||||
if (setsockopt
|
if (setsockopt
|
||||||
(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
||||||
sizeof(true)) < 0) {
|
sizeof(true)) < 0) {
|
||||||
@ -732,7 +775,7 @@ Master()
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (!SetFlags(msfd, O_NONBLOCK, 0))
|
if (!SetFlags(msfd, O_NONBLOCK, 0))
|
||||||
return;
|
return;
|
||||||
@ -748,6 +791,7 @@ Master()
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
fp = fopen(PIDFILE, "w");
|
fp = fopen(PIDFILE, "w");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
@ -943,6 +987,9 @@ Master()
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(msfd);
|
close(msfd);
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
unlink(master_port.sun_path);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* clean up the free list */
|
/* clean up the free list */
|
||||||
while (pCLmfree != (CONSCLIENT *)0) {
|
while (pCLmfree != (CONSCLIENT *)0) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: readcfg.c,v 5.168 2004/03/11 16:23:59 bryan Exp $
|
* $Id: readcfg.c,v 5.169 2004/04/13 18:12:01 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -143,7 +143,7 @@ int isStartup = 0;
|
|||||||
GRPENT *pGroupsOld = (GRPENT *)0;
|
GRPENT *pGroupsOld = (GRPENT *)0;
|
||||||
GRPENT *pGEstage = (GRPENT *)0;
|
GRPENT *pGEstage = (GRPENT *)0;
|
||||||
GRPENT *pGE = (GRPENT *)0;
|
GRPENT *pGE = (GRPENT *)0;
|
||||||
static unsigned int groupID = 0;
|
static unsigned int groupID = 1;
|
||||||
REMOTE **ppRC = (REMOTE **)0;
|
REMOTE **ppRC = (REMOTE **)0;
|
||||||
|
|
||||||
/* 'break' handling */
|
/* 'break' handling */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: version.h,v 1.58 2004/02/17 15:34:42 bryan Exp $
|
* $Id: version.h,v 1.60 2004/04/03 15:44:49 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.2"
|
#define THIS_VERSION "conserver.com version 8.1.4"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: console.c,v 5.157 2004/03/10 02:55:47 bryan Exp $
|
* $Id: console.c,v 5.162 2004/04/13 18:12:03 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
@ -47,8 +47,12 @@ int fReqEncryption = 1;
|
|||||||
char *pcCredFile = (char *)0;
|
char *pcCredFile = (char *)0;
|
||||||
#endif
|
#endif
|
||||||
int chAttn = -1, chEsc = -1;
|
int chAttn = -1, chEsc = -1;
|
||||||
char *pcInMaster = /* which machine is current */
|
char *pcInMaster =
|
||||||
MASTERHOST;
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
UDSDIR;
|
||||||
|
#else
|
||||||
|
MASTERHOST; /* which machine is current */
|
||||||
|
#endif
|
||||||
char *pcPort = DEFPORT;
|
char *pcPort = DEFPORT;
|
||||||
unsigned short bindPort;
|
unsigned short bindPort;
|
||||||
CONSFILE *cfstdout;
|
CONSFILE *cfstdout;
|
||||||
@ -57,7 +61,10 @@ int disconnectCount = 0;
|
|||||||
STRING *execCmd = (STRING *)0;
|
STRING *execCmd = (STRING *)0;
|
||||||
CONSFILE *execCmdFile = (CONSFILE *)0;
|
CONSFILE *execCmdFile = (CONSFILE *)0;
|
||||||
pid_t execCmdPid = 0;
|
pid_t execCmdPid = 0;
|
||||||
int gotoConsole = 0;
|
CONSFILE *gotoConsole = (CONSFILE *)0;
|
||||||
|
CONSFILE *prevConsole = (CONSFILE *)0;
|
||||||
|
char *gotoName = (char *)0;
|
||||||
|
char *prevName = (char *)0;
|
||||||
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
SSL_CTX *ctx = (SSL_CTX *)0;
|
SSL_CTX *ctx = (SSL_CTX *)0;
|
||||||
@ -267,10 +274,14 @@ Version()
|
|||||||
acA2 = AllocString();
|
acA2 = AllocString();
|
||||||
|
|
||||||
Msg("%s", THIS_VERSION);
|
Msg("%s", THIS_VERSION);
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
Msg("default socket directory `%s\'", UDSDIR);
|
||||||
|
#else
|
||||||
Msg("default initial master server `%s\'", MASTERHOST);
|
Msg("default initial master server `%s\'", MASTERHOST);
|
||||||
|
Msg("default port referenced as `%s'", DEFPORT);
|
||||||
|
#endif
|
||||||
Msg("default escape sequence `%s%s\'", FmtCtl(DEFATTN, acA1),
|
Msg("default escape sequence `%s%s\'", FmtCtl(DEFATTN, acA1),
|
||||||
FmtCtl(DEFESC, acA2));
|
FmtCtl(DEFESC, acA2));
|
||||||
Msg("default port referenced as `%s'", DEFPORT);
|
|
||||||
|
|
||||||
BuildString((char *)0, acA1);
|
BuildString((char *)0, acA1);
|
||||||
if (optionlist[0] == (char *)0)
|
if (optionlist[0] == (char *)0)
|
||||||
@ -427,8 +438,13 @@ GetPort(pcToHost, sPort)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct sockaddr_un port;
|
||||||
|
static STRING *portPath = (STRING *)0;
|
||||||
|
#else
|
||||||
struct hostent *hp = (struct hostent *)0;
|
struct hostent *hp = (struct hostent *)0;
|
||||||
struct sockaddr_in port;
|
struct sockaddr_in port;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_MEMSET
|
#if HAVE_MEMSET
|
||||||
memset((void *)(&port), '\000', sizeof(port));
|
memset((void *)(&port), '\000', sizeof(port));
|
||||||
@ -436,21 +452,47 @@ GetPort(pcToHost, sPort)
|
|||||||
bzero((char *)(&port), sizeof(port));
|
bzero((char *)(&port), sizeof(port));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_INET_ATON
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
if (inet_aton(pcToHost, &(port.sin_addr)) == 0)
|
if (portPath == (STRING *)0)
|
||||||
|
portPath = AllocString();
|
||||||
|
BuildStringPrint(portPath, "%s/%hu", pcInMaster, sPort);
|
||||||
|
port.sun_family = AF_UNIX;
|
||||||
|
if (portPath->used > sizeof(port.sun_path)) {
|
||||||
|
Error("GetPort: path to socket too long: %s", portPath->string);
|
||||||
|
return (CONSFILE *)0;
|
||||||
|
}
|
||||||
|
strcpy(port.sun_path, portPath->string);
|
||||||
|
|
||||||
|
CONDDEBUG((1, "GetPort: socket=%s", port.sun_path));
|
||||||
|
|
||||||
|
/* set up the socket to talk to the server for all consoles
|
||||||
|
* (it will tell us who to talk to to get a real connection)
|
||||||
|
*/
|
||||||
|
if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||||
|
Error("socket(AF_UNIX,SOCK_STREAM): %s", strerror(errno));
|
||||||
|
return (CONSFILE *)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (connect(s, (struct sockaddr *)(&port), sizeof(port)) < 0) {
|
||||||
|
Error("connect(): %s: %s", port.sun_path, strerror(errno));
|
||||||
|
return (CONSFILE *)0;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
# if HAVE_INET_ATON
|
||||||
|
if (inet_aton(pcToHost, &(port.sin_addr)) == 0)
|
||||||
|
# else
|
||||||
port.sin_addr.s_addr = inet_addr(pcToHost);
|
port.sin_addr.s_addr = inet_addr(pcToHost);
|
||||||
if ((in_addr_t) (-1) == port.sin_addr.s_addr)
|
if ((in_addr_t) (-1) == port.sin_addr.s_addr)
|
||||||
#endif
|
# endif
|
||||||
{
|
{
|
||||||
if ((struct hostent *)0 != (hp = gethostbyname(pcToHost))) {
|
if ((struct hostent *)0 != (hp = gethostbyname(pcToHost))) {
|
||||||
#if HAVE_MEMCPY
|
# if HAVE_MEMCPY
|
||||||
memcpy((char *)&port.sin_addr.s_addr, (char *)hp->h_addr,
|
memcpy((char *)&port.sin_addr.s_addr, (char *)hp->h_addr,
|
||||||
hp->h_length);
|
hp->h_length);
|
||||||
#else
|
# else
|
||||||
bcopy((char *)hp->h_addr, (char *)&port.sin_addr.s_addr,
|
bcopy((char *)hp->h_addr, (char *)&port.sin_addr.s_addr,
|
||||||
hp->h_length);
|
hp->h_length);
|
||||||
#endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
Error("gethostbyname(%s): %s", pcToHost, hstrerror(h_errno));
|
Error("gethostbyname(%s): %s", pcToHost, hstrerror(h_errno));
|
||||||
return (CONSFILE *)0;
|
return (CONSFILE *)0;
|
||||||
@ -478,11 +520,13 @@ GetPort(pcToHost, sPort)
|
|||||||
Error("socket(AF_INET,SOCK_STREAM): %s", strerror(errno));
|
Error("socket(AF_INET,SOCK_STREAM): %s", strerror(errno));
|
||||||
return (CONSFILE *)0;
|
return (CONSFILE *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connect(s, (struct sockaddr *)(&port), sizeof(port)) < 0) {
|
if (connect(s, (struct sockaddr *)(&port), sizeof(port)) < 0) {
|
||||||
Error("connect(): %hu@%s: %s", ntohs(port.sin_port), pcToHost,
|
Error("connect(): %hu@%s: %s", ntohs(port.sin_port), pcToHost,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return (CONSFILE *)0;
|
return (CONSFILE *)0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return FileOpenFD(s, simpleSocket);
|
return FileOpenFD(s, simpleSocket);
|
||||||
}
|
}
|
||||||
@ -553,6 +597,9 @@ DestroyDataStructures()
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
C2Cooked();
|
C2Cooked();
|
||||||
|
if (cfstdout != (CONSFILE *)0)
|
||||||
|
FileUnopen(cfstdout);
|
||||||
|
DestroyStrings();
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -888,9 +935,217 @@ DoExec(pcf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
|
Interact(CONSFILE *pcf, char *pcMach)
|
||||||
|
#else
|
||||||
|
Interact(pcf, pcMach)
|
||||||
|
CONSFILE *pcf;
|
||||||
|
char *pcMach;
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int nc;
|
||||||
|
fd_set rmask, wmask;
|
||||||
|
int justSuspended = 0;
|
||||||
|
static char acMesg[8192];
|
||||||
|
|
||||||
|
/* if this is true, it means we successfully moved to a new console
|
||||||
|
* so we need to close the old one.
|
||||||
|
*/
|
||||||
|
if (prevConsole != (CONSFILE *)0)
|
||||||
|
FileClose(&prevConsole);
|
||||||
|
if (prevName != (char *)0) {
|
||||||
|
free(prevName);
|
||||||
|
prevName = (char *)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this is only true in other parts of the code iff pcf == gotoConsole */
|
||||||
|
if (gotoConsole != (CONSFILE *)0) {
|
||||||
|
gotoConsole = (CONSFILE *)0;
|
||||||
|
FilePrint(cfstdout, FLAGFALSE, "[returning to `%s'", pcMach);
|
||||||
|
FileWrite(pcf, FLAGFALSE, "\n", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
C2Raw();
|
||||||
|
|
||||||
|
/* set socket to non-blocking */
|
||||||
|
SetFlags(FileFDNum(pcf), O_NONBLOCK, 0);
|
||||||
|
|
||||||
|
/* read from stdin and the socket (non-blocking!).
|
||||||
|
* rmask indicates which descriptors to read from,
|
||||||
|
* the others are not used, nor is the result from
|
||||||
|
* select, read, or write.
|
||||||
|
*/
|
||||||
|
FD_ZERO(&rinit);
|
||||||
|
FD_ZERO(&winit);
|
||||||
|
FD_SET(FileFDNum(pcf), &rinit);
|
||||||
|
FD_SET(0, &rinit);
|
||||||
|
if (maxfd < FileFDNum(pcf) + 1)
|
||||||
|
maxfd = FileFDNum(pcf) + 1;
|
||||||
|
for (;;) {
|
||||||
|
justSuspended = 0;
|
||||||
|
if (fSawReapVirt) {
|
||||||
|
fSawReapVirt = 0;
|
||||||
|
ReapVirt();
|
||||||
|
}
|
||||||
|
/* reset read mask and select on it
|
||||||
|
*/
|
||||||
|
rmask = rinit;
|
||||||
|
wmask = winit;
|
||||||
|
if (-1 ==
|
||||||
|
select(maxfd, &rmask, &wmask, (fd_set *)0,
|
||||||
|
(struct timeval *)0)) {
|
||||||
|
if (errno != EINTR) {
|
||||||
|
Error("Master(): select(): %s", strerror(errno));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* anything from execCmd */
|
||||||
|
if (execCmdFile != (CONSFILE *)0) {
|
||||||
|
if (FileCanRead(execCmdFile, &rmask, &wmask)) {
|
||||||
|
if ((nc =
|
||||||
|
FileRead(execCmdFile, acMesg, sizeof(acMesg))) < 0) {
|
||||||
|
FD_CLR(FileFDNum(execCmdFile), &rinit);
|
||||||
|
FD_CLR(FileFDOutNum(execCmdFile), &winit);
|
||||||
|
FileClose(&execCmdFile);
|
||||||
|
FileSetQuoteIAC(pcf, FLAGFALSE);
|
||||||
|
FilePrint(pcf, FLAGFALSE, "%c%c", OB_IAC, OB_ABRT);
|
||||||
|
FileSetQuoteIAC(pcf, FLAGTRUE);
|
||||||
|
} else {
|
||||||
|
if (fStrip) {
|
||||||
|
for (i = 0; i < nc; ++i)
|
||||||
|
acMesg[i] &= 127;
|
||||||
|
}
|
||||||
|
FileWrite(pcf, FLAGFALSE, acMesg, nc);
|
||||||
|
}
|
||||||
|
} else if (!FileBufEmpty(execCmdFile) &&
|
||||||
|
FileCanWrite(execCmdFile, &rmask, &wmask)) {
|
||||||
|
CONDDEBUG((1, "Interact(): flushing fd %d",
|
||||||
|
FileFDNum(execCmdFile)));
|
||||||
|
if (FileWrite(execCmdFile, FLAGFALSE, (char *)0, 0) < 0) {
|
||||||
|
/* -bryan */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* anything from socket? */
|
||||||
|
if (FileCanRead(pcf, &rmask, &wmask)) {
|
||||||
|
int l;
|
||||||
|
if ((nc = FileRead(pcf, acMesg, sizeof(acMesg))) < 0) {
|
||||||
|
/* if we got an error/eof after returning from suspend */
|
||||||
|
if (justSuspended) {
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
Error("lost connection");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
while ((l = ParseIACBuf(pcf, acMesg, &nc)) >= 0) {
|
||||||
|
if (l == 0) {
|
||||||
|
if (execCmdFile == (CONSFILE *)0) {
|
||||||
|
if (FileSawQuoteExec(pcf) == FLAGTRUE)
|
||||||
|
DoExec(pcf);
|
||||||
|
else if (FileSawQuoteSusp(pcf) == FLAGTRUE) {
|
||||||
|
justSuspended = 1;
|
||||||
|
#if defined(SIGSTOP)
|
||||||
|
FileWrite(cfstdout, FLAGFALSE, "stop]", 5);
|
||||||
|
C2Cooked();
|
||||||
|
kill(thepid, SIGSTOP);
|
||||||
|
C2Raw();
|
||||||
|
FileWrite(cfstdout, FLAGFALSE,
|
||||||
|
"[press any character to continue",
|
||||||
|
32);
|
||||||
|
#else
|
||||||
|
FileWrite(cfstdout, FLAGFALSE,
|
||||||
|
"stop not supported -- press any character to continue",
|
||||||
|
53);
|
||||||
|
#endif
|
||||||
|
} else if (FileSawQuoteGoto(pcf) == FLAGTRUE) {
|
||||||
|
gotoConsole = pcf;
|
||||||
|
if (gotoName != (char *)0)
|
||||||
|
free(gotoName);
|
||||||
|
if ((gotoName = StrDup(pcMach)) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
|
C2Cooked();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (FileSawQuoteAbrt(pcf) == FLAGTRUE) {
|
||||||
|
FD_CLR(FileFDNum(execCmdFile), &rinit);
|
||||||
|
FD_CLR(FileFDOutNum(execCmdFile), &winit);
|
||||||
|
FileClose(&execCmdFile);
|
||||||
|
kill(execCmdPid, SIGHUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (fStrip) {
|
||||||
|
for (i = 0; i < l; ++i)
|
||||||
|
acMesg[i] &= 127;
|
||||||
|
}
|
||||||
|
FileWrite(cfstdout, FLAGFALSE, acMesg, l);
|
||||||
|
if (execCmdFile != (CONSFILE *)0) {
|
||||||
|
FileWrite(execCmdFile, FLAGFALSE, acMesg, l);
|
||||||
|
}
|
||||||
|
nc -= l;
|
||||||
|
MemMove(acMesg, acMesg + l, nc);
|
||||||
|
}
|
||||||
|
} else if (!FileBufEmpty(pcf) && FileCanWrite(pcf, &rmask, &wmask)) {
|
||||||
|
CONDDEBUG((1, "Interact(): flushing fd %d", FileFDNum(pcf)));
|
||||||
|
if (FileWrite(pcf, FLAGFALSE, (char *)0, 0) < 0) {
|
||||||
|
/* -bryan */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* anything from stdin? */
|
||||||
|
if (FD_ISSET(0, &rmask)) {
|
||||||
|
if ((nc = read(0, acMesg, sizeof(acMesg))) == 0) {
|
||||||
|
if (screwy)
|
||||||
|
break;
|
||||||
|
else {
|
||||||
|
FD_SET(0, &rinit);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (execCmdFile == (CONSFILE *)0) {
|
||||||
|
if (fStrip) {
|
||||||
|
for (i = 0; i < nc; ++i)
|
||||||
|
acMesg[i] &= 127;
|
||||||
|
}
|
||||||
|
FileWrite(pcf, FLAGFALSE, acMesg, nc);
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < nc; ++i) {
|
||||||
|
if (acMesg[i] == '\n' || acMesg[i] == '\r')
|
||||||
|
FilePrint(cfstdout, FLAGFALSE,
|
||||||
|
"[local command running - pid %lu]\r\n",
|
||||||
|
execCmdPid);
|
||||||
|
else if (acMesg[i] == 0x03) { /* ctrl-c */
|
||||||
|
kill(execCmdPid, SIGHUP);
|
||||||
|
FilePrint(cfstdout, FLAGFALSE,
|
||||||
|
"[local command sent SIGHUP - pid %lu]\r\n",
|
||||||
|
execCmdPid);
|
||||||
|
} else if (acMesg[i] == 0x1c) { /* ctrl-\ */
|
||||||
|
kill(execCmdPid, SIGKILL);
|
||||||
|
FilePrint(cfstdout, FLAGFALSE,
|
||||||
|
"[local command sent SIGKILL - pid %lu]\r\n",
|
||||||
|
execCmdPid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
C2Cooked();
|
||||||
|
if (fVerbose)
|
||||||
|
printf("Console %s closed.\n", pcMach);
|
||||||
|
}
|
||||||
|
|
||||||
/* interact with a group server (ksb)
|
/* interact with a group server (ksb)
|
||||||
*/
|
*/
|
||||||
static int
|
void
|
||||||
#if PROTOTYPES
|
#if PROTOTYPES
|
||||||
CallUp(CONSFILE *pcf, char *pcMaster, char *pcMach, char *pcHow,
|
CallUp(CONSFILE *pcf, char *pcMaster, char *pcMach, char *pcHow,
|
||||||
char *result)
|
char *result)
|
||||||
@ -900,15 +1155,9 @@ CallUp(pcf, pcMaster, pcMach, pcHow, result)
|
|||||||
char *pcMaster, *pcMach, *pcHow, *result;
|
char *pcMaster, *pcMach, *pcHow, *result;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int nc;
|
|
||||||
int fIn = '-';
|
int fIn = '-';
|
||||||
fd_set rmask, wmask;
|
|
||||||
int i;
|
|
||||||
int justSuspended = 0;
|
|
||||||
char *r = (char *)0;
|
char *r = (char *)0;
|
||||||
static char acMesg[8192];
|
|
||||||
|
|
||||||
gotoConsole = 0;
|
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
Msg("%s to %s (on %s)", pcHow, pcMach, pcMaster);
|
Msg("%s to %s (on %s)", pcHow, pcMach, pcMaster);
|
||||||
}
|
}
|
||||||
@ -1027,176 +1276,7 @@ CallUp(pcf, pcMaster, pcMach, pcHow, result)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
C2Raw();
|
Interact(pcf, pcMach);
|
||||||
|
|
||||||
/* set socket to non-blocking */
|
|
||||||
SetFlags(FileFDNum(pcf), O_NONBLOCK, 0);
|
|
||||||
|
|
||||||
/* read from stdin and the socket (non-blocking!).
|
|
||||||
* rmask indicates which descriptors to read from,
|
|
||||||
* the others are not used, nor is the result from
|
|
||||||
* select, read, or write.
|
|
||||||
*/
|
|
||||||
FD_ZERO(&rinit);
|
|
||||||
FD_ZERO(&winit);
|
|
||||||
FD_SET(FileFDNum(pcf), &rinit);
|
|
||||||
FD_SET(0, &rinit);
|
|
||||||
if (maxfd < FileFDNum(pcf) + 1)
|
|
||||||
maxfd = FileFDNum(pcf) + 1;
|
|
||||||
for (;;) {
|
|
||||||
justSuspended = 0;
|
|
||||||
if (fSawReapVirt) {
|
|
||||||
fSawReapVirt = 0;
|
|
||||||
ReapVirt();
|
|
||||||
}
|
|
||||||
/* reset read mask and select on it
|
|
||||||
*/
|
|
||||||
rmask = rinit;
|
|
||||||
wmask = winit;
|
|
||||||
if (-1 ==
|
|
||||||
select(maxfd, &rmask, &wmask, (fd_set *)0,
|
|
||||||
(struct timeval *)0)) {
|
|
||||||
if (errno != EINTR) {
|
|
||||||
Error("Master(): select(): %s", strerror(errno));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anything from execCmd */
|
|
||||||
if (execCmdFile != (CONSFILE *)0) {
|
|
||||||
if (FileCanRead(execCmdFile, &rmask, &wmask)) {
|
|
||||||
if ((nc =
|
|
||||||
FileRead(execCmdFile, acMesg, sizeof(acMesg))) < 0) {
|
|
||||||
FD_CLR(FileFDNum(execCmdFile), &rinit);
|
|
||||||
FD_CLR(FileFDOutNum(execCmdFile), &winit);
|
|
||||||
FileClose(&execCmdFile);
|
|
||||||
FileSetQuoteIAC(pcf, FLAGFALSE);
|
|
||||||
FilePrint(pcf, FLAGFALSE, "%c%c", OB_IAC, OB_ABRT);
|
|
||||||
FileSetQuoteIAC(pcf, FLAGTRUE);
|
|
||||||
} else {
|
|
||||||
if (fStrip) {
|
|
||||||
for (i = 0; i < nc; ++i)
|
|
||||||
acMesg[i] &= 127;
|
|
||||||
}
|
|
||||||
FileWrite(pcf, FLAGFALSE, acMesg, nc);
|
|
||||||
}
|
|
||||||
} else if (!FileBufEmpty(execCmdFile) &&
|
|
||||||
FileCanWrite(execCmdFile, &rmask, &wmask)) {
|
|
||||||
CONDDEBUG((1, "CallUp(): flushing fd %d",
|
|
||||||
FileFDNum(execCmdFile)));
|
|
||||||
if (FileWrite(execCmdFile, FLAGFALSE, (char *)0, 0) < 0) {
|
|
||||||
/* -bryan */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anything from socket? */
|
|
||||||
if (FileCanRead(pcf, &rmask, &wmask)) {
|
|
||||||
int l;
|
|
||||||
if ((nc = FileRead(pcf, acMesg, sizeof(acMesg))) < 0) {
|
|
||||||
/* if we got an error/eof after returning from suspend */
|
|
||||||
if (justSuspended) {
|
|
||||||
fprintf(stderr, "\n");
|
|
||||||
Error("lost connection");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while ((l = ParseIACBuf(pcf, acMesg, &nc)) >= 0) {
|
|
||||||
if (l == 0) {
|
|
||||||
if (execCmdFile == (CONSFILE *)0) {
|
|
||||||
if (FileSawQuoteExec(pcf) == FLAGTRUE)
|
|
||||||
DoExec(pcf);
|
|
||||||
else if (FileSawQuoteSusp(pcf) == FLAGTRUE) {
|
|
||||||
justSuspended = 1;
|
|
||||||
#if defined(SIGSTOP)
|
|
||||||
FileWrite(cfstdout, FLAGFALSE, "stop]", 5);
|
|
||||||
C2Cooked();
|
|
||||||
kill(thepid, SIGSTOP);
|
|
||||||
C2Raw();
|
|
||||||
FileWrite(cfstdout, FLAGFALSE,
|
|
||||||
"[press any character to continue",
|
|
||||||
32);
|
|
||||||
#else
|
|
||||||
FileWrite(cfstdout, FLAGFALSE,
|
|
||||||
"stop not supported -- press any character to continue",
|
|
||||||
53);
|
|
||||||
#endif
|
|
||||||
} else if (FileSawQuoteGoto(pcf) == FLAGTRUE) {
|
|
||||||
gotoConsole = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (FileSawQuoteAbrt(pcf) == FLAGTRUE) {
|
|
||||||
FD_CLR(FileFDNum(execCmdFile), &rinit);
|
|
||||||
FD_CLR(FileFDOutNum(execCmdFile), &winit);
|
|
||||||
FileClose(&execCmdFile);
|
|
||||||
kill(execCmdPid, SIGHUP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (fStrip) {
|
|
||||||
for (i = 0; i < l; ++i)
|
|
||||||
acMesg[i] &= 127;
|
|
||||||
}
|
|
||||||
FileWrite(cfstdout, FLAGFALSE, acMesg, l);
|
|
||||||
if (execCmdFile != (CONSFILE *)0) {
|
|
||||||
FileWrite(execCmdFile, FLAGFALSE, acMesg, l);
|
|
||||||
}
|
|
||||||
nc -= l;
|
|
||||||
MemMove(acMesg, acMesg + l, nc);
|
|
||||||
}
|
|
||||||
} else if (!FileBufEmpty(pcf) && FileCanWrite(pcf, &rmask, &wmask)) {
|
|
||||||
CONDDEBUG((1, "CallUp(): flushing fd %d", FileFDNum(pcf)));
|
|
||||||
if (FileWrite(pcf, FLAGFALSE, (char *)0, 0) < 0) {
|
|
||||||
/* -bryan */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anything from stdin? */
|
|
||||||
if (FD_ISSET(0, &rmask)) {
|
|
||||||
if ((nc = read(0, acMesg, sizeof(acMesg))) == 0) {
|
|
||||||
if (screwy)
|
|
||||||
break;
|
|
||||||
else {
|
|
||||||
FD_SET(0, &rinit);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (execCmdFile == (CONSFILE *)0) {
|
|
||||||
if (fStrip) {
|
|
||||||
for (i = 0; i < nc; ++i)
|
|
||||||
acMesg[i] &= 127;
|
|
||||||
}
|
|
||||||
FileWrite(pcf, FLAGFALSE, acMesg, nc);
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < nc; ++i) {
|
|
||||||
if (acMesg[i] == '\n' || acMesg[i] == '\r')
|
|
||||||
FilePrint(cfstdout, FLAGFALSE,
|
|
||||||
"[local command running - pid %lu]\r\n",
|
|
||||||
execCmdPid);
|
|
||||||
else if (acMesg[i] == 0x03) { /* ctrl-c */
|
|
||||||
kill(execCmdPid, SIGHUP);
|
|
||||||
FilePrint(cfstdout, FLAGFALSE,
|
|
||||||
"[local command sent SIGHUP - pid %lu]\r\n",
|
|
||||||
execCmdPid);
|
|
||||||
} else if (acMesg[i] == 0x1c) { /* ctrl-\ */
|
|
||||||
kill(execCmdPid, SIGKILL);
|
|
||||||
FilePrint(cfstdout, FLAGFALSE,
|
|
||||||
"[local command sent SIGKILL - pid %lu]\r\n",
|
|
||||||
execCmdPid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
C2Cooked();
|
|
||||||
if (fVerbose)
|
|
||||||
printf("Console %s closed.\n", pcMach);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* shouldn't need more than 3 levels of commands (but alloc 4 just 'cause)
|
/* shouldn't need more than 3 levels of commands (but alloc 4 just 'cause)
|
||||||
@ -1214,11 +1294,11 @@ char *cmdarg = (char *)0;
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
#if PROTOTYPES
|
#if PROTOTYPES
|
||||||
DoCmds(char *master, char *ports, int cmdi)
|
DoCmds(char *master, char *pports, int cmdi)
|
||||||
#else
|
#else
|
||||||
DoCmds(master, ports, cmdi)
|
DoCmds(master, pports, cmdi)
|
||||||
char *master;
|
char *master;
|
||||||
char *ports;
|
char *pports;
|
||||||
int cmdi;
|
int cmdi;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -1229,6 +1309,12 @@ DoCmds(master, ports, cmdi)
|
|||||||
unsigned short port;
|
unsigned short port;
|
||||||
char *result = (char *)0;
|
char *result = (char *)0;
|
||||||
int len;
|
int len;
|
||||||
|
char *ports;
|
||||||
|
char *pcopy;
|
||||||
|
char *serverName;
|
||||||
|
|
||||||
|
if ((pcopy = ports = StrDup(pports)) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
|
|
||||||
len = strlen(ports);
|
len = strlen(ports);
|
||||||
while (len > 0 && (ports[len - 1] == '\r' || ports[len - 1] == '\n'))
|
while (len > 0 && (ports[len - 1] == '\r' || ports[len - 1] == '\n'))
|
||||||
@ -1248,13 +1334,27 @@ DoCmds(master, ports, cmdi)
|
|||||||
} else
|
} else
|
||||||
server = master;
|
server = master;
|
||||||
|
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
serverName = "localhost";
|
||||||
|
#else
|
||||||
|
serverName = server;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (*ports == '\000') {
|
if (*ports == '\000') {
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
port = 0;
|
||||||
|
#else
|
||||||
port = htons(bindPort);
|
port = htons(bindPort);
|
||||||
|
#endif
|
||||||
} else if (!isdigit((int)(ports[0]))) {
|
} else if (!isdigit((int)(ports[0]))) {
|
||||||
Error("invalid port spec for %s: `%s'", server, ports);
|
Error("invalid port spec for %s: `%s'", serverName, ports);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
port = (short)atoi(ports);
|
||||||
|
#else
|
||||||
port = htons((short)atoi(ports));
|
port = htons((short)atoi(ports));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
attemptLogin:
|
attemptLogin:
|
||||||
@ -1266,7 +1366,7 @@ DoCmds(master, ports, cmdi)
|
|||||||
t = ReadReply(pcf, 0);
|
t = ReadReply(pcf, 0);
|
||||||
if (strcmp(t, "ok\r\n") != 0) {
|
if (strcmp(t, "ok\r\n") != 0) {
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
FilePrint(cfstdout, FLAGFALSE, "%s: %s", server, t);
|
FilePrint(cfstdout, FLAGFALSE, "%s: %s", serverName, t);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
@ -1277,7 +1377,8 @@ DoCmds(master, ports, cmdi)
|
|||||||
AttemptSSL(pcf);
|
AttemptSSL(pcf);
|
||||||
}
|
}
|
||||||
if (FileGetType(pcf) != SSLSocket) {
|
if (FileGetType(pcf) != SSLSocket) {
|
||||||
Error("Encryption not supported by server `%s'", server);
|
Error("Encryption not supported by server `%s'",
|
||||||
|
serverName);
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1295,9 +1396,9 @@ DoCmds(master, ports, cmdi)
|
|||||||
if (t[7] == ' ') {
|
if (t[7] == ' ') {
|
||||||
hostname = PruneSpace(t + 7);
|
hostname = PruneSpace(t + 7);
|
||||||
if (*hostname == '\000')
|
if (*hostname == '\000')
|
||||||
hostname = server;
|
hostname = serverName;
|
||||||
} else
|
} else
|
||||||
hostname = server;
|
hostname = serverName;
|
||||||
if (tmpString == (STRING *)0)
|
if (tmpString == (STRING *)0)
|
||||||
tmpString = AllocString();
|
tmpString = AllocString();
|
||||||
if (tmpString->used <= 1) {
|
if (tmpString->used <= 1) {
|
||||||
@ -1307,7 +1408,7 @@ DoCmds(master, ports, cmdi)
|
|||||||
pass = GetPassword(tmpString->string);
|
pass = GetPassword(tmpString->string);
|
||||||
if (pass == (char *)0) {
|
if (pass == (char *)0) {
|
||||||
Error("could not get password from tty for `%s'",
|
Error("could not get password from tty for `%s'",
|
||||||
server);
|
serverName);
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1319,12 +1420,12 @@ DoCmds(master, ports, cmdi)
|
|||||||
tmpString->used - 1);
|
tmpString->used - 1);
|
||||||
t = ReadReply(pcf, 0);
|
t = ReadReply(pcf, 0);
|
||||||
if (strcmp(t, "ok\r\n") != 0) {
|
if (strcmp(t, "ok\r\n") != 0) {
|
||||||
FilePrint(cfstdout, FLAGFALSE, "%s: %s", server, t);
|
FilePrint(cfstdout, FLAGFALSE, "%s: %s", serverName, t);
|
||||||
if (++count < 3) {
|
if (++count < 3) {
|
||||||
BuildString((char *)0, tmpString);
|
BuildString((char *)0, tmpString);
|
||||||
goto attemptLogin;
|
goto attemptLogin;
|
||||||
}
|
}
|
||||||
Error("too many bad passwords for `%s'", server);
|
Error("too many bad passwords for `%s'", serverName);
|
||||||
count = 0;
|
count = 0;
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
continue;
|
continue;
|
||||||
@ -1332,7 +1433,7 @@ DoCmds(master, ports, cmdi)
|
|||||||
count = 0;
|
count = 0;
|
||||||
} else if (strcmp(t, "ok\r\n") != 0) {
|
} else if (strcmp(t, "ok\r\n") != 0) {
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
FilePrint(cfstdout, FLAGFALSE, "%s: %s", server, t);
|
FilePrint(cfstdout, FLAGFALSE, "%s: %s", serverName, t);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1352,6 +1453,8 @@ DoCmds(master, ports, cmdi)
|
|||||||
if (cmdi != 0) {
|
if (cmdi != 0) {
|
||||||
t = ReadReply(pcf, 0);
|
t = ReadReply(pcf, 0);
|
||||||
/* save the result */
|
/* save the result */
|
||||||
|
if (result != (char *)0)
|
||||||
|
free(result);
|
||||||
if ((result = StrDup(t)) == (char *)0)
|
if ((result = StrDup(t)) == (char *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
}
|
}
|
||||||
@ -1366,12 +1469,15 @@ DoCmds(master, ports, cmdi)
|
|||||||
Bye(EX_SOFTWARE);
|
Bye(EX_SOFTWARE);
|
||||||
}
|
}
|
||||||
} else if (result[0] != '[') { /* did we not get a connection? */
|
} else if (result[0] != '[') { /* did we not get a connection? */
|
||||||
FilePrint(cfstdout, FLAGFALSE, "%s: %s", server, result);
|
FilePrint(cfstdout, FLAGFALSE, "%s: %s", serverName,
|
||||||
|
result);
|
||||||
FileClose(&pcf);
|
FileClose(&pcf);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
CallUp(pcf, server, cmdarg, cmds[0], result);
|
CallUp(pcf, server, cmdarg, cmds[0], result);
|
||||||
return 0;
|
if (pcf != gotoConsole)
|
||||||
|
FileClose(&pcf);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (cmds[cmdi][0] == 'q') {
|
} else if (cmds[cmdi][0] == 'q') {
|
||||||
t = ReadReply(pcf, 0);
|
t = ReadReply(pcf, 0);
|
||||||
@ -1388,6 +1494,8 @@ DoCmds(master, ports, cmdi)
|
|||||||
if (cmdi == 0) {
|
if (cmdi == 0) {
|
||||||
int len;
|
int len;
|
||||||
/* if we hit bottom, this is where we get our results */
|
/* if we hit bottom, this is where we get our results */
|
||||||
|
if (result != (char *)0)
|
||||||
|
free(result);
|
||||||
if ((result = StrDup(t)) == (char *)0)
|
if ((result = StrDup(t)) == (char *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
len = strlen(result);
|
len = strlen(result);
|
||||||
@ -1402,7 +1510,7 @@ DoCmds(master, ports, cmdi)
|
|||||||
*/
|
*/
|
||||||
if (cmds[0][0] == 'd') {
|
if (cmds[0][0] == 'd') {
|
||||||
if (result[0] != 'o' || result[1] != 'k') {
|
if (result[0] != 'o' || result[1] != 'k') {
|
||||||
FileWrite(cfstdout, FLAGTRUE, server, -1);
|
FileWrite(cfstdout, FLAGTRUE, serverName, -1);
|
||||||
FileWrite(cfstdout, FLAGTRUE, ": ", 2);
|
FileWrite(cfstdout, FLAGTRUE, ": ", 2);
|
||||||
FileWrite(cfstdout, FLAGFALSE, result, len);
|
FileWrite(cfstdout, FLAGFALSE, result, len);
|
||||||
} else {
|
} else {
|
||||||
@ -1411,8 +1519,9 @@ DoCmds(master, ports, cmdi)
|
|||||||
} else if ((cmds[0][0] != 'b' && cmds[0][0] != 't') ||
|
} else if ((cmds[0][0] != 'b' && cmds[0][0] != 't') ||
|
||||||
(result[0] != 'o' || result[1] != 'k')) {
|
(result[0] != 'o' || result[1] != 'k')) {
|
||||||
/* did a 'master' before this or doing a 'disconnect' */
|
/* did a 'master' before this or doing a 'disconnect' */
|
||||||
if (cmds[1][0] == 'm' || cmds[0][0] == 'd') {
|
if ((cmds[1] != (char *)0 && cmds[1][0] == 'm') ||
|
||||||
FileWrite(cfstdout, FLAGTRUE, server, -1);
|
cmds[0][0] == 'd') {
|
||||||
|
FileWrite(cfstdout, FLAGTRUE, serverName, -1);
|
||||||
FileWrite(cfstdout, FLAGTRUE, ": ", 2);
|
FileWrite(cfstdout, FLAGTRUE, ": ", 2);
|
||||||
}
|
}
|
||||||
FileWrite(cfstdout, FLAGFALSE, result, len);
|
FileWrite(cfstdout, FLAGFALSE, result, len);
|
||||||
@ -1427,9 +1536,14 @@ DoCmds(master, ports, cmdi)
|
|||||||
DoCmds(server, result, cmdi);
|
DoCmds(server, result, cmdi);
|
||||||
else if (cmdi > 0)
|
else if (cmdi > 0)
|
||||||
DoCmds(server, result, cmdi - 1);
|
DoCmds(server, result, cmdi - 1);
|
||||||
free(result);
|
if (result != (char *)0)
|
||||||
|
free(result);
|
||||||
|
result = (char *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result != (char *)0)
|
||||||
|
free(result);
|
||||||
|
free(pcopy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1459,10 +1573,8 @@ main(argc, argv)
|
|||||||
extern int optind;
|
extern int optind;
|
||||||
extern int optopt;
|
extern int optopt;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
int i;
|
|
||||||
static STRING *textMsg = (STRING *)0;
|
static STRING *textMsg = (STRING *)0;
|
||||||
int cmdi;
|
int cmdi;
|
||||||
int retval;
|
|
||||||
static STRING *consoleName = (STRING *)0;
|
static STRING *consoleName = (STRING *)0;
|
||||||
|
|
||||||
isMultiProc = 0; /* make sure stuff DOESN'T have the pid */
|
isMultiProc = 0; /* make sure stuff DOESN'T have the pid */
|
||||||
@ -1502,7 +1614,10 @@ main(argc, argv)
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
case 'b':
|
case 'b':
|
||||||
pcCmd = "broadcast";
|
pcCmd = "broadcast";
|
||||||
cmdarg = optarg;
|
if (cmdarg != (char *)0)
|
||||||
|
free(cmdarg);
|
||||||
|
if ((cmdarg = StrDup(optarg)) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
@ -1517,7 +1632,10 @@ main(argc, argv)
|
|||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
pcCmd = "disconnect";
|
pcCmd = "disconnect";
|
||||||
cmdarg = optarg;
|
if (cmdarg != (char *)0)
|
||||||
|
free(cmdarg);
|
||||||
|
if ((cmdarg = StrDup(optarg)) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
@ -1648,30 +1766,36 @@ main(argc, argv)
|
|||||||
Error("missing console name");
|
Error("missing console name");
|
||||||
Bye(EX_UNAVAILABLE);
|
Bye(EX_UNAVAILABLE);
|
||||||
}
|
}
|
||||||
cmdarg = argv[optind++];
|
if (cmdarg != (char *)0)
|
||||||
|
free(cmdarg);
|
||||||
|
if ((cmdarg = StrDup(argv[optind++])) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
} else if (*pcCmd == 't') {
|
} else if (*pcCmd == 't') {
|
||||||
if (optind >= argc) {
|
if (optind >= argc) {
|
||||||
Error("missing message text");
|
Error("missing message text");
|
||||||
Bye(EX_UNAVAILABLE);
|
Bye(EX_UNAVAILABLE);
|
||||||
}
|
}
|
||||||
cmdarg = argv[optind++];
|
if (cmdarg != (char *)0)
|
||||||
|
free(cmdarg);
|
||||||
|
if ((cmdarg = StrDup(argv[optind++])) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
Error("extra garbage on command line? (%s...)", argv[optind]);
|
Error("extra garbage on command line? (%s...)", argv[optind]);
|
||||||
Bye(EX_UNAVAILABLE);
|
Bye(EX_UNAVAILABLE);
|
||||||
}
|
}
|
||||||
|
#if !USE_UNIX_DOMAIN_SOCKETS
|
||||||
/* if we somehow lost the port (or got an empty string), reset */
|
/* if we somehow lost the port (or got an empty string), reset */
|
||||||
if (pcPort == (char *)0 || pcPort[0] == '\000')
|
if (pcPort == (char *)0 || pcPort[0] == '\000')
|
||||||
pcPort = DEFPORT;
|
pcPort = DEFPORT;
|
||||||
|
|
||||||
/* Look for non-numeric characters */
|
/* Look for non-numeric characters */
|
||||||
for (i = 0; pcPort[i] != '\000'; i++)
|
for (opt = 0; pcPort[opt] != '\000'; opt++)
|
||||||
if (!isdigit((int)pcPort[i]))
|
if (!isdigit((int)pcPort[opt]))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (pcPort[i] == '\000') {
|
if (pcPort[opt] == '\000') {
|
||||||
/* numeric only */
|
/* numeric only */
|
||||||
bindPort = atoi(pcPort);
|
bindPort = atoi(pcPort);
|
||||||
} else {
|
} else {
|
||||||
@ -1684,6 +1808,7 @@ main(argc, argv)
|
|||||||
bindPort = ntohs((u_short) pSE->s_port);
|
bindPort = ntohs((u_short) pSE->s_port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pcUser == (char *)0 || pcUser[0] == '\000') {
|
if (pcUser == (char *)0 || pcUser[0] == '\000') {
|
||||||
if (((pcUser = getenv("LOGNAME")) == (char *)0) &&
|
if (((pcUser = getenv("LOGNAME")) == (char *)0) &&
|
||||||
@ -1737,35 +1862,54 @@ main(argc, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char *ports;
|
if (gotoConsole == (CONSFILE *)0)
|
||||||
if ((ports = StrDup(acPorts->string)) == (char *)0)
|
DoCmds(pcInMaster, acPorts->string, cmdi);
|
||||||
OutOfMem();
|
else
|
||||||
retval = DoCmds(pcInMaster, ports, cmdi);
|
Interact(gotoConsole, gotoName);
|
||||||
free(ports);
|
|
||||||
/* if we didn't "call" or we didn't ask for another console, abort */
|
/* if we didn't ask for another console, done */
|
||||||
if (cmds[cmdi][0] != 'c' || gotoConsole == 0)
|
if (gotoConsole == (CONSFILE *)0 && prevConsole == (CONSFILE *)0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (consoleName == (STRING *)0)
|
if (consoleName == (STRING *)0)
|
||||||
consoleName = AllocString();
|
consoleName = AllocString();
|
||||||
C2Raw();
|
C2Raw();
|
||||||
if (gotoConsole == -1)
|
if (prevConsole == (CONSFILE *)0)
|
||||||
FileWrite(cfstdout, FLAGFALSE, "[console: ", 10);
|
|
||||||
else
|
|
||||||
FileWrite(cfstdout, FLAGFALSE, "console: ", 9);
|
FileWrite(cfstdout, FLAGFALSE, "console: ", 9);
|
||||||
|
else
|
||||||
|
FileWrite(cfstdout, FLAGFALSE, "[console: ", 10);
|
||||||
GetUserInput(consoleName);
|
GetUserInput(consoleName);
|
||||||
FileWrite(cfstdout, FLAGFALSE, "]\r\n", 3);
|
FileWrite(cfstdout, FLAGFALSE, "]\r\n", 3);
|
||||||
C2Cooked();
|
C2Cooked();
|
||||||
if (consoleName->used <= 1)
|
if (consoleName->used > 1) {
|
||||||
break;
|
if (cmdarg != (char *)0)
|
||||||
cmdarg = consoleName->string;
|
free(cmdarg);
|
||||||
gotoConsole = -1;
|
if ((cmdarg = StrDup(consoleName->string)) == (char *)0)
|
||||||
|
OutOfMem();
|
||||||
|
if (prevConsole == (CONSFILE *)0) {
|
||||||
|
prevConsole = gotoConsole;
|
||||||
|
gotoConsole = (CONSFILE *)0;
|
||||||
|
prevName = gotoName;
|
||||||
|
gotoName = (char *)0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (prevConsole != (CONSFILE *)0) {
|
||||||
|
gotoConsole = prevConsole;
|
||||||
|
prevConsole = (CONSFILE *)0;
|
||||||
|
gotoName = prevName;
|
||||||
|
prevName = (char *)0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*pcCmd == 'd')
|
if (cmdarg != (char *)0)
|
||||||
FilePrint(cfstdout, FLAGFALSE, "Disconnected %d users\n",
|
free(cmdarg);
|
||||||
disconnectCount);
|
|
||||||
|
|
||||||
Bye(retval);
|
if (*pcCmd == 'd')
|
||||||
|
FilePrint(cfstdout, FLAGFALSE, "disconnected %d %s\n",
|
||||||
|
disconnectCount,
|
||||||
|
disconnectCount == 1 ? "user" : "users");
|
||||||
|
|
||||||
|
Bye(0);
|
||||||
return 0; /* noop - Bye() terminates us */
|
return 0; /* noop - Bye() terminates us */
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" $Id: console.man,v 1.44 2004/03/11 16:23:29 bryan Exp $
|
.\" $Id: console.man,v 1.46 2004/03/23 18:32:09 bryan Exp $
|
||||||
.TH CONSOLE 1 "2004/03/11" "conserver-8.1.2" "conserver"
|
.TH CONSOLE 1 "2004/03/23" "conserver-8.1.4" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
console \- console server client program
|
console \- console server client program
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -26,11 +26,11 @@ console \- console server client program
|
|||||||
.RB [ \-p
|
.RB [ \-p
|
||||||
.IR port ]
|
.IR port ]
|
||||||
.RB [ \-d
|
.RB [ \-d
|
||||||
.RI [ user ][\fB@\fP console ]]
|
.RI [ user ][\f3@\fP console ]]
|
||||||
.RB [ \- [ bB ]
|
.RB [ \- [ bB ]
|
||||||
.IR message ]
|
.IR message ]
|
||||||
.RB [ \-t
|
.RB [ \-t
|
||||||
.RI [ user ][\fB@\fP console ]
|
.RI [ user ][\f3@\fP console ]
|
||||||
.IR message ]
|
.IR message ]
|
||||||
.br
|
.br
|
||||||
.B console
|
.B console
|
||||||
@ -391,7 +391,7 @@ Commands are:
|
|||||||
disconnect
|
disconnect
|
||||||
.TP
|
.TP
|
||||||
.B ;
|
.B ;
|
||||||
disconnect and login to another console
|
move to another console
|
||||||
.TP
|
.TP
|
||||||
.B a
|
.B a
|
||||||
attach read-write if nobody already is
|
attach read-write if nobody already is
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
%define pkg conserver
|
%define pkg conserver
|
||||||
%define ver 8.1.2
|
%define ver 8.1.4
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -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.2"
|
VERSION="8.1.4"
|
||||||
DESC="Console server and client"
|
DESC="Console server and client"
|
||||||
CLASSES=none
|
CLASSES=none
|
||||||
ARCH=sparc
|
ARCH=sparc
|
||||||
|
@ -91,7 +91,7 @@ dotest 'cdc.'
|
|||||||
dotest 'coc.'
|
dotest 'coc.'
|
||||||
|
|
||||||
dotest EVAL "echo 'tu.' | ../console/console -M 127.0.0.1 -p 7777 -e 'tu' shell"
|
dotest EVAL "echo 'tu.' | ../console/console -M 127.0.0.1 -p 7777 -e 'tu' shell"
|
||||||
dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -P | sed -e 's/:.*//'"
|
dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -R | sed -e 's/ [^ ]*$//'"
|
||||||
dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -x | sed -e 's/ on [^ ]* */ on /'"
|
dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -x | sed -e 's/ on [^ ]* */ on /'"
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
@ -1 +1 @@
|
|||||||
127.0.0.1
|
version `conserver.com version
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Enter `^Ec?' for help]
|
[Enter `^Ec?' for help]
|
||||||
[help]
|
[help]
|
||||||
. disconnect ; switch to another console
|
. disconnect ; move to another console
|
||||||
a attach read/write b send broadcast message
|
a attach read/write b send broadcast message
|
||||||
c toggle flow control d down a console
|
c toggle flow control d down a console
|
||||||
e change escape sequence f force attach read/write
|
e change escape sequence f force attach read/write
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Enter `^Ec?' for help]
|
[Enter `^Ec?' for help]
|
||||||
[help]
|
[help]
|
||||||
. disconnect ; switch to another console
|
. disconnect ; move to another console
|
||||||
a attach read/write b send broadcast message
|
a attach read/write b send broadcast message
|
||||||
c toggle flow control d down a console
|
c toggle flow control d down a console
|
||||||
e change escape sequence f force attach read/write
|
e change escape sequence f force attach read/write
|
||||||
|
Reference in New Issue
Block a user