mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-20 21:33:08 +00:00
Imported from conserver-7.0.3.tar.gz
This commit is contained in:
parent
8343145bcc
commit
6617579233
28
CHANGES
28
CHANGES
@ -1,6 +1,32 @@
|
|||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
version 7.0.3 (Jul 5, 2001):
|
||||||
|
- "Off by 1" bug in 7.0.2 line-oriented timestamp code fixed (extra
|
||||||
|
chars in logfile) reported by Matthew Cheek <cheek@mars-systems.com>
|
||||||
|
- TODO file added to distribution
|
||||||
|
- 'attached', 'detached', and 'bumped' actions now written to
|
||||||
|
console logs that have 'a' in timestamp-spec field
|
||||||
|
- Default timestamp specification with TIMESTAMP= in .cf file
|
||||||
|
- config file much more forgiving about whitespace in fields
|
||||||
|
- gethostbyaddr() failures are no longer fatal
|
||||||
|
- Added -M for server to specify the address to listen on
|
||||||
|
- Added -p option to client and server to specify the port to
|
||||||
|
connect to and listen on (--with-port still sets the default)
|
||||||
|
- Added logfile output when going into daemon mode
|
||||||
|
- Added --with-logfile to configure
|
||||||
|
- Added -L to override compile-time logfile location
|
||||||
|
- SIGHUP reopens this logfile as well as previous behavior
|
||||||
|
- Run as root only restriction removed - warning now (if necessary)
|
||||||
|
- More #defines for FreeBSD compatibility
|
||||||
|
- Using inet_ntoa() now instead of peeking at bytes
|
||||||
|
- Fixed up -V (and -Vv) output for client and server
|
||||||
|
- Increased conserver.passwd read buffer (CheckPasswd())
|
||||||
|
- Removed DO_VIRTUAL #if's - always build that code now
|
||||||
|
- Removed ORIGINAL_CODE #if's (old non-CIDR access list parsing)
|
||||||
|
- Changed undocumented -p option to -P in console client
|
||||||
|
- man pages updated to reflect a little more reality
|
||||||
|
|
||||||
version 7.0.2 (Jun 15, 2001):
|
version 7.0.2 (Jun 15, 2001):
|
||||||
- Bogus "ambiguous server abbreviation" with distributed server
|
- Bogus "ambiguous server abbreviation" with distributed server
|
||||||
setup fixed
|
setup fixed
|
||||||
@ -128,5 +154,5 @@ before version 6.05:
|
|||||||
and enhancements of various types were applied.
|
and enhancements of various types were applied.
|
||||||
|
|
||||||
#
|
#
|
||||||
# $Id: CHANGES,v 1.28 2001-06-15 17:36:53-07 bryan Exp $
|
# $Id: CHANGES,v 1.32 2001-07-05 08:09:30-07 bryan Exp $
|
||||||
#
|
#
|
||||||
|
4
INSTALL
4
INSTALL
@ -15,7 +15,7 @@ Detailed Instructions
|
|||||||
|
|
||||||
- First thing to do is determine if you want different defaults. A
|
- First thing to do is determine if you want different defaults. A
|
||||||
'./configure --help' will show you the basics. If you like all
|
'./configure --help' will show you the basics. If you like all
|
||||||
the defaults shown, your set. If not, here are the conserver
|
the defaults shown, you're set. If not, here are the conserver
|
||||||
unique options:
|
unique options:
|
||||||
|
|
||||||
--with-port=PORT Specify port number [conserver]
|
--with-port=PORT Specify port number [conserver]
|
||||||
@ -85,5 +85,5 @@ Detailed Instructions
|
|||||||
- That's it! Just start up the console server and enjoy!
|
- That's it! Just start up the console server and enjoy!
|
||||||
|
|
||||||
#
|
#
|
||||||
# $Id: INSTALL,v 1.10 2001-06-15 09:48:58-07 bryan Exp $
|
# $Id: INSTALL,v 1.11 2001-07-05 02:46:01-07 bryan Exp $
|
||||||
#
|
#
|
||||||
|
2
LICENSE
2
LICENSE
@ -38,7 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 1988, GNAC, Inc.
|
Copyright (c) 1998, GNAC, Inc.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
91
TODO
Normal file
91
TODO
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
TODO
|
||||||
|
====
|
||||||
|
|
||||||
|
Warning to those who aren't me: this is an unorganized list of things
|
||||||
|
that might be classified as bugs, improvements, random thoughts or
|
||||||
|
suggestions. Hopefully it will get cleaned up over time.
|
||||||
|
|
||||||
|
Bryan Stansell
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- reread of conserver.cf - totally difficult
|
||||||
|
- non-dynamic memory allocation
|
||||||
|
- no IPC for coordinated updates
|
||||||
|
- additions only may work
|
||||||
|
- deletions only may work
|
||||||
|
- reimplement the whole thing *would* work
|
||||||
|
|
||||||
|
- better shadow file support
|
||||||
|
|
||||||
|
- PAM support
|
||||||
|
|
||||||
|
- syslog?
|
||||||
|
|
||||||
|
- alternate (md5) password encryption support in conserver.passwd
|
||||||
|
|
||||||
|
- config file examples for various configurations
|
||||||
|
|
||||||
|
- per-line timestamps
|
||||||
|
- only when not connected?
|
||||||
|
|
||||||
|
- flow control configuration (hardcoded on, i think)
|
||||||
|
|
||||||
|
- pipe input/output (console <-> program) via 'console'
|
||||||
|
|
||||||
|
- group permissions (better user management in general)
|
||||||
|
|
||||||
|
- 64-bit compilation support (have a patch set contributed, somewhere, i think)
|
||||||
|
|
||||||
|
- autologout? setting per console? gack, would have to interpret data.
|
||||||
|
|
||||||
|
- "listen" capability (watch all/multiple consoles)
|
||||||
|
|
||||||
|
- alternate break (^ecl2?)
|
||||||
|
|
||||||
|
- aliases for console entries
|
||||||
|
|
||||||
|
- authentication to terminal servers (ssh, passphrase, whatever)
|
||||||
|
|
||||||
|
- "not" or "except" in passwd file (!console).
|
||||||
|
|
||||||
|
- master redirect for same host - big mess
|
||||||
|
- redirect for console goes to `hostname`
|
||||||
|
- should probably go to ip of connection
|
||||||
|
- addresses not allowed - has to be hostname (resolvable by client)
|
||||||
|
- can you say: gack!
|
||||||
|
|
||||||
|
- multi-homed/multi-ip hosts not supported well
|
||||||
|
- other names/ip addrs not detected as local, necessarily
|
||||||
|
|
||||||
|
- cyclades ts1000/2000 port : "Moses, Joel" <jmoses@deloitte.com>
|
||||||
|
|
||||||
|
- dynamic memory allocation
|
||||||
|
- buf[BUFSIZ] in conserver/group.c CheckPasswd().
|
||||||
|
- kill --with-maxgrp
|
||||||
|
|
||||||
|
- config file for client (list of masters, for example)
|
||||||
|
|
||||||
|
- patches from Enrik Berkhan <Enrik.Berkhan@planb.de>
|
||||||
|
- bind address
|
||||||
|
- base port for children
|
||||||
|
|
||||||
|
- strftime() idea for logfile names : Lars Kellogg-Stedman <lars@larsshack.org>
|
||||||
|
|
||||||
|
- 9600baud log replay?
|
||||||
|
|
||||||
|
- SSH/SSL/Encryption of some type between client/server
|
||||||
|
|
||||||
|
- server -M flag should accept multiple addresses (comma separated)
|
||||||
|
- should client as well?
|
||||||
|
|
||||||
|
- logfile rotation based on size
|
||||||
|
|
||||||
|
- website docs on serial port configs
|
||||||
|
- PCs (solaris x86, linux, *bsd, etc)
|
||||||
|
- lilo
|
||||||
|
- bios support
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: TODO,v 1.7 2001-07-05 07:37:34-07 bryan Exp $
|
||||||
|
#
|
@ -1,9 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Socket used to communicate
|
* Socket used to communicate
|
||||||
* Choose either PORT or SERVICE...
|
|
||||||
*/
|
*/
|
||||||
#undef SERVICENAME
|
#undef DEFPORT
|
||||||
#undef PORTNUMBER
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hostname of console server
|
* Hostname of console server
|
||||||
@ -20,6 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
#undef PASSWDFILE
|
#undef PASSWDFILE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logfile path
|
||||||
|
*/
|
||||||
|
#undef LOGFILEPATH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of consoles per child process
|
* Number of consoles per child process
|
||||||
*/
|
*/
|
||||||
|
6
compat.h
6
compat.h
@ -212,3 +212,9 @@ extern char *h_errlist[];
|
|||||||
#ifndef BSDLY
|
#ifndef BSDLY
|
||||||
#define BSDLY 0
|
#define BSDLY 0
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef ONOCR
|
||||||
|
#define ONOCR 0
|
||||||
|
#endif
|
||||||
|
#ifndef ONLRET
|
||||||
|
#define ONLRET 0
|
||||||
|
#endif
|
||||||
|
@ -30,10 +30,8 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Socket used to communicate
|
* Socket used to communicate
|
||||||
* Choose either PORT or SERVICE...
|
|
||||||
*/
|
*/
|
||||||
#undef SERVICENAME
|
#undef DEFPORT
|
||||||
#undef PORTNUMBER
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hostname of console server
|
* Hostname of console server
|
||||||
@ -50,6 +48,11 @@
|
|||||||
*/
|
*/
|
||||||
#undef PASSWDFILE
|
#undef PASSWDFILE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logfile path
|
||||||
|
*/
|
||||||
|
#undef LOGFILEPATH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Number of consoles per child process
|
* Number of consoles per child process
|
||||||
*/
|
*/
|
||||||
|
227
configure
vendored
227
configure
vendored
@ -19,6 +19,8 @@ ac_help="$ac_help
|
|||||||
--with-cffile=CFFILE Specify config filename [conserver.cf] "
|
--with-cffile=CFFILE Specify config filename [conserver.cf] "
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--with-pwdfile=PWDFILE Specify password filename [conserver.passwd] "
|
--with-pwdfile=PWDFILE Specify password filename [conserver.passwd] "
|
||||||
|
ac_help="$ac_help
|
||||||
|
--with-logfile=LOGFILE Specify log filename [/var/log/conserver] "
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid] "
|
--with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid] "
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
@ -550,42 +552,34 @@ MKDIR="mkdir -p -m 755"
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for port number specification""... $ac_c" 1>&6
|
echo $ac_n "checking for port number specification""... $ac_c" 1>&6
|
||||||
echo "configure:554: checking for port number specification" >&5
|
echo "configure:556: checking for port number specification" >&5
|
||||||
# Check whether --with-port or --without-port was given.
|
# Check whether --with-port or --without-port was given.
|
||||||
if test "${with_port+set}" = set; then
|
if test "${with_port+set}" = set; then
|
||||||
withval="$with_port"
|
withval="$with_port"
|
||||||
if test "$withval" != yes -a "$withval" != no; then
|
if test "$withval" != yes -a "$withval" != no; then
|
||||||
if expr "$withval" : '.*[^0-9]' >/dev/null 2>&1; then
|
cat >> confdefs.h <<EOF
|
||||||
cat >> confdefs.h <<EOF
|
#define DEFPORT "$withval"
|
||||||
#define SERVICENAME "$withval"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$ac_t""/etc/services name '$withval'" 1>&6
|
echo "$ac_t""port '$withval'" 1>&6
|
||||||
else
|
|
||||||
cat >> confdefs.h <<EOF
|
|
||||||
#define PORTNUMBER $withval
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "$ac_t""port $withval" 1>&6
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define SERVICENAME "conserver"
|
#define DEFPORT "conserver"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$ac_t""/etc/services name 'conserver'" 1>&6
|
echo "$ac_t""port 'conserver'" 1>&6
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define SERVICENAME "conserver"
|
#define DEFPORT "conserver"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$ac_t""/etc/services name 'conserver'" 1>&6
|
echo "$ac_t""port 'conserver'" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for master conserver hostname""... $ac_c" 1>&6
|
echo $ac_n "checking for master conserver hostname""... $ac_c" 1>&6
|
||||||
echo "configure:589: checking for master conserver hostname" >&5
|
echo "configure:583: checking for master conserver hostname" >&5
|
||||||
# Check whether --with-master or --without-master was given.
|
# Check whether --with-master or --without-master was given.
|
||||||
if test "${with_master+set}" = set; then
|
if test "${with_master+set}" = set; then
|
||||||
withval="$with_master"
|
withval="$with_master"
|
||||||
@ -612,7 +606,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for configuration filename""... $ac_c" 1>&6
|
echo $ac_n "checking for configuration filename""... $ac_c" 1>&6
|
||||||
echo "configure:616: checking for configuration filename" >&5
|
echo "configure:610: checking for configuration filename" >&5
|
||||||
# Check whether --with-cffile or --without-cffile was given.
|
# Check whether --with-cffile or --without-cffile was given.
|
||||||
if test "${with_cffile+set}" = set; then
|
if test "${with_cffile+set}" = set; then
|
||||||
withval="$with_cffile"
|
withval="$with_cffile"
|
||||||
@ -639,7 +633,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for password filename""... $ac_c" 1>&6
|
echo $ac_n "checking for password filename""... $ac_c" 1>&6
|
||||||
echo "configure:643: checking for password filename" >&5
|
echo "configure:637: checking for password filename" >&5
|
||||||
# Check whether --with-pwdfile or --without-pwdfile was given.
|
# Check whether --with-pwdfile or --without-pwdfile was given.
|
||||||
if test "${with_pwdfile+set}" = set; then
|
if test "${with_pwdfile+set}" = set; then
|
||||||
withval="$with_pwdfile"
|
withval="$with_pwdfile"
|
||||||
@ -665,8 +659,35 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo $ac_n "checking for log filename""... $ac_c" 1>&6
|
||||||
|
echo "configure:664: checking for log filename" >&5
|
||||||
|
# Check whether --with-logfile or --without-logfile was given.
|
||||||
|
if test "${with_logfile+set}" = set; then
|
||||||
|
withval="$with_logfile"
|
||||||
|
if test "$withval" != yes; then
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define LOGFILEPATH "$withval"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$ac_t""'$withval'" 1>&6
|
||||||
|
else
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define LOGFILEPATH "/var/log/conserver"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$ac_t""'/var/log/conserver'" 1>&6
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define LOGFILEPATH "/var/log/conserver"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$ac_t""'/var/log/conserver'" 1>&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for PID filename""... $ac_c" 1>&6
|
echo $ac_n "checking for PID filename""... $ac_c" 1>&6
|
||||||
echo "configure:670: checking for PID filename" >&5
|
echo "configure:691: checking for PID filename" >&5
|
||||||
# Check whether --with-pidfile or --without-pidfile was given.
|
# Check whether --with-pidfile or --without-pidfile was given.
|
||||||
if test "${with_pidfile+set}" = set; then
|
if test "${with_pidfile+set}" = set; then
|
||||||
withval="$with_pidfile"
|
withval="$with_pidfile"
|
||||||
@ -693,7 +714,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for MAXMEMB setting""... $ac_c" 1>&6
|
echo $ac_n "checking for MAXMEMB setting""... $ac_c" 1>&6
|
||||||
echo "configure:697: checking for MAXMEMB setting" >&5
|
echo "configure:718: checking for MAXMEMB setting" >&5
|
||||||
# Check whether --with-maxmemb or --without-maxmemb was given.
|
# Check whether --with-maxmemb or --without-maxmemb was given.
|
||||||
if test "${with_maxmemb+set}" = set; then
|
if test "${with_maxmemb+set}" = set; then
|
||||||
withval="$with_maxmemb"
|
withval="$with_maxmemb"
|
||||||
@ -720,7 +741,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for MAXGRP setting""... $ac_c" 1>&6
|
echo $ac_n "checking for MAXGRP setting""... $ac_c" 1>&6
|
||||||
echo "configure:724: checking for MAXGRP setting" >&5
|
echo "configure:745: checking for MAXGRP setting" >&5
|
||||||
# Check whether --with-maxgrp or --without-maxgrp was given.
|
# Check whether --with-maxgrp or --without-maxgrp was given.
|
||||||
if test "${with_maxgrp+set}" = set; then
|
if test "${with_maxgrp+set}" = set; then
|
||||||
withval="$with_maxgrp"
|
withval="$with_maxgrp"
|
||||||
@ -747,7 +768,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for 8bit setting""... $ac_c" 1>&6
|
echo $ac_n "checking for 8bit setting""... $ac_c" 1>&6
|
||||||
echo "configure:751: checking for 8bit setting" >&5
|
echo "configure:772: checking for 8bit setting" >&5
|
||||||
# Check whether --enable-8bit or --disable-8bit was given.
|
# Check whether --enable-8bit or --disable-8bit was given.
|
||||||
if test "${enable_8bit+set}" = set; then
|
if test "${enable_8bit+set}" = set; then
|
||||||
enableval="$enable_8bit"
|
enableval="$enable_8bit"
|
||||||
@ -774,7 +795,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for connect() timeout""... $ac_c" 1>&6
|
echo $ac_n "checking for connect() timeout""... $ac_c" 1>&6
|
||||||
echo "configure:778: checking for connect() timeout" >&5
|
echo "configure:799: checking for connect() timeout" >&5
|
||||||
# Check whether --with-timeout or --without-timeout was given.
|
# Check whether --with-timeout or --without-timeout was given.
|
||||||
if test "${with_timeout+set}" = set; then
|
if test "${with_timeout+set}" = set; then
|
||||||
withval="$with_timeout"
|
withval="$with_timeout"
|
||||||
@ -803,7 +824,7 @@ fi
|
|||||||
# Extract the first word of "gcc", so it can be a program name with args.
|
# Extract the first word of "gcc", so it can be a program name with args.
|
||||||
set dummy gcc; ac_word=$2
|
set dummy gcc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:807: checking for $ac_word" >&5
|
echo "configure:828: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -833,7 +854,7 @@ if test -z "$CC"; then
|
|||||||
# Extract the first word of "cc", so it can be a program name with args.
|
# Extract the first word of "cc", so it can be a program name with args.
|
||||||
set dummy cc; ac_word=$2
|
set dummy cc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:837: checking for $ac_word" >&5
|
echo "configure:858: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -884,7 +905,7 @@ fi
|
|||||||
# Extract the first word of "cl", so it can be a program name with args.
|
# Extract the first word of "cl", so it can be a program name with args.
|
||||||
set dummy cl; ac_word=$2
|
set dummy cl; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:888: checking for $ac_word" >&5
|
echo "configure:909: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -916,7 +937,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||||
echo "configure:920: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
@ -927,12 +948,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
|||||||
|
|
||||||
cat > conftest.$ac_ext << EOF
|
cat > conftest.$ac_ext << EOF
|
||||||
|
|
||||||
#line 931 "configure"
|
#line 952 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
main(){return(0);}
|
main(){return(0);}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
ac_cv_prog_cc_works=yes
|
ac_cv_prog_cc_works=yes
|
||||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||||
if (./conftest; exit) 2>/dev/null; then
|
if (./conftest; exit) 2>/dev/null; then
|
||||||
@ -958,12 +979,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||||
echo "configure:962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||||
cross_compiling=$ac_cv_prog_cc_cross
|
cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||||
echo "configure:967: checking whether we are using GNU C" >&5
|
echo "configure:988: checking whether we are using GNU C" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -972,7 +993,7 @@ else
|
|||||||
yes;
|
yes;
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||||
ac_cv_prog_gcc=yes
|
ac_cv_prog_gcc=yes
|
||||||
else
|
else
|
||||||
ac_cv_prog_gcc=no
|
ac_cv_prog_gcc=no
|
||||||
@ -991,7 +1012,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
|||||||
ac_save_CFLAGS="$CFLAGS"
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS=
|
CFLAGS=
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||||
echo "configure:995: checking whether ${CC-cc} accepts -g" >&5
|
echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1053,7 +1074,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
|||||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||||
# ./install, which can be erroneously created by make from ./install.sh.
|
# ./install, which can be erroneously created by make from ./install.sh.
|
||||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||||
echo "configure:1057: checking for a BSD compatible install" >&5
|
echo "configure:1078: checking for a BSD compatible install" >&5
|
||||||
if test -z "$INSTALL"; then
|
if test -z "$INSTALL"; then
|
||||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1106,7 +1127,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
|||||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||||
echo "configure:1110: checking whether ln -s works" >&5
|
echo "configure:1131: checking whether ln -s works" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1127,7 +1148,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||||
echo "configure:1131: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1156,7 +1177,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||||
echo "configure:1160: checking how to run the C preprocessor" >&5
|
echo "configure:1181: checking how to run the C preprocessor" >&5
|
||||||
# On Suns, sometimes $CPP names a directory.
|
# On Suns, sometimes $CPP names a directory.
|
||||||
if test -n "$CPP" && test -d "$CPP"; then
|
if test -n "$CPP" && test -d "$CPP"; then
|
||||||
CPP=
|
CPP=
|
||||||
@ -1171,13 +1192,13 @@ else
|
|||||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||||
# not just through cpp.
|
# not just through cpp.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1175 "configure"
|
#line 1196 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -1188,13 +1209,13 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -E -traditional-cpp"
|
CPP="${CC-cc} -E -traditional-cpp"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1192 "configure"
|
#line 1213 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -1205,13 +1226,13 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -nologo -E"
|
CPP="${CC-cc} -nologo -E"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1209 "configure"
|
#line 1230 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
:
|
:
|
||||||
@ -1236,9 +1257,9 @@ fi
|
|||||||
echo "$ac_t""$CPP" 1>&6
|
echo "$ac_t""$CPP" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for AIX""... $ac_c" 1>&6
|
echo $ac_n "checking for AIX""... $ac_c" 1>&6
|
||||||
echo "configure:1240: checking for AIX" >&5
|
echo "configure:1261: checking for AIX" >&5
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1242 "configure"
|
#line 1263 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#ifdef _AIX
|
#ifdef _AIX
|
||||||
yes
|
yes
|
||||||
@ -1260,12 +1281,12 @@ rm -f conftest*
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||||
echo "configure:1264: checking for working const" >&5
|
echo "configure:1285: checking for working const" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1269 "configure"
|
#line 1290 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
@ -1314,7 +1335,7 @@ ccp = (char const *const *) p;
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_const=yes
|
ac_cv_c_const=yes
|
||||||
else
|
else
|
||||||
@ -1337,12 +1358,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||||
echo "configure:1341: checking for ANSI C header files" >&5
|
echo "configure:1362: checking for ANSI C header files" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1346 "configure"
|
#line 1367 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@ -1350,7 +1371,7 @@ else
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1367,7 +1388,7 @@ rm -f conftest*
|
|||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1371 "configure"
|
#line 1392 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
EOF
|
EOF
|
||||||
@ -1385,7 +1406,7 @@ fi
|
|||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1389 "configure"
|
#line 1410 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
EOF
|
EOF
|
||||||
@ -1406,7 +1427,7 @@ if test "$cross_compiling" = yes; then
|
|||||||
:
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1410 "configure"
|
#line 1431 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||||
@ -1417,7 +1438,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||||||
exit (0); }
|
exit (0); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
@ -1444,17 +1465,17 @@ for ac_hdr in sys/ioctl.h
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1448: checking for $ac_hdr" >&5
|
echo "configure:1469: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1453 "configure"
|
#line 1474 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1485,17 +1506,17 @@ for ac_hdr in termios.h
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1489: checking for $ac_hdr" >&5
|
echo "configure:1510: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1494 "configure"
|
#line 1515 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1526,17 +1547,17 @@ if test "$ac_cv_header_termios_h" != "yes"; then
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1530: checking for $ac_hdr" >&5
|
echo "configure:1551: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1535 "configure"
|
#line 1556 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1567,17 +1588,17 @@ done
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1571: checking for $ac_hdr" >&5
|
echo "configure:1592: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1576 "configure"
|
#line 1597 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1613,17 +1634,17 @@ for ac_hdr in unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1617: checking for $ac_hdr" >&5
|
echo "configure:1638: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1622 "configure"
|
#line 1643 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@ -1650,12 +1671,12 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
||||||
echo "configure:1654: checking whether time.h and sys/time.h may both be included" >&5
|
echo "configure:1675: checking whether time.h and sys/time.h may both be included" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1659 "configure"
|
#line 1680 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -1664,7 +1685,7 @@ int main() {
|
|||||||
struct tm *tp;
|
struct tm *tp;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_header_time=yes
|
ac_cv_header_time=yes
|
||||||
else
|
else
|
||||||
@ -1685,12 +1706,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
|
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
|
||||||
echo "configure:1689: checking for sys/wait.h that is POSIX.1 compatible" >&5
|
echo "configure:1710: checking for sys/wait.h that is POSIX.1 compatible" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1694 "configure"
|
#line 1715 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
@ -1706,7 +1727,7 @@ wait (&s);
|
|||||||
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
|
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_header_sys_wait_h=yes
|
ac_cv_header_sys_wait_h=yes
|
||||||
else
|
else
|
||||||
@ -1727,12 +1748,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
|
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
|
||||||
echo "configure:1731: checking for mode_t" >&5
|
echo "configure:1752: checking for mode_t" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1736 "configure"
|
#line 1757 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if STDC_HEADERS
|
#if STDC_HEADERS
|
||||||
@ -1760,12 +1781,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
||||||
echo "configure:1764: checking return type of signal handlers" >&5
|
echo "configure:1785: checking return type of signal handlers" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1769 "configure"
|
#line 1790 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -1782,7 +1803,7 @@ int main() {
|
|||||||
int i;
|
int i;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_type_signal=void
|
ac_cv_type_signal=void
|
||||||
else
|
else
|
||||||
@ -1802,12 +1823,12 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking if sig_atomic_t is defined""... $ac_c" 1>&6
|
echo $ac_n "checking if sig_atomic_t is defined""... $ac_c" 1>&6
|
||||||
echo "configure:1806: checking if sig_atomic_t is defined" >&5
|
echo "configure:1827: checking if sig_atomic_t is defined" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_type_sig_atomic_t'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_type_sig_atomic_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1811 "configure"
|
#line 1832 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -1819,7 +1840,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_type_sig_atomic_t=yes
|
ac_cv_type_sig_atomic_t=yes
|
||||||
else
|
else
|
||||||
@ -1842,12 +1863,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6
|
echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6
|
||||||
echo "configure:1846: checking if socklen_t is defined" >&5
|
echo "configure:1867: checking if socklen_t is defined" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1851 "configure"
|
#line 1872 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -1860,7 +1881,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_type_socklen_t=yes
|
ac_cv_type_socklen_t=yes
|
||||||
else
|
else
|
||||||
@ -1885,7 +1906,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
|
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
|
||||||
echo "configure:1889: checking for socket in -lsocket" >&5
|
echo "configure:1910: checking for socket in -lsocket" >&5
|
||||||
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1893,7 +1914,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lsocket $LIBS"
|
LIBS="-lsocket $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1897 "configure"
|
#line 1918 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -1904,7 +1925,7 @@ int main() {
|
|||||||
socket()
|
socket()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -1932,7 +1953,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
|
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
|
||||||
echo "configure:1936: checking for gethostbyname in -lnsl" >&5
|
echo "configure:1957: checking for gethostbyname in -lnsl" >&5
|
||||||
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1940,7 +1961,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lnsl $LIBS"
|
LIBS="-lnsl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1944 "configure"
|
#line 1965 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -1951,7 +1972,7 @@ int main() {
|
|||||||
gethostbyname()
|
gethostbyname()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -1979,7 +2000,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
|
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
|
||||||
echo "configure:1983: checking for crypt in -lcrypt" >&5
|
echo "configure:2004: checking for crypt in -lcrypt" >&5
|
||||||
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1987,7 +2008,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lcrypt $LIBS"
|
LIBS="-lcrypt $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1991 "configure"
|
#line 2012 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -1998,7 +2019,7 @@ int main() {
|
|||||||
crypt()
|
crypt()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -2030,12 +2051,12 @@ fi
|
|||||||
for ac_func in getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent wait3 getspnam setlinebuf setvbuf getpseudo ptsname flock sigaction setsockopt getdtablesize putenv memset memcpy memcmp
|
for ac_func in getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent wait3 getspnam setlinebuf setvbuf getpseudo ptsname flock sigaction setsockopt getdtablesize putenv memset memcpy memcmp
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:2034: checking for $ac_func" >&5
|
echo "configure:2055: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2039 "configure"
|
#line 2060 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@ -2058,7 +2079,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@ -2083,7 +2104,7 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
|
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
|
||||||
echo "configure:2087: checking whether setpgrp takes no argument" >&5
|
echo "configure:2108: checking whether setpgrp takes no argument" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -2091,7 +2112,7 @@ else
|
|||||||
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
|
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2095 "configure"
|
#line 2116 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
@ -2111,7 +2132,7 @@ main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_func_setpgrp_void=no
|
ac_cv_func_setpgrp_void=no
|
||||||
else
|
else
|
||||||
|
30
configure.in
30
configure.in
@ -16,19 +16,14 @@ AC_MSG_CHECKING(for port number specification)
|
|||||||
AC_ARG_WITH(port,
|
AC_ARG_WITH(port,
|
||||||
[ --with-port=PORT Specify port number [conserver]],
|
[ --with-port=PORT Specify port number [conserver]],
|
||||||
[if test "$withval" != yes -a "$withval" != no; then
|
[if test "$withval" != yes -a "$withval" != no; then
|
||||||
if expr "$withval" : '.*[[^0-9]]' >/dev/null 2>&1; then
|
AC_DEFINE_UNQUOTED(DEFPORT, "$withval")
|
||||||
AC_DEFINE_UNQUOTED(SERVICENAME, "$withval")
|
AC_MSG_RESULT(port '$withval')
|
||||||
AC_MSG_RESULT(/etc/services name '$withval')
|
|
||||||
else
|
|
||||||
AC_DEFINE_UNQUOTED(PORTNUMBER, $withval)
|
|
||||||
AC_MSG_RESULT(port $withval)
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
AC_DEFINE_UNQUOTED(SERVICENAME, "conserver")
|
AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
|
||||||
AC_MSG_RESULT(/etc/services name 'conserver')
|
AC_MSG_RESULT(port 'conserver')
|
||||||
fi],
|
fi],
|
||||||
[AC_DEFINE_UNQUOTED(SERVICENAME, "conserver")
|
[AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
|
||||||
AC_MSG_RESULT(/etc/services name 'conserver')])
|
AC_MSG_RESULT(port 'conserver')])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for master conserver hostname)
|
AC_MSG_CHECKING(for master conserver hostname)
|
||||||
AC_ARG_WITH(master,
|
AC_ARG_WITH(master,
|
||||||
@ -69,6 +64,19 @@ AC_ARG_WITH(pwdfile,
|
|||||||
[AC_DEFINE_UNQUOTED(PASSWDFILE, "conserver.passwd")
|
[AC_DEFINE_UNQUOTED(PASSWDFILE, "conserver.passwd")
|
||||||
AC_MSG_RESULT('conserver.passwd')])
|
AC_MSG_RESULT('conserver.passwd')])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for log filename)
|
||||||
|
AC_ARG_WITH(logfile,
|
||||||
|
[ --with-logfile=LOGFILE Specify log filename [/var/log/conserver] ],
|
||||||
|
[if test "$withval" != yes; then
|
||||||
|
AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval")
|
||||||
|
AC_MSG_RESULT('$withval')
|
||||||
|
else
|
||||||
|
AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
|
||||||
|
AC_MSG_RESULT('/var/log/conserver')
|
||||||
|
fi],
|
||||||
|
[AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
|
||||||
|
AC_MSG_RESULT('/var/log/conserver')])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for PID filename)
|
AC_MSG_CHECKING(for PID filename)
|
||||||
AC_ARG_WITH(pidfile,
|
AC_ARG_WITH(pidfile,
|
||||||
[ --with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid] ],
|
[ --with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid] ],
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# $Id: INSTALL,v 4.1 91/06/19 14:20:54 ksb Exp $
|
|
||||||
|
|
||||||
Prep:
|
|
||||||
|
|
||||||
Start in the conserver directory.
|
|
||||||
|
|
||||||
Now read conserver.cf.5l (if you have mk(1L) installed just mk it).
|
|
||||||
Run:
|
|
||||||
$ tbl conserver.cf.5l |nroff -man |${PAGER-more}
|
|
||||||
|
|
||||||
Now edit dummy.cf and follow the instructions there.
|
|
||||||
[If you are just shopping stop here.]
|
|
||||||
|
|
||||||
Now edit conserver.cf and put your real hosts in there.
|
|
||||||
|
|
||||||
Edit the Makefile and change LIB.
|
|
||||||
|
|
||||||
|
|
||||||
Compile:
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
|
|
||||||
Install:
|
|
||||||
|
|
||||||
Make install.
|
|
@ -1,16 +0,0 @@
|
|||||||
# $Id: README,v 4.1 91/06/19 14:21:06 ksb Exp $
|
|
||||||
|
|
||||||
This configuration file has been extended from the Ohio State version. We
|
|
||||||
allow parity and baud to be set, as well as more than one console server
|
|
||||||
machine to be in play at a time. We have too many console servers to use
|
|
||||||
just a single Sun3... :-).
|
|
||||||
|
|
||||||
|
|
||||||
We also allow another section for trusted hosts. We allow our operators root
|
|
||||||
access by physical access to a workstation.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
"So I try to say `Goodbye, my friend.'
|
|
||||||
I'd like to leave you with something more..."
|
|
||||||
kayessbee, Kevin Braunsdorf, ksb@cc.purdue.edu, pur-ee!ksb, purdue!ksb
|
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: conserver.cf,v 1.3 1999-01-25 14:38:19-08 bryan Exp $
|
# $Id: conserver.cf,v 1.4 2001-06-28 10:24:01-07 bryan Exp $
|
||||||
#
|
#
|
||||||
# The character '&' in logfile names are substituted with the console
|
# The character '&' in logfile names are substituted with the console
|
||||||
# name. Any logfile name that doesn't begin with a '/' has LOGDIR
|
# name. Any logfile name that doesn't begin with a '/' has LOGDIR
|
||||||
@ -9,9 +9,9 @@
|
|||||||
LOGDIR=/var/consoles
|
LOGDIR=/var/consoles
|
||||||
#
|
#
|
||||||
# list of consoles we serve
|
# list of consoles we serve
|
||||||
# name : tty[@host] : baud[parity] : logfile : mark-interval[m|h|d]
|
# name : tty[@host] : baud[parity] : logfile : [mark-interval(m|h|d|l)][+]
|
||||||
# name : !host : port : logfile : mark-interval[m|h|d]
|
# name : !host : port : logfile : [mark-interval(m|h|d|l)][+]
|
||||||
# name : |command : : logfile : mark-interval[m|h|d]
|
# name : |command : : logfile : [mark-interval(m|h|d|l)][+]
|
||||||
#
|
#
|
||||||
tweety:!ts1:2002:&:
|
tweety:!ts1:2002:&:
|
||||||
bambam:!ts1:2003:&:
|
bambam:!ts1:2003:&:
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
.\" $Id: conserver.cf.man,v 1.7 2001-06-15 07:11:37-07 bryan Exp $
|
.\" $Id: conserver.cf.man,v 1.10 2001-07-05 01:39:00-07 bryan Exp $
|
||||||
.\" @(#)constab.5 01/06/91 OSU CIS; Thomas A. Fine
|
.\" @(#)constab.5 01/06/91 OSU CIS; Thomas A. Fine
|
||||||
.TH CONSERVER.CF 4 "Local"
|
.TH CONSERVER.CF 4 "Local"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver.cf \- table of server console terminals used by conserver(8L)
|
conserver.cf \- table of server console terminals used by conserver(8)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.br
|
.br
|
||||||
LOGDIR=\fIlogdirectory\fP
|
LOGDIR=\fIlogdirectory\fP
|
||||||
.br
|
.br
|
||||||
\fIserver\fP:\fIdevice\fP[@\fIconserver\fP]:\fIbaud\fP:\fIlogfile\fP:\fImark-interval\fP[\fIm|h|d|l\fP]
|
TIMESTAMP=\fItimestamp-spec\fP
|
||||||
.br
|
.br
|
||||||
\fIserver\fP:!\fIhost\fP[@\fIconserver\fP]:\fIport\fP:\fIlogfile\fP:\fImark-interval\fP[\fIm|h|d|l\fP]
|
\fIserver\fP:\fIdevice\fP[@\fIconserver\fP]:\fIbaud\fP:\fIlogfile\fP:\fItimestamp-spec\fP
|
||||||
.br
|
.br
|
||||||
\fIserver\fP:|\fIcommand\fP[@\fIconserver\fP]::\fIlogfile\fP:\fImark-interval\fP[\fIm|h|d|l\fP]
|
\fIserver\fP:!\fIhost\fP[@\fIconserver\fP]:\fIport\fP:\fIlogfile\fP:\fItimestamp-spec\fP
|
||||||
|
.br
|
||||||
|
\fIserver\fP:|\fIcommand\fP[@\fIconserver\fP]::\fIlogfile\fP:\fItimestamp-spec\fP
|
||||||
.br
|
.br
|
||||||
\fB%%\fP
|
\fB%%\fP
|
||||||
.br
|
.br
|
||||||
@ -19,7 +21,7 @@ LOGDIR=\fIlogdirectory\fP
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Conserver.cf
|
.B Conserver.cf
|
||||||
is the configuration file for
|
is the configuration file for
|
||||||
.IR conserver (8L).
|
.IR conserver (8).
|
||||||
All lines starting with the pound sign `#' are considered comment lines.
|
All lines starting with the pound sign `#' are considered comment lines.
|
||||||
Blank lines are ignored.
|
Blank lines are ignored.
|
||||||
.PP
|
.PP
|
||||||
@ -33,7 +35,7 @@ it is used to refer to the server when using the console program.
|
|||||||
The \fIbaud\fP rate is the speed and parity for this console.
|
The \fIbaud\fP rate is the speed and parity for this console.
|
||||||
Speed may be given as an integer,
|
Speed may be given as an integer,
|
||||||
parity only requires the first letter of any of: even, odd, mark, space.
|
parity only requires the first letter of any of: even, odd, mark, space.
|
||||||
For no parity, use the character 'p'.
|
For no parity, use the character `p'.
|
||||||
.PP
|
.PP
|
||||||
!\fIhost\fP - the hostname of the server to connect to.
|
!\fIhost\fP - the hostname of the server to connect to.
|
||||||
A socket connection will be made to port \fIport\fP (an integer).
|
A socket connection will be made to port \fIport\fP (an integer).
|
||||||
@ -49,14 +51,23 @@ this server is logged. Any occurance of `&' will be replaced with
|
|||||||
the \fIserver\fP name. Any path that doesn't begin with a `/' will
|
the \fIserver\fP name. Any path that doesn't begin with a `/' will
|
||||||
have \fIlogdirectory\fP (value of LOGDIR) prepended to it.
|
have \fIlogdirectory\fP (value of LOGDIR) prepended to it.
|
||||||
.PP
|
.PP
|
||||||
\fImark-interval\fP[\fIm|h|d|l\fP] - specifies the time between
|
\fItimestamp-spec\fP - specifies the time between
|
||||||
timestamps applied to the console log file. The timestamps look like
|
timestamps applied to the console log file and activity logging.
|
||||||
`[-- MARK -- Mon Jan 25 14:46:56 PST 1999]'. The `m', `h', and `d' tags
|
The format of the specification is
|
||||||
specify `minutes', `hours', and `days'. The `l' tag specifies `lines'
|
[\fImark-interval\fP(\fIm\fP|\fIh\fP|\fId\fP|\fIl\fP)][\fIa\fP].
|
||||||
and will cause timestamps of the form `[Mon Jan 25 14:46:56 PST 1999]' to
|
The timestamps look like `[-- MARK -- Mon Jan 25 14:46:56 PST 1999]'. The `m',
|
||||||
|
`h', and `d' tags specify `minutes', `hours', and `days'. The `l' tag
|
||||||
|
specifies `lines' and will cause timestamps of the form
|
||||||
|
`[Mon Jan 25 14:46:56 PST 1999]' to
|
||||||
be placed every \fImark-interval\fP lines (a newline character signifies
|
be placed every \fImark-interval\fP lines (a newline character signifies
|
||||||
a new line). So, `5h' specifies every 5 hours and `2l' specifies every
|
a new line). So, `5h' specifies every 5 hours and `2l' specifies every
|
||||||
two lines.
|
two lines. An `a' can be specified to add activity logs to the
|
||||||
|
logfile: `attached', `detached', and `bumped' messages.
|
||||||
|
.PP
|
||||||
|
A default \fItimestamp-spec\fP can be specified by using the TIMESTAMP=
|
||||||
|
syntax. All consoles below the TIMESTAMP= line will have use that
|
||||||
|
\fItimestamp-spec\fP unless overridden. To turn off marks for a specific
|
||||||
|
console, use a \fImark-interval\fP of zero.
|
||||||
.PP
|
.PP
|
||||||
This section is terminated with a `%%' token on a line by itself.
|
This section is terminated with a `%%' token on a line by itself.
|
||||||
.PP
|
.PP
|
||||||
@ -134,4 +145,4 @@ trusted: console.cc.purdue.edu 128.210.7.90
|
|||||||
.br
|
.br
|
||||||
allow: cc.purdue.edu stat.cc.purdue.edu
|
allow: cc.purdue.edu stat.cc.purdue.edu
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
console(1L), conserver(8L)
|
console(1), conserver(8)
|
||||||
|
@ -23,10 +23,27 @@
|
|||||||
<TABLE SUMMARY="Logo" BGCOLOR="black" WIDTH="100%" ALIGN="CENTER"><TR><TD ALIGN="CENTER">
|
<TABLE SUMMARY="Logo" BGCOLOR="black" WIDTH="100%" ALIGN="CENTER"><TR><TD ALIGN="CENTER">
|
||||||
<BR><IMG SRC="conserver.gif" ALT="Conserver"><BR><BR></TD></TR></TABLE><BR>
|
<BR><IMG SRC="conserver.gif" ALT="Conserver"><BR><BR></TD></TR></TABLE><BR>
|
||||||
|
|
||||||
<TABLE SUMMARY="Conserver Page" WIDTH="80%" ALIGN="CENTER"><TR><TD>
|
<TABLE SUMMARY="Conserver Page" WIDTH="80%" ALIGN="CENTER">
|
||||||
|
<TR><TD>
|
||||||
|
|
||||||
<H3>What is conserver?</H3>
|
<H3>What is conserver?</H3>
|
||||||
|
|
||||||
|
</TD>
|
||||||
|
|
||||||
|
<TD ALIGN="RIGHT">
|
||||||
|
<FORM METHOD="POST" ACTION="http://www.conserver.com/cgi-bin/htsearch">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="method" VALUE="and">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="format" VALUE="builtin-long">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="sort" VALUE="score">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="config" VALUE="htdig">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="restrict" VALUE="">
|
||||||
|
<INPUT TYPE="HIDDEN" NAME="exclude" VALUE="">
|
||||||
|
<INPUT TYPE="TEXT" SIZE="20" name="words" VALUE="">
|
||||||
|
<INPUT TYPE="SUBMIT" VALUE="Search">
|
||||||
|
</FORM>
|
||||||
|
</TD></TR>
|
||||||
|
<TR><TD COLSPAN=2>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
From an email I once sent...
|
From an email I once sent...
|
||||||
@ -72,30 +89,25 @@ HREF="https://www.conserver.com/mailman/listinfo">web pages</A>.
|
|||||||
|
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>Wanna Search?</H3>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
Give the <A HREF="http://www.conserver.com/htdig/">search engine</A> a
|
|
||||||
try. You can hunt through the mailing list archives as well as the
|
|
||||||
files referenced here.
|
|
||||||
|
|
||||||
</P>
|
|
||||||
|
|
||||||
|
|
||||||
<H3>Origin</H3>
|
<H3>Origin</H3>
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
The console server software found here is a heavily modified version
|
The console server software found here is a heavily modified version
|
||||||
originally written by Tom Fine (fine@head-cfa.harvard.edu) and then
|
originally written by <A HREF="http://hea-www.harvard.edu/~fine/">Tom
|
||||||
Kevin S Braunsdorf (ksb+conserver@sa.fedex.com). Patches from Robert
|
Fine</A> (<A
|
||||||
Olson (olson@mcs.anl.gov) were then applied to get network console
|
HREF="mailto:fine@head-cfa.harvard.edu">fine@head-cfa.harvard.edu</A>)
|
||||||
support.
|
at Ohio State and then Kevin S Braunsdorf (<A
|
||||||
|
HREF="mailto:ksb+conserver@sa.fedex.com">ksb+conserver@sa.fedex.com</A>).
|
||||||
|
Patches from Robert Olson (<A
|
||||||
|
HREF="mailto:olson@mcs.anl.gov">olson@mcs.anl.gov</A>) were then
|
||||||
|
applied to get network console support.
|
||||||
|
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
Arnold de Leon (arnold@corp.webtv.net) then fixed various bugs and
|
Arnold de Leon (<A
|
||||||
added enhancements while at <A
|
HREF="mailto:arnold@corp.webtv.net">arnold@corp.webtv.net</A>) then
|
||||||
|
fixed various bugs and added enhancements while at <A
|
||||||
HREF="http://www.synopsys.com/">Synopsys</A>. I then took the result,
|
HREF="http://www.synopsys.com/">Synopsys</A>. I then took the result,
|
||||||
continued fixing things, and added features we found useful.
|
continued fixing things, and added features we found useful.
|
||||||
|
|
||||||
@ -131,10 +143,10 @@ GNAC name - sad, but true.
|
|||||||
|
|
||||||
<P>
|
<P>
|
||||||
The current version is <A
|
The current version is <A
|
||||||
HREF="http://www.conserver.com/7.0.2.tar.gz">
|
HREF="http://www.conserver.com/7.0.3.tar.gz">
|
||||||
7.0.2.tar.gz</A>. You can get it via <A
|
7.0.3.tar.gz</A>. You can get it via <A
|
||||||
HREF="ftp://ftp.conserver.com/conserver/7.0.2.tar.gz">FTP</A>
|
HREF="ftp://ftp.conserver.com/conserver/7.0.3.tar.gz">FTP</A>
|
||||||
or <A HREF="http://www.conserver.com/7.0.2.tar.gz">HTTP</A>.
|
or <A HREF="http://www.conserver.com/7.0.3.tar.gz">HTTP</A>.
|
||||||
See the <A HREF="http://www.conserver.com/CHANGES">CHANGES</A> file for
|
See the <A HREF="http://www.conserver.com/CHANGES">CHANGES</A> file for
|
||||||
information on the latest updates.
|
information on the latest updates.
|
||||||
</P>
|
</P>
|
||||||
|
@ -1,114 +0,0 @@
|
|||||||
# $Id: INSTALL,v 4.4 94/07/19 14:48:29 ksb Exp $
|
|
||||||
#
|
|
||||||
# lpr this file, you need to read it with other stuff on the screen.
|
|
||||||
#
|
|
||||||
|
|
||||||
Basic installation:
|
|
||||||
|
|
||||||
First off, this stuff isn't guaranteed to work, or compile or anything.
|
|
||||||
Second, the Makefile doesn't even really do that much, because most people
|
|
||||||
with large networks don't have very normal configurations (that's a lot like
|
|
||||||
an excuse :-). Third, I assume you have the hardware set up done, and don't
|
|
||||||
need any help there (just use normal serial lines, or see Sun-serial).
|
|
||||||
|
|
||||||
With that out of the way, let's get started.
|
|
||||||
|
|
||||||
|
|
||||||
Prep:
|
|
||||||
|
|
||||||
If you are a serious kinda guy you will want to add the console service to
|
|
||||||
/etc/services, here is the line we use:
|
|
||||||
console 782/tcp conserver # console server
|
|
||||||
|
|
||||||
Otherwise you'll have to hard code a PORT in cons.h (there are a comments
|
|
||||||
at the apropos points.
|
|
||||||
|
|
||||||
If you do not have the PUCC ptyd daemon (and I'll bet you don't) you have
|
|
||||||
to edit the Makefile, look at the block that sets HAVE_PTYD.
|
|
||||||
|
|
||||||
Later, on the console server you will have to add a line to /etc/rc.local,
|
|
||||||
or an atboot/cronboot job to start the console server
|
|
||||||
nice --4 /usr/local/etc/conserver >/dev/console 2>&1 </dev/null &
|
|
||||||
|
|
||||||
[we run it from roots .profile on an auto-login port.]
|
|
||||||
|
|
||||||
|
|
||||||
Compiling:
|
|
||||||
|
|
||||||
Save a copy of cons.h and edit the one in this directory to your desires.
|
|
||||||
It should be self-explanatory.
|
|
||||||
|
|
||||||
Edit Makefile, setting BIN and PROG.
|
|
||||||
|
|
||||||
Type "make". This compiles the server. If you fail on `XTABS' in
|
|
||||||
group.c either change XTABS to TAB3 or #if 0 the block. I've not
|
|
||||||
had time to track this down.
|
|
||||||
|
|
||||||
cd ../conserver.cf and follow the INSTALL there. (Then come back here.)
|
|
||||||
|
|
||||||
cd ../console and follow INSTALL there. (Then come back here.)
|
|
||||||
|
|
||||||
If you changed from using /usr/local/{bin,etc} you may want to change the
|
|
||||||
"FILES" section in the man page "conserver.8L".
|
|
||||||
|
|
||||||
If everything went well, type "make install" in each directory. You will
|
|
||||||
probably need to run this as root, depending on where you're putting stuff.
|
|
||||||
|
|
||||||
This only installs things on the local machine (unless you have a kinky
|
|
||||||
system configuration). You will have to distribute at least the client
|
|
||||||
program to your other machines. {Compile on unlike CPU types, of course.}
|
|
||||||
|
|
||||||
|
|
||||||
How did we do?
|
|
||||||
|
|
||||||
Now run:
|
|
||||||
conserver -V
|
|
||||||
|
|
||||||
You should get something like:
|
|
||||||
conserver: $Id: INSTALL,v 4.4 94/07/19 14:48:29 ksb Exp $
|
|
||||||
conserver: default access type `r'
|
|
||||||
conserver: default escape sequence `\005\143'
|
|
||||||
conserver: configuration in `/usr/local/lib/conserver.cf'
|
|
||||||
conserver: limited to 20 groups with 10 members
|
|
||||||
conserver: service name `conserver'
|
|
||||||
|
|
||||||
Testing the console server:
|
|
||||||
|
|
||||||
To test it (us the dummy config you build in ../conserver.cf) run
|
|
||||||
# conserver -C ../conserve.cf/dummy.cf -v &
|
|
||||||
|
|
||||||
You should get an output that looks like:
|
|
||||||
conserver: 1: dumb is on /dev/ttya (9600e) logged to /tmp/dummy.log
|
|
||||||
conserver: group 1 on port 1270
|
|
||||||
conserver: access type 't' for "127.0.0.1"
|
|
||||||
conserver: access type 'a' for "cc.purdue.edu"
|
|
||||||
|
|
||||||
In another login window (or this one, I guess)
|
|
||||||
$ console -vA dumb
|
|
||||||
You should get an output like this:
|
|
||||||
console: attach to dumb (on localhost)
|
|
||||||
conserver: dumb: login root@nostromo.cc.purdue.edu
|
|
||||||
Enter `^Ec?' for help.
|
|
||||||
[ok, attached]
|
|
||||||
[replay]
|
|
||||||
|
|
||||||
You can type to your device now, and it should answer you. Use
|
|
||||||
^Ec? for help and ^Ec. to hangup on it.
|
|
||||||
|
|
||||||
|
|
||||||
If that worked...
|
|
||||||
|
|
||||||
You can check over the real conserver.cf and start a real console server.
|
|
||||||
You are set.
|
|
||||||
|
|
||||||
|
|
||||||
Details/limits/bugs:
|
|
||||||
|
|
||||||
The log files grow without bound. Move the log files to OLD (with PUCC
|
|
||||||
install) and HUP the conserver process to get him to re-open the log files.
|
|
||||||
Here is the install cmd we use:
|
|
||||||
install -cq /dev/null /usr/adm/his.console
|
|
||||||
|
|
||||||
You might wanna start stamper with the console server, but it doesn't
|
|
||||||
re-open log files -- some later version of the console server will assume
|
|
||||||
stampers job.
|
|
@ -56,5 +56,4 @@ install: conserver
|
|||||||
$(MKDIR) $(DESTDIR)$(mandir)/man8
|
$(MKDIR) $(DESTDIR)$(mandir)/man8
|
||||||
$(INSTALL) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
$(INSTALL) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
||||||
$(MKDIR) $(DESTDIR)$(sysconfdir)
|
$(MKDIR) $(DESTDIR)$(sysconfdir)
|
||||||
$(INSTALL) conserver.rc $(DESTDIR)$(sysconfdir)
|
[ -f $(DESTDIR)$(sysconfdir)/conserver.rc ] || $(INSTALL) conserver.rc $(DESTDIR)$(sysconfdir)
|
||||||
|
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
# $Id: README,v 4.1 91/06/19 15:23:03 ksb Exp $
|
|
||||||
#
|
|
||||||
|
|
||||||
The general idea...
|
|
||||||
|
|
||||||
The idea is you have a big network. You have several machines whose consoles
|
|
||||||
you want to access remotely. You connect the console lines of these machines
|
|
||||||
to serial ports on another machine, which runs the server half of this
|
|
||||||
software. Then you can use the client program to get at the consoles from
|
|
||||||
anywhere in the network. It also provides log file of the consoles and
|
|
||||||
an operator stream.
|
|
||||||
|
|
||||||
|
|
||||||
Who will help me?
|
|
||||||
|
|
||||||
Send questions, comments, and bug reports to:
|
|
||||||
ksb@cc.purdue.edu (Kevin S Braunsdorf)
|
|
||||||
fine@cis.ohio-state.edu (Tom Fine)
|
|
||||||
|
|
||||||
Permissions needed to run this?
|
|
||||||
|
|
||||||
The console server does not need to be run as root. As long as it
|
|
||||||
has permission to write to all the log files, any id will be fine.
|
|
||||||
Keep in mind, though, that log files occasionally end up with
|
|
||||||
sensitive data in them (like root passwords when people don't watch
|
|
||||||
for the pasword prompt).
|
|
||||||
|
|
||||||
|
|
||||||
Console server process management.
|
|
||||||
|
|
||||||
The conserver (usually) ends up running several process: one master and
|
|
||||||
several children. Each of the children is responsible for some of the
|
|
||||||
consoles. Occasionally, we've had problems with one of the children becoming
|
|
||||||
"stuck" in one sense or another. To make dealing with this easier here
|
|
||||||
is the plan:
|
|
||||||
|
|
||||||
1. If you need to restart everything, run
|
|
||||||
console -q
|
|
||||||
which will terminate the console server on all master hosts.
|
|
||||||
|
|
||||||
2. If you need to restart on one host, killing the master process (on
|
|
||||||
that host) with a SIGTERM (the default for kill) will tell the master
|
|
||||||
process to kill everything (including itself).
|
|
||||||
|
|
||||||
3. If any child dies, the master process will start another one to replace
|
|
||||||
it. So if you have a process which is "stuck" it is easy to restart.
|
|
||||||
{Send it a TERM and let conserver respawn it.}
|
|
||||||
|
|
||||||
4. If a console is spewing trash use the down (`d') command to make the
|
|
||||||
server ignore it. Use the reopen (`o') command to restore it to
|
|
||||||
working order.
|
|
||||||
|
|
||||||
5. If all else fails get a real tty on a cart and push it to the poor
|
|
||||||
machine :-). [Keep one handy -- we don't claim this software is
|
|
||||||
any better than any other *FREE* product.]
|
|
||||||
|
|
||||||
|
|
||||||
Log file time stamping
|
|
||||||
|
|
||||||
We use a simple script like stamper.sh, which we start from rc.local, to
|
|
||||||
time-stamp the files from all the machines that don't do this already.
|
|
||||||
Using this script has the advantage over crontab entries that it doesn't
|
|
||||||
interrupt what is happening on the console, if someone is using it.
|
|
||||||
|
|
||||||
Use
|
|
||||||
stamper /usr/adm/target.console /usr/adm/other.console
|
|
||||||
to add time stamps to the log file for the `target' and `other' machines.
|
|
||||||
|
|
||||||
[ This stamper script will go away someday soon. -- ksb]
|
|
||||||
|
|
||||||
--
|
|
||||||
"When the head an heart of it finally alope!"
|
|
||||||
kayessbee, Kevin Braunsdorf, ksb@cc.purdue.edu, pur-ee!ksb, purdue!ksb
|
|
@ -1,8 +0,0 @@
|
|||||||
# $Id: TODO,v 5.7 92/02/18 09:52:33 ksb Exp $
|
|
||||||
|
|
||||||
Just finish some #if's for TERMIO/TERMIOS/V7 ttys.
|
|
||||||
|
|
||||||
kayessbee
|
|
||||||
--
|
|
||||||
"This may be a new sense of the word `robust' for you."
|
|
||||||
kayessbee, Kevin Braunsdorf, ksb@cc.purdue.edu, pur-ee!ksb, purdue!ksb
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: access.c,v 5.21 2001-06-15 09:02:02-07 bryan Exp $
|
* $Id: access.c,v 5.26 2001-07-03 02:07:34-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -33,10 +33,6 @@
|
|||||||
*
|
*
|
||||||
* 4. This notice may not be removed or altered.
|
* 4. This notice may not be removed or altered.
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
|
||||||
static char copyright[] =
|
|
||||||
"@(#) Copyright 1992 Purdue Research Foundation.\nAll rights reserved.\n";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -92,16 +88,13 @@ OutOfMem()
|
|||||||
* Returns 0 if the addresses match, else returns 1.
|
* Returns 0 if the addresses match, else returns 1.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
AddrCmp(hp, pattern)
|
AddrCmp(addr, pattern)
|
||||||
struct hostent *hp;
|
struct in_addr *addr;
|
||||||
char *pattern;
|
char *pattern;
|
||||||
{
|
{
|
||||||
unsigned long int hostaddr, pattern_addr, netmask;
|
unsigned long int hostaddr, pattern_addr, netmask;
|
||||||
char buf[200], *p, *slash_posn;
|
char buf[200], *p, *slash_posn;
|
||||||
|
|
||||||
if (hp->h_addrtype != AF_INET || hp->h_length != 4)
|
|
||||||
return 1; /* unsupported address type */
|
|
||||||
|
|
||||||
slash_posn = strchr(pattern, '/');
|
slash_posn = strchr(pattern, '/');
|
||||||
if (slash_posn != NULL) {
|
if (slash_posn != NULL) {
|
||||||
if (strlen(pattern) >= sizeof(buf))
|
if (strlen(pattern) >= sizeof(buf))
|
||||||
@ -137,7 +130,7 @@ char *pattern;
|
|||||||
netmask = htonl(netmask);
|
netmask = htonl(netmask);
|
||||||
if (~netmask & pattern_addr)
|
if (~netmask & pattern_addr)
|
||||||
netmask = 0xffffffff; /* compare entire addresses */
|
netmask = 0xffffffff; /* compare entire addresses */
|
||||||
hostaddr = *(unsigned long int*)hp->h_addr;
|
hostaddr = *(unsigned long int*)addr;
|
||||||
|
|
||||||
Debug( "Access check: host=%lx(%lx/%lx)", hostaddr & netmask, hostaddr, netmask );
|
Debug( "Access check: host=%lx(%lx/%lx)", hostaddr & netmask, hostaddr, netmask );
|
||||||
Debug( "Access check: acl=%lx(%lx/%lx)", pattern_addr & netmask, pattern_addr, netmask );
|
Debug( "Access check: acl=%lx(%lx/%lx)", pattern_addr & netmask, pattern_addr, netmask );
|
||||||
@ -147,54 +140,43 @@ char *pattern;
|
|||||||
/* return the access type for a given host entry (ksb)
|
/* return the access type for a given host entry (ksb)
|
||||||
*/
|
*/
|
||||||
char
|
char
|
||||||
AccType(hp)
|
AccType(addr,hname)
|
||||||
struct hostent *hp;
|
struct in_addr *addr;
|
||||||
|
char *hname;
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
register unsigned char *puc;
|
|
||||||
register char *pcName;
|
register char *pcName;
|
||||||
auto char acAddr[4*4];
|
|
||||||
register int len;
|
register int len;
|
||||||
|
|
||||||
if ( fDebug ) {
|
if ( fDebug ) {
|
||||||
puc = (unsigned char *)hp->h_addr;
|
if (hname)
|
||||||
sprintf(acAddr, "%d.%d.%d.%d", puc[0], puc[1], puc[2], puc[3]);
|
Debug( "Access check: hostname=%s, ip=%s", hname, inet_ntoa(*addr) );
|
||||||
Debug( "Access check: hostname=%s, ip=%s", hp->h_name, acAddr );
|
else
|
||||||
|
Debug( "Access check: hostname=<unresolvable>, ip=%s", inet_ntoa(*addr) );
|
||||||
}
|
}
|
||||||
#if ORIGINAL_CODE
|
|
||||||
puc = (unsigned char *)hp->h_addr;
|
|
||||||
sprintf(acAddr, "%d.%d.%d.%d", puc[0], puc[1], puc[2], puc[3]);
|
|
||||||
#endif
|
|
||||||
for (i = 0; i < iAccess; ++i) {
|
for (i = 0; i < iAccess; ++i) {
|
||||||
Debug( "Access check: who=%s, trust=%c", pACList[i].pcwho, pACList[i].ctrust );
|
Debug( "Access check: who=%s, trust=%c", pACList[i].pcwho, pACList[i].ctrust );
|
||||||
if (isdigit((int)(pACList[i].pcwho[0]))) {
|
if (isdigit((int)(pACList[i].pcwho[0]))) {
|
||||||
#if ORIGINAL_CODE
|
if (0 == AddrCmp(addr, pACList[i].pcwho)) {
|
||||||
/* we could allow 128.210.7 to match all on that subnet
|
|
||||||
* here...
|
|
||||||
*/
|
|
||||||
if (0 == strcmp(acAddr, pACList[i].pcwho)) {
|
|
||||||
return pACList[i].ctrust;
|
return pACList[i].ctrust;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (0 == AddrCmp(hp, pACList[i].pcwho)) {
|
|
||||||
return pACList[i].ctrust;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pcName = hp->h_name;
|
if (hname && hname[0] != '\000') {
|
||||||
len = strlen(pcName);
|
pcName = hname;
|
||||||
while (len >= pACList[i].ilen) {
|
len = strlen(pcName);
|
||||||
Debug( "Access check: name=%s", pcName );
|
while (len >= pACList[i].ilen) {
|
||||||
if (0 == strcmp(pcName, pACList[i].pcwho)) {
|
Debug( "Access check: name=%s", pcName );
|
||||||
return pACList[i].ctrust;
|
if (0 == strcmp(pcName, pACList[i].pcwho)) {
|
||||||
}
|
return pACList[i].ctrust;
|
||||||
pcName = strchr(pcName, '.');
|
}
|
||||||
if ((char *)0 == pcName) {
|
pcName = strchr(pcName, '.');
|
||||||
break;
|
if ((char *)0 == pcName) {
|
||||||
}
|
break;
|
||||||
++pcName;
|
}
|
||||||
len = strlen(pcName);
|
++pcName;
|
||||||
|
len = strlen(pcName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chDefAcc;
|
return chDefAcc;
|
||||||
@ -207,21 +189,28 @@ SetDefAccess(hpLocal)
|
|||||||
struct hostent *hpLocal;
|
struct hostent *hpLocal;
|
||||||
{
|
{
|
||||||
register char *pcWho, *pcDomain;
|
register char *pcWho, *pcDomain;
|
||||||
register unsigned char *puc;
|
|
||||||
register int iLen;
|
register int iLen;
|
||||||
|
char *addr;
|
||||||
|
struct in_addr *aptr;
|
||||||
|
|
||||||
|
aptr = (struct in_addr *)(hpLocal->h_addr);
|
||||||
|
addr = inet_ntoa(*aptr);
|
||||||
pACList = (ACCESS *)calloc(3, sizeof(ACCESS));
|
pACList = (ACCESS *)calloc(3, sizeof(ACCESS));
|
||||||
if ((ACCESS *)0 == pACList) {
|
if ((ACCESS *)0 == pACList) {
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
}
|
}
|
||||||
if ((char *)0 == (pcWho = malloc(4*3+1))) {
|
if ((char *)0 == (pcWho = malloc(strlen(addr)+1))) {
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
}
|
}
|
||||||
puc = (unsigned char *)hpLocal->h_addr;
|
strcpy(pcWho, addr);
|
||||||
sprintf(pcWho, "%d.%d.%d.%d", puc[0], puc[1], puc[2], puc[3]);
|
|
||||||
pACList[iAccess].ctrust = 'a';
|
pACList[iAccess].ctrust = 'a';
|
||||||
pACList[iAccess].ilen = strlen(pcWho);
|
pACList[iAccess].ilen = strlen(pcWho);
|
||||||
pACList[iAccess++].pcwho = pcWho;
|
pACList[iAccess].pcwho = pcWho;
|
||||||
|
|
||||||
|
Debug( "Access list prime: trust=%c, who=%s", pACList[iAccess].ctrust,
|
||||||
|
pACList[iAccess].pcwho );
|
||||||
|
|
||||||
|
iAccess++;
|
||||||
|
|
||||||
if ((char *)0 == (pcDomain = strchr(hpLocal->h_name, '.'))) {
|
if ((char *)0 == (pcDomain = strchr(hpLocal->h_name, '.'))) {
|
||||||
return;
|
return;
|
||||||
@ -231,7 +220,12 @@ struct hostent *hpLocal;
|
|||||||
pcWho = malloc(iLen+1);
|
pcWho = malloc(iLen+1);
|
||||||
pACList[iAccess].ctrust = 'a';
|
pACList[iAccess].ctrust = 'a';
|
||||||
pACList[iAccess].ilen = iLen;
|
pACList[iAccess].ilen = iLen;
|
||||||
pACList[iAccess++].pcwho = strcpy(pcWho, pcDomain);
|
pACList[iAccess].pcwho = strcpy(pcWho, pcDomain);
|
||||||
|
|
||||||
|
Debug( "Access list prime: trust=%c, who=%s", pACList[iAccess].ctrust,
|
||||||
|
pACList[iAccess].pcwho );
|
||||||
|
|
||||||
|
iAccess++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* thread ther list of uniq console server machines, aliases for (ksb)
|
/* thread ther list of uniq console server machines, aliases for (ksb)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: client.c,v 5.25 2001-02-21 17:26:06-08 bryan Exp $
|
* $Id: client.c,v 5.28 2001-06-29 00:26:39-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -33,10 +33,6 @@
|
|||||||
*
|
*
|
||||||
* 4. This notice may not be removed or altered.
|
* 4. This notice may not be removed or altered.
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
|
||||||
static char copyright[] =
|
|
||||||
"@(#) Copyright 1992 Purdue Research Foundation.\nAll rights reserved.\n";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -58,6 +54,7 @@ static char copyright[] =
|
|||||||
#include <port.h>
|
#include <port.h>
|
||||||
#include <consent.h>
|
#include <consent.h>
|
||||||
#include <client.h>
|
#include <client.h>
|
||||||
|
#include <group.h>
|
||||||
|
|
||||||
|
|
||||||
/* find the next guy who wants to write on the console (ksb)
|
/* find the next guy who wants to write on the console (ksb)
|
||||||
@ -83,29 +80,12 @@ CONSCLIENT *pCL;
|
|||||||
} else {
|
} else {
|
||||||
CSTROUT(pCL->fd, "\r\n[attached]\r\n");
|
CSTROUT(pCL->fd, "\r\n[attached]\r\n");
|
||||||
}
|
}
|
||||||
|
tagLogfile(pCL->pCEto, "%s attached", pCL->acid);
|
||||||
return pCL;
|
return pCL;
|
||||||
}
|
}
|
||||||
return (CONSCLIENT *)0;
|
return (CONSCLIENT *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_IDENTD
|
|
||||||
/* use identd to verify a user at a host (ksb)
|
|
||||||
* we have a list of login@host:passwd:trust after the general host
|
|
||||||
* limits. We call identd/tap/auth to get info and compare
|
|
||||||
*/
|
|
||||||
IdentifyMe(pCL)
|
|
||||||
CONSCLIENT *pCL;
|
|
||||||
{
|
|
||||||
/* ZZZ */
|
|
||||||
/* we would have to getsockname(fdClient)
|
|
||||||
* getpeername(fdClient)
|
|
||||||
* identd_client(addr, addr, acBuffer
|
|
||||||
* check for identifier in allowed list
|
|
||||||
* return the permision (modify in pCL)
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* show a character as a string so the user cannot mistake it for (ksb)
|
/* show a character as a string so the user cannot mistake it for (ksb)
|
||||||
* another
|
* another
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: consent.c,v 5.47 2001-06-15 11:33:49-07 bryan Exp $
|
* $Id: consent.c,v 5.51 2001-07-05 04:12:31-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -37,10 +37,6 @@
|
|||||||
/*
|
/*
|
||||||
* Network console modifications by Robert Olson, olson@mcs.anl.gov.
|
* Network console modifications by Robert Olson, olson@mcs.anl.gov.
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
|
||||||
static char copyright[] =
|
|
||||||
"@(#) Copyright 1992 Purdue Research Foundation.\nAll rights reserved.\n";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -324,7 +320,6 @@ CONSENT *pCE;
|
|||||||
|
|
||||||
#endif /* HAVE_TERMIOS_H */
|
#endif /* HAVE_TERMIOS_H */
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
/* setup a virtual device (ksb)
|
/* setup a virtual device (ksb)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
@ -385,7 +380,7 @@ CONSENT *pCE;
|
|||||||
close(1);
|
close(1);
|
||||||
close(0);
|
close(0);
|
||||||
# if defined(TIOCNOTTY)
|
# if defined(TIOCNOTTY)
|
||||||
if (-1 != (i = open("/dev/tty", 2, 0))) {
|
if (-1 != (i = open("/dev/tty", O_RDWR, 0))) {
|
||||||
ioctl(i, TIOCNOTTY, (char *)0);
|
ioctl(i, TIOCNOTTY, (char *)0);
|
||||||
close(i);
|
close(i);
|
||||||
}
|
}
|
||||||
@ -401,7 +396,7 @@ CONSENT *pCE;
|
|||||||
iNewGrp = getpid();
|
iNewGrp = getpid();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
if (0 != open(pCE->acslave, 2, 0) || 1 != dup(0)) {
|
if (0 != open(pCE->acslave, O_RDWR, 0) || 1 != dup(0)) {
|
||||||
Error( "%s: fd sync error", pCE->server);
|
Error( "%s: fd sync error", pCE->server);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -413,9 +408,6 @@ CONSENT *pCE;
|
|||||||
(void)ioctl(0, I_PUSH, "ptem");
|
(void)ioctl(0, I_PUSH, "ptem");
|
||||||
(void)ioctl(0, I_PUSH, "ldterm");
|
(void)ioctl(0, I_PUSH, "ldterm");
|
||||||
# endif
|
# endif
|
||||||
# if HAVE_STTY_LD
|
|
||||||
(void)ioctl(0, I_PUSH, "stty_ld");
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if HAVE_TERMIOS_H
|
# if HAVE_TERMIOS_H
|
||||||
# ifdef HAVE_TCGETATTR
|
# ifdef HAVE_TCGETATTR
|
||||||
@ -545,7 +537,6 @@ CONSENT *pCE;
|
|||||||
exit(1);
|
exit(1);
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
#endif /* DO_VIRTUAL */
|
|
||||||
|
|
||||||
/* down a console, virtual or real (ksb)
|
/* down a console, virtual or real (ksb)
|
||||||
*/
|
*/
|
||||||
@ -554,24 +545,17 @@ ConsDown(pCE, pfdSet)
|
|||||||
CONSENT *pCE;
|
CONSENT *pCE;
|
||||||
fd_set *pfdSet;
|
fd_set *pfdSet;
|
||||||
{
|
{
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (-1 != pCE->ipid) {
|
if (-1 != pCE->ipid) {
|
||||||
if (-1 != kill(pCE->ipid, SIGHUP))
|
if (-1 != kill(pCE->ipid, SIGHUP))
|
||||||
sleep(1);
|
sleep(1);
|
||||||
pCE->ipid = -1;
|
pCE->ipid = -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (-1 != pCE->fdtty) {
|
if (-1 != pCE->fdtty) {
|
||||||
FD_CLR(pCE->fdtty, pfdSet);
|
FD_CLR(pCE->fdtty, pfdSet);
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (0 == pCE->fvirtual) {
|
if (0 == pCE->fvirtual) {
|
||||||
(void)close(pCE->fdtty);
|
(void)close(pCE->fdtty);
|
||||||
pCE->fdtty = -1;
|
pCE->fdtty = -1;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
(void)close(pCE->fdtty);
|
|
||||||
pCE->fdtty = -1;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (-1 != pCE->fdlog) {
|
if (-1 != pCE->fdlog) {
|
||||||
if (pCE->nolog) {
|
if (pCE->nolog) {
|
||||||
@ -660,7 +644,6 @@ int useHostCache;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (0 != pCE->fvirtual)
|
if (0 != pCE->fvirtual)
|
||||||
{
|
{
|
||||||
/* still open, never ever close it, but set the bit */
|
/* still open, never ever close it, but set the bit */
|
||||||
@ -814,17 +797,4 @@ int useHostCache;
|
|||||||
{
|
{
|
||||||
TtyDev(pCE);
|
TtyDev(pCE);
|
||||||
}
|
}
|
||||||
#else /* ! DO_VIRTUAL */
|
|
||||||
if (-1 == (pCE->fdtty = open(pCE->dfile, O_RDWR|O_NDELAY, 0600))) {
|
|
||||||
Error( "open: %s: %s", pCE->dfile, strerror(errno));
|
|
||||||
(void)close(pCE->fdlog);
|
|
||||||
pCE->fdlog = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
FD_SET(pCE->fdtty, pfdSet);
|
|
||||||
|
|
||||||
/* ok, now setup the device
|
|
||||||
*/
|
|
||||||
TtyDev(pCE);
|
|
||||||
#endif /* DO_VIRTUAL */
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: consent.h,v 5.17 2001-02-21 17:26:06-08 bryan Exp $
|
* $Id: consent.h,v 5.19 2001-06-28 11:14:30-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -71,17 +71,17 @@ typedef struct consent { /* console information */
|
|||||||
char networkConsoleHost[MAXSERVLEN];
|
char networkConsoleHost[MAXSERVLEN];
|
||||||
int networkConsolePort;
|
int networkConsolePort;
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
/* used if virtual console */
|
/* used if virtual console */
|
||||||
char acslave[MAXDEVLEN];/* pseudo-device slave side */
|
char acslave[MAXDEVLEN];/* pseudo-device slave side */
|
||||||
int fvirtual; /* is a pty device we use as a console */
|
int fvirtual; /* is a pty device we use as a console */
|
||||||
char *pccmd; /* virtual console command */
|
char *pccmd; /* virtual console command */
|
||||||
int ipid; /* pid of virtual command */
|
int ipid; /* pid of virtual command */
|
||||||
#endif
|
|
||||||
/* only used in child */
|
/* only used in child */
|
||||||
int nolog; /* don't log output */
|
int nolog; /* don't log output */
|
||||||
int fdlog; /* the local log file */
|
int fdlog; /* the local log file */
|
||||||
int fdtty; /* the port to talk to machine on */
|
int fdtty; /* the port to talk to machine on */
|
||||||
|
int activitylog; /* log attach/detach/bump */
|
||||||
short int fup; /* we setup this line? */
|
short int fup; /* we setup this line? */
|
||||||
short int fronly; /* we can only read this console */
|
short int fronly; /* we can only read this console */
|
||||||
short int iend; /* like icursor in CONSCLIENT */
|
short int iend; /* like icursor in CONSCLIENT */
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
.\" @(#)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.6 1999-12-01 11:55:13-08 bryan Exp $
|
.\" $Id: conserver.man,v 1.11 2001-07-05 05:09:50-07 bryan Exp $
|
||||||
.TH CONSERVER 8 "Local"
|
.TH CONSERVER 8 "Local"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver \- console server daemon
|
conserver \- console server daemon
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B conserver [\-\fBdinv\fP] [\-\fBC\fP \fIconfig\fP]
|
.B conserver [\-\fBdDhinsvV\fP] [\-\fBa\fP \fItype\fP] [\-\fBM\fP \fIaddr\fP]
|
||||||
.br
|
.B [\-\fBp\fP \fIport\fP] [\-\fBC\fP \fIconfig\fP] [\-\fBP\fP \fIpasswd\fP]
|
||||||
.B conserver [\-\fBhV\fP]
|
.B [\-\fBL\fP \fIlogfile\fP]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Conserver
|
.B Conserver
|
||||||
is the daemon for the
|
is the daemon for the
|
||||||
.IR console (1L)
|
.IR console (1)
|
||||||
program.
|
program.
|
||||||
It provides remote access to the server consoles,
|
It provides remote access to the server consoles,
|
||||||
and logs all console data.
|
and logs all console data.
|
||||||
@ -29,19 +29,32 @@ All handling of escape sequenes is done by the server,
|
|||||||
except the suspend sequence which is
|
except the suspend sequence which is
|
||||||
sent as an out-of-band command to the client.
|
sent as an out-of-band command to the client.
|
||||||
.PP
|
.PP
|
||||||
The
|
The \fBconserver\fP parent process will automatically respawn any child
|
||||||
.B conserver
|
process that dies. If the parent process receives a SIGTERM, it will
|
||||||
parent process will automatically respawn any child process that dies.
|
propagate the signal to its children, shutting everything down. The
|
||||||
If the parent process receives a SIGTERM, it will propogate the signal
|
parent will also propagate the SIGHUP and SIGUSR1 signals. A SIGHUP
|
||||||
to its children.
|
will cause all the console logfiles to be closed and
|
||||||
|
then reopened (no reread of the configuration file is done). A SIGUSR1
|
||||||
|
will cause the server to try and connect to any consoles marked as
|
||||||
|
down. This can come in handy if you had a terminal server (or more)
|
||||||
|
that wasn't accepting connections at startup and you want
|
||||||
|
\fBconserver\fP to try and reconnect to all those downed ports.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
|
.B \-a
|
||||||
|
Set the default access type.
|
||||||
|
.TP
|
||||||
.BI \-C config
|
.BI \-C config
|
||||||
With this option the invoker may specify an alternate confguration.
|
This option points the server at a different configuration file.
|
||||||
The default \fIconfig\fP is /usr/local/lib/conserver.cf.
|
The default \fIconfig\fP is set at compile time using the
|
||||||
|
--with-cffile option.
|
||||||
.TP
|
.TP
|
||||||
.B \-d
|
.B \-d
|
||||||
Become a daemon.
|
Become a daemon. Disconnects from the controlling terminal and sends
|
||||||
|
all output to the logfile specified with \fB\-L\fP.
|
||||||
|
.TP
|
||||||
|
.B \-D
|
||||||
|
Enable debugging output, sent to stderr.
|
||||||
.TP
|
.TP
|
||||||
.B \-h
|
.B \-h
|
||||||
Output a brief help message.
|
Output a brief help message.
|
||||||
@ -49,10 +62,27 @@ Output a brief help message.
|
|||||||
.B \-i
|
.B \-i
|
||||||
Initiate console connections on demand (and close them when not used)
|
Initiate console connections on demand (and close them when not used)
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-L logfile
|
||||||
|
This option points the server at a different logfile path. The default
|
||||||
|
\fIlogfile\fP is set at compile time using the --with-logfile option.
|
||||||
|
.TP
|
||||||
|
.BI \-M addr
|
||||||
|
Set the address to listen on. This allows conserver to bind to a
|
||||||
|
particular ip address (like `localhost') instead of all interfaces.
|
||||||
|
The default is to bind to all addresses.
|
||||||
|
.TP
|
||||||
.B \-n
|
.B \-n
|
||||||
The \fIconserver\fP will \fBnot\fP output unloved console output to
|
The \fIconserver\fP will \fBnot\fP output unloved console output to
|
||||||
stdout.
|
stdout.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-p port
|
||||||
|
Set the port to listen on. The default \fIport\fP is set at compile time
|
||||||
|
using the --with-port option.
|
||||||
|
.TP
|
||||||
|
.BI \-P passwd
|
||||||
|
This option points the server at a different password file. The default
|
||||||
|
\fIpasswd\fP is set at compile time using the --with-pwdfile option.
|
||||||
|
.TP
|
||||||
.B \-v
|
.B \-v
|
||||||
Echo the configuration as it is being read (be verbose).
|
Echo the configuration as it is being read (be verbose).
|
||||||
.TP
|
.TP
|
||||||
@ -70,6 +100,6 @@ Thomas A. Fine, Ohio State Computer Science
|
|||||||
.br
|
.br
|
||||||
Kevin S Braunsdorf, Purdue University Computing Center
|
Kevin S Braunsdorf, Purdue University Computing Center
|
||||||
.br
|
.br
|
||||||
Bryan Stansell, Global Networking and Computing, Inc.
|
Bryan Stansell, conserver.com
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
console(1L), conserver.cf(5L)
|
console(1), conserver.cf(5)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: fallback.c,v 5.27 2001-06-15 11:33:49-07 bryan Exp $
|
* $Id: fallback.c,v 5.29 2001-06-29 00:34:11-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -35,8 +35,6 @@
|
|||||||
|
|
||||||
#include <port.h>
|
#include <port.h>
|
||||||
|
|
||||||
#if DO_VIRTUAL && ! HAVE_PTYD
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static char *__pty_host;
|
static char *__pty_host;
|
||||||
static char *__pty_fmt;
|
static char *__pty_fmt;
|
||||||
@ -222,5 +220,3 @@ char *pcSlave, *pcMaster;
|
|||||||
(void) strcpy(pcMaster, pcTMaster);
|
(void) strcpy(pcMaster, pcTMaster);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* no code if it is not used */
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: group.c,v 5.72 2001-06-15 11:33:49-07 bryan Exp $
|
* $Id: group.c,v 5.89 2001-07-05 09:00:36-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -51,12 +51,6 @@
|
|||||||
*
|
*
|
||||||
* 4. This notice may not be removed or altered.
|
* 4. This notice may not be removed or altered.
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
|
||||||
static char copyright[] =
|
|
||||||
"@(#) Copyright (c) 1990 The Ohio State University.\n\
|
|
||||||
@(#) Copyright 1992 Purdue Research Foundation.\n\
|
|
||||||
All rights reserved.\n";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -67,11 +61,13 @@ All rights reserved.\n";
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#include <varargs.h>
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat.h>
|
||||||
|
|
||||||
@ -84,13 +80,7 @@ All rights reserved.\n";
|
|||||||
#include <main.h>
|
#include <main.h>
|
||||||
#include <output.h>
|
#include <output.h>
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
# if HAVE_PTYD
|
|
||||||
# include "local/openpty.h"
|
|
||||||
# else
|
|
||||||
extern int FallBack();
|
extern int FallBack();
|
||||||
# endif /* ptyd */
|
|
||||||
#endif /* virtual consoles */
|
|
||||||
|
|
||||||
#include <arpa/telnet.h>
|
#include <arpa/telnet.h>
|
||||||
|
|
||||||
@ -126,6 +116,26 @@ char *pcEPass, *pcWord;
|
|||||||
return 0 == strcmp(pwd->pw_passwd, crypt(pcWord, pwd->pw_passwd));
|
return 0 == strcmp(pwd->pw_passwd, crypt(pcWord, pwd->pw_passwd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This returns a string with the current time in ascii form.
|
||||||
|
* (same as ctime() but without the \n)
|
||||||
|
* optionally returns the time in time_t form (pass in NULL if you don't care).
|
||||||
|
* It's overwritten each time, so use it and forget it.
|
||||||
|
*/
|
||||||
|
char curtime[25];
|
||||||
|
|
||||||
|
const char *
|
||||||
|
strtime(ltime)
|
||||||
|
time_t *ltime;
|
||||||
|
{
|
||||||
|
time_t tyme;
|
||||||
|
|
||||||
|
tyme = time((time_t *)0);
|
||||||
|
(void)strcpy(curtime, ctime(&tyme));
|
||||||
|
curtime[24] = '\000';
|
||||||
|
if (ltime != NULL) *ltime = tyme;
|
||||||
|
return (const char *)curtime;
|
||||||
|
}
|
||||||
|
|
||||||
/* on an HUP close and re-open log files so lop can trim them (ksb)
|
/* on an HUP close and re-open log files so lop can trim them (ksb)
|
||||||
* lucky for us: log file fd's can change async from the group driver!
|
* lucky for us: log file fd's can change async from the group driver!
|
||||||
*/
|
*/
|
||||||
@ -203,12 +213,32 @@ FlagMark(sig)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tagLogfile(pCE, fmt, va_alist)
|
||||||
|
const CONSENT *pCE;
|
||||||
|
const char *fmt;
|
||||||
|
va_dcl
|
||||||
|
{
|
||||||
|
char ac[BUFSIZ];
|
||||||
|
char acOut[BUFSIZ];
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap);
|
||||||
|
|
||||||
|
if ((pCE == (CONSENT *)0) ||
|
||||||
|
(pCE->fdlog == -1) ||
|
||||||
|
(pCE->activitylog == 0)) return;
|
||||||
|
|
||||||
|
vsprintf(ac, fmt, ap);
|
||||||
|
sprintf(acOut, "[-- %s -- %s]\r\n", ac, strtime(NULL));
|
||||||
|
(void)write(pCE->fdlog, acOut, strlen(acOut));
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Mark()
|
Mark()
|
||||||
{
|
{
|
||||||
time_t tyme;
|
|
||||||
char acOut[BUFSIZ];
|
char acOut[BUFSIZ];
|
||||||
char styme[26];
|
time_t tyme;
|
||||||
register int i;
|
register int i;
|
||||||
register CONSENT *pCE;
|
register CONSENT *pCE;
|
||||||
|
|
||||||
@ -216,17 +246,15 @@ Mark()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tyme = time((time_t *)0);
|
|
||||||
(void)strcpy(styme, ctime(&tyme));
|
|
||||||
styme[24] = '\000';
|
|
||||||
/* [-- MARK -- `date`] */
|
/* [-- MARK -- `date`] */
|
||||||
sprintf(acOut, "[-- MARK -- %s]\r\n", styme);
|
sprintf(acOut, "[-- MARK -- %s]\r\n", strtime(&tyme));
|
||||||
|
|
||||||
for (i = 0, pCE = pGEHup->pCElist; i < pGEHup->imembers; ++i, ++pCE) {
|
for (i = 0, pCE = pGEHup->pCElist; i < pGEHup->imembers; ++i, ++pCE) {
|
||||||
if (-1 == pCE->fdlog) {
|
if (-1 == pCE->fdlog) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( (pCE->nextMark > 0) && (tyme >= pCE->nextMark) ) {
|
if ( (pCE->nextMark > 0) && (tyme >= pCE->nextMark) ) {
|
||||||
|
Debug( "[-- MARK --] stamp added to %s", pCE->lfile );
|
||||||
(void)write(pCE->fdlog, acOut, strlen(acOut));
|
(void)write(pCE->fdlog, acOut, strlen(acOut));
|
||||||
pCE->nextMark = tyme + pCE->mark;
|
pCE->nextMark = tyme + pCE->mark;
|
||||||
}
|
}
|
||||||
@ -240,8 +268,6 @@ CONSENT *pCE;
|
|||||||
char *s;
|
char *s;
|
||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
time_t tyme;
|
|
||||||
char styme[26];
|
|
||||||
char acOut[BUFSIZ];
|
char acOut[BUFSIZ];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j;
|
int j;
|
||||||
@ -256,24 +282,17 @@ int len;
|
|||||||
acOut[0] = '\000';
|
acOut[0] = '\000';
|
||||||
for (j=0; j<len; j++) {
|
for (j=0; j<len; j++) {
|
||||||
if (s[j] == '\n') {
|
if (s[j] == '\n') {
|
||||||
(pCE->nextMark)++;
|
|
||||||
Debug( "Found newline for %s (nextMark=%d, mark=%d)", pCE->server, pCE->nextMark, pCE->mark );
|
Debug( "Found newline for %s (nextMark=%d, mark=%d)", pCE->server, pCE->nextMark, pCE->mark );
|
||||||
if (pCE->nextMark == 0) {
|
(void)write(pCE->fdlog, s+i, j-i+1);
|
||||||
(void)write(pCE->fdlog, s+i, j-i+1);
|
i=j+1;
|
||||||
i=j+1;
|
if ( acOut[0] == '\000' ) {
|
||||||
if ( acOut[0] == '\000' ) {
|
sprintf(acOut, "[%s]", strtime(NULL));
|
||||||
tyme = time((time_t *)0);
|
|
||||||
(void)strcpy(styme, ctime(&tyme));
|
|
||||||
styme[24] = '\000';
|
|
||||||
sprintf(acOut, "[%s]", styme);
|
|
||||||
}
|
|
||||||
(void)write(pCE->fdlog, acOut, strlen(acOut));
|
|
||||||
pCE->nextMark = pCE->mark;
|
|
||||||
}
|
}
|
||||||
|
(void)write(pCE->fdlog, acOut, strlen(acOut));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( i <= j ) {
|
if ( i < j ) {
|
||||||
(void)write(pCE->fdlog, s+i, j-i+1);
|
(void)write(pCE->fdlog, s+i, j-i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +328,6 @@ int sig;
|
|||||||
fSawGoAway = 1;
|
fSawGoAway = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
/* on a TERM we have to cleanup utmp entries (ask ptyd to do it) (ksb)
|
/* on a TERM we have to cleanup utmp entries (ask ptyd to do it) (ksb)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -328,11 +346,7 @@ DeUtmp()
|
|||||||
if (-1 == pCE->fdtty || 0 == pCE->fvirtual) {
|
if (-1 == pCE->fdtty || 0 == pCE->fvirtual) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
# if HAVE_PTYD
|
|
||||||
(void)closepty(pCE->acslave, pCE->dfile, OPTY_UTMP, pCE->fdlog);
|
|
||||||
# else
|
|
||||||
(void)close(pCE->fdlog);
|
(void)close(pCE->fdlog);
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
_exit(0);
|
_exit(0);
|
||||||
@ -367,21 +381,6 @@ int sig;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* DO_VIRTUAL */
|
|
||||||
|
|
||||||
static void
|
|
||||||
GoAway()
|
|
||||||
{
|
|
||||||
SendShutdownMsg(pGEHup);
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
_exit(0);
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* DO_VIRTUAL */
|
|
||||||
|
|
||||||
|
|
||||||
static char acStop[] = { /* buffer for oob stop command */
|
static char acStop[] = { /* buffer for oob stop command */
|
||||||
OB_SUSP, 0
|
OB_SUSP, 0
|
||||||
};
|
};
|
||||||
@ -392,7 +391,7 @@ char *pw_string;
|
|||||||
{
|
{
|
||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buf[100];
|
char buf[BUFSIZ];
|
||||||
char *server, *servers, *this_pw, *user;
|
char *server, *servers, *this_pw, *user;
|
||||||
char username[64]; /* same as acid */
|
char username[64]; /* same as acid */
|
||||||
#if HAVE_GETSPNAM
|
#if HAVE_GETSPNAM
|
||||||
@ -567,8 +566,6 @@ int sfd;
|
|||||||
register int i, nr;
|
register int i, nr;
|
||||||
register struct hostent *hpPeer;
|
register struct hostent *hpPeer;
|
||||||
register long tyme;
|
register long tyme;
|
||||||
time_t tymee;
|
|
||||||
char stymee[26];
|
|
||||||
auto CONSENT CECtl; /* our control `console' */
|
auto CONSENT CECtl; /* our control `console' */
|
||||||
auto char cType;
|
auto char cType;
|
||||||
auto int maxfd, so;
|
auto int maxfd, so;
|
||||||
@ -591,11 +588,7 @@ int sfd;
|
|||||||
*/
|
*/
|
||||||
(void)signal(SIGURG, SIG_DFL);
|
(void)signal(SIGURG, SIG_DFL);
|
||||||
Set_signal(SIGTERM, FlagGoAway);
|
Set_signal(SIGTERM, FlagGoAway);
|
||||||
#if DO_VIRTUAL
|
|
||||||
Set_signal(SIGCHLD, ReapVirt);
|
Set_signal(SIGCHLD, ReapVirt);
|
||||||
#else
|
|
||||||
(void)signal(SIGCHLD, SIG_DFL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* setup our local data structures and fields, and control line
|
/* setup our local data structures and fields, and control line
|
||||||
*/
|
*/
|
||||||
@ -603,7 +596,6 @@ int sfd;
|
|||||||
for (iConsole = 0; iConsole < pGE->imembers; ++iConsole) {
|
for (iConsole = 0; iConsole < pGE->imembers; ++iConsole) {
|
||||||
pCE[iConsole].fup = 0;
|
pCE[iConsole].fup = 0;
|
||||||
pCE[iConsole].pCLon = pCE[iConsole].pCLwr = (CONSCLIENT *)0;
|
pCE[iConsole].pCLon = pCE[iConsole].pCLwr = (CONSCLIENT *)0;
|
||||||
#if DO_VIRTUAL
|
|
||||||
pCE[iConsole].fdlog = -1;
|
pCE[iConsole].fdlog = -1;
|
||||||
if (0 == pCE[iConsole].fvirtual) {
|
if (0 == pCE[iConsole].fvirtual) {
|
||||||
pCE[iConsole].fdtty = -1;
|
pCE[iConsole].fdtty = -1;
|
||||||
@ -611,16 +603,9 @@ int sfd;
|
|||||||
}
|
}
|
||||||
/* open a pty for each vitrual console
|
/* open a pty for each vitrual console
|
||||||
*/
|
*/
|
||||||
# if HAVE_PTYD
|
|
||||||
pCE[iConsole].fdtty = openpty(pCE[iConsole].acslave, pCE[iConsole].dfile, OPTY_UTMP, 0);
|
|
||||||
# else /* oops, get ptyd soon */
|
|
||||||
/* we won't get a utmp entry... *sigh*
|
/* we won't get a utmp entry... *sigh*
|
||||||
*/
|
*/
|
||||||
pCE[iConsole].fdtty = FallBack(pCE[iConsole].acslave, pCE[iConsole].dfile);
|
pCE[iConsole].fdtty = FallBack(pCE[iConsole].acslave, pCE[iConsole].dfile);
|
||||||
# endif /* find openpty */
|
|
||||||
#else
|
|
||||||
pCE[iConsole].fdlog = pCE[iConsole].fdtty = -1;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
sprintf(CECtl.server, "ctl_%d", pGE->port);
|
sprintf(CECtl.server, "ctl_%d", pGE->port);
|
||||||
CECtl.inamelen = strlen(CECtl.server); /* bogus, of course */
|
CECtl.inamelen = strlen(CECtl.server); /* bogus, of course */
|
||||||
@ -686,14 +671,11 @@ int sfd;
|
|||||||
while (1) {
|
while (1) {
|
||||||
/* check signal flags */
|
/* check signal flags */
|
||||||
if (fSawGoAway) {
|
if (fSawGoAway) {
|
||||||
#if DO_VIRTUAL
|
|
||||||
DeUtmp();
|
DeUtmp();
|
||||||
#else
|
|
||||||
GoAway();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (fSawReOpen) {
|
if (fSawReOpen) {
|
||||||
fSawReOpen = 0;
|
fSawReOpen = 0;
|
||||||
|
reopenLogfile();
|
||||||
ReOpen();
|
ReOpen();
|
||||||
}
|
}
|
||||||
if (fSawReUp) {
|
if (fSawReUp) {
|
||||||
@ -725,7 +707,6 @@ int sfd;
|
|||||||
if ((nr = read(pCEServing->fdtty, acIn, sizeof(acIn))) <= 0) {
|
if ((nr = read(pCEServing->fdtty, acIn, sizeof(acIn))) <= 0) {
|
||||||
/* carrier lost */
|
/* carrier lost */
|
||||||
Error( "lost carrier on %s (%s)!", pCEServing->server, pCEServing->dfile);
|
Error( "lost carrier on %s (%s)!", pCEServing->server, pCEServing->dfile);
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (pCEServing->fvirtual) {
|
if (pCEServing->fvirtual) {
|
||||||
FD_CLR(pCEServing->fdtty, &rinit);
|
FD_CLR(pCEServing->fdtty, &rinit);
|
||||||
pCEServing->ipid = -1;
|
pCEServing->ipid = -1;
|
||||||
@ -733,9 +714,6 @@ int sfd;
|
|||||||
} else {
|
} else {
|
||||||
ConsInit(pCEServing, &rinit, 0);
|
ConsInit(pCEServing, &rinit, 0);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ConsInit(pCEServing, &rinit, 0);
|
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if CPARITY
|
#if CPARITY
|
||||||
@ -802,10 +780,7 @@ drop:
|
|||||||
* close gap in table, restart loop
|
* close gap in table, restart loop
|
||||||
*/
|
*/
|
||||||
if (&CECtl != pCEServing) {
|
if (&CECtl != pCEServing) {
|
||||||
tymee = time((time_t *)0);
|
Info("%s: logout %s [%s]", pCEServing->server, pCLServing->acid, strtime(NULL));
|
||||||
(void)strcpy(stymee, ctime(&tymee));
|
|
||||||
stymee[24] = '\000';
|
|
||||||
Info("%s: logout %s [%s]", pCEServing->server, pCLServing->acid, stymee);
|
|
||||||
}
|
}
|
||||||
if (fNoinit && (CONSCLIENT *)0 ==
|
if (fNoinit && (CONSCLIENT *)0 ==
|
||||||
pCLServing->pCEto->pCLon->pCLnext)
|
pCLServing->pCEto->pCLon->pCLnext)
|
||||||
@ -821,6 +796,7 @@ drop:
|
|||||||
if (pCLServing->fwr) {
|
if (pCLServing->fwr) {
|
||||||
pCLServing->fwr = 0;
|
pCLServing->fwr = 0;
|
||||||
pCLServing->fwantwr = 0;
|
pCLServing->fwantwr = 0;
|
||||||
|
tagLogfile(pCEServing, "%s detached", pCLServing->acid);
|
||||||
if (pCEServing->nolog) {
|
if (pCEServing->nolog) {
|
||||||
pCEServing->nolog = 0;
|
pCEServing->nolog = 0;
|
||||||
sprintf(acOut, "[Console logging restored (logout)]\r\n");
|
sprintf(acOut, "[Console logging restored (logout)]\r\n");
|
||||||
@ -990,19 +966,17 @@ drop:
|
|||||||
if (pCLServing->fwr) {
|
if (pCLServing->fwr) {
|
||||||
pCLServing->fwr = 0;
|
pCLServing->fwr = 0;
|
||||||
pCLServing->fwantwr = 0;
|
pCLServing->fwantwr = 0;
|
||||||
|
tagLogfile(pCEServing, "%s detached", pCLServing->acid);
|
||||||
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
|
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* inform operators of the change
|
/* inform operators of the change
|
||||||
*/
|
*/
|
||||||
/* if (fVerbose) { */
|
/* if (fVerbose) { */
|
||||||
tymee = time((time_t *)0);
|
|
||||||
(void)strcpy(stymee, ctime(&tymee));
|
|
||||||
stymee[24] = '\000';
|
|
||||||
if (&CECtl == pCEServing) {
|
if (&CECtl == pCEServing) {
|
||||||
Info("%s: login %s [%s]", pCLServing->pCEwant->server, pCLServing->acid, stymee);
|
Info("%s: login %s [%s]", pCLServing->pCEwant->server, pCLServing->acid, strtime(NULL));
|
||||||
} else {
|
} else {
|
||||||
Info("%s moves from %s to %s [%s]", pCLServing->acid, pCEServing->server, pCLServing->pCEwant->server, stymee);
|
Info("%s moves from %s to %s [%s]", pCLServing->acid, pCEServing->server, pCLServing->pCEwant->server, strtime(NULL));
|
||||||
}
|
}
|
||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
@ -1032,6 +1006,7 @@ drop:
|
|||||||
CSTROUT(pCLServing->fd, "attached]\r\n");
|
CSTROUT(pCLServing->fd, "attached]\r\n");
|
||||||
/* this keeps the ops console neat */
|
/* this keeps the ops console neat */
|
||||||
pCEServing->iend = pCEServing->inamelen;
|
pCEServing->iend = pCEServing->inamelen;
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
} else {
|
} else {
|
||||||
CSTROUT(pCLServing->fd, "spy]\r\n");
|
CSTROUT(pCLServing->fd, "spy]\r\n");
|
||||||
}
|
}
|
||||||
@ -1071,6 +1046,7 @@ drop:
|
|||||||
} else {
|
} else {
|
||||||
CSTROUT(pCLServing->fd, " -- attached]\r\n");
|
CSTROUT(pCLServing->fd, " -- attached]\r\n");
|
||||||
}
|
}
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
} else {
|
} else {
|
||||||
CSTROUT(pCLServing->fd, " -- spy mode]\r\n");
|
CSTROUT(pCLServing->fd, " -- spy mode]\r\n");
|
||||||
}
|
}
|
||||||
@ -1238,6 +1214,7 @@ drop:
|
|||||||
} else {
|
} else {
|
||||||
sprintf(acOut, "attached]\r\n");
|
sprintf(acOut, "attached]\r\n");
|
||||||
}
|
}
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
} else if (pCL == pCLServing) {
|
} else if (pCL == pCLServing) {
|
||||||
if ( pCEServing->nolog ) {
|
if ( pCEServing->nolog ) {
|
||||||
sprintf(acOut, "ok (nologging)]\r\n");
|
sprintf(acOut, "ok (nologging)]\r\n");
|
||||||
@ -1256,11 +1233,9 @@ drop:
|
|||||||
if (pCEServing->isNetworkConsole) {
|
if (pCEServing->isNetworkConsole) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (pCEServing->fvirtual) {
|
if (pCEServing->fvirtual) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
if (-1 == tcgetattr(pCEServing->fdtty, & sbuf)) {
|
if (-1 == tcgetattr(pCEServing->fdtty, & sbuf)) {
|
||||||
@ -1311,6 +1286,7 @@ drop:
|
|||||||
|
|
||||||
pCLServing->fwr = 0;
|
pCLServing->fwr = 0;
|
||||||
pCEServing->pCLwr = (CONSCLIENT *)0;
|
pCEServing->pCLwr = (CONSCLIENT *)0;
|
||||||
|
tagLogfile(pCEServing, "%s detached", pCLServing->acid);
|
||||||
ConsDown(pCEServing, &rinit);
|
ConsDown(pCEServing, &rinit);
|
||||||
CSTROUT(pCLServing->fd, "line down]\r\n");
|
CSTROUT(pCLServing->fd, "line down]\r\n");
|
||||||
|
|
||||||
@ -1366,6 +1342,9 @@ drop:
|
|||||||
}
|
}
|
||||||
sprintf(acNote, "\r\n[forced to `spy\' mode by %s]\r\n", pCLServing->acid);
|
sprintf(acNote, "\r\n[forced to `spy\' mode by %s]\r\n", pCLServing->acid);
|
||||||
(void)write(pCL->fd, acNote, strlen(acNote));
|
(void)write(pCL->fd, acNote, strlen(acNote));
|
||||||
|
tagLogfile(pCEServing, "%s bumped %s", pCLServing->acid, pCL->acid);
|
||||||
|
} else {
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
}
|
}
|
||||||
pCEServing->pCLwr = pCLServing;
|
pCEServing->pCLwr = pCLServing;
|
||||||
pCLServing->fwr = 1;
|
pCLServing->fwr = 1;
|
||||||
@ -1394,27 +1373,6 @@ drop:
|
|||||||
HelpUser(pCLServing);
|
HelpUser(pCLServing);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if HAVE_IDENTD
|
|
||||||
case 'I': /* identd auth request */
|
|
||||||
case 'i':
|
|
||||||
CSTROUT(pCLServing->fd, "ident");
|
|
||||||
IdentifyMe(pCLServing, pCEServing);
|
|
||||||
switch (pCLServing->caccess) {
|
|
||||||
case 'a':
|
|
||||||
CSTROUT(pCLServing->fd, " allowerd]\r\n");
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
CSTROUT(pCLServing->fd, " refused]\r\n");
|
|
||||||
break;
|
|
||||||
case 't':
|
|
||||||
CSTROUT(pCLServing->fd, " trusted]\r\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
CSTROUT(pCLServing->fd, " failed]\r\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case 'L':
|
case 'L':
|
||||||
if (pCLServing->fwr) {
|
if (pCLServing->fwr) {
|
||||||
pCEServing->nolog = !pCEServing->nolog;
|
pCEServing->nolog = !pCEServing->nolog;
|
||||||
@ -1465,8 +1423,10 @@ drop:
|
|||||||
pCEServing->pCLwr = pCLServing;
|
pCEServing->pCLwr = pCLServing;
|
||||||
pCLServing->fwr = 1;
|
pCLServing->fwr = 1;
|
||||||
sprintf(acOut, "up -- attached]\r\n");
|
sprintf(acOut, "up -- attached]\r\n");
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
} else if (pCL == pCLServing) {
|
} else if (pCL == pCLServing) {
|
||||||
sprintf(acOut, "up]\r\n");
|
sprintf(acOut, "up]\r\n");
|
||||||
|
tagLogfile(pCEServing, "%s attached", pCLServing->acid);
|
||||||
} else {
|
} else {
|
||||||
sprintf(acOut, "up, %s is attached]\r\n", pCL->acid);
|
sprintf(acOut, "up, %s is attached]\r\n", pCL->acid);
|
||||||
}
|
}
|
||||||
@ -1501,6 +1461,7 @@ drop:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pCLServing->fwr = 0;
|
pCLServing->fwr = 0;
|
||||||
|
tagLogfile(pCEServing, "%s detached", pCLServing->acid);
|
||||||
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
|
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
|
||||||
CSTROUT(pCLServing->fd, "spying]\r\n");
|
CSTROUT(pCLServing->fd, "spying]\r\n");
|
||||||
break;
|
break;
|
||||||
@ -1534,7 +1495,11 @@ drop:
|
|||||||
case 'X':
|
case 'X':
|
||||||
CSTROUT(pCLServing->fd, "examine]\r\n");
|
CSTROUT(pCLServing->fd, "examine]\r\n");
|
||||||
for (iConsole = 0; iConsole < pGE->imembers; ++iConsole) {
|
for (iConsole = 0; iConsole < pGE->imembers; ++iConsole) {
|
||||||
sprintf(acOut, " %-24.24s on %-32.32s at %5.5s%c\r\n", pCE[iConsole].server, pCE[iConsole].dfile, pCE[iConsole].pbaud->acrate, pCE[iConsole].pparity->ckey);
|
if (pCE[iConsole].fvirtual) {
|
||||||
|
sprintf(acOut, " %-24.24s on %-32.32s at %5.5s%c\r\n", pCE[iConsole].server, pCE[iConsole].acslave, pCE[iConsole].pbaud->acrate, pCE[iConsole].pparity->ckey);
|
||||||
|
} else {
|
||||||
|
sprintf(acOut, " %-24.24s on %-32.32s at %5.5s%c\r\n", pCE[iConsole].server, pCE[iConsole].dfile, pCE[iConsole].pbaud->acrate, pCE[iConsole].pparity->ckey);
|
||||||
|
}
|
||||||
(void)write(pCLServing->fd, acOut, strlen(acOut));
|
(void)write(pCLServing->fd, acOut, strlen(acOut));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1551,6 +1516,7 @@ drop:
|
|||||||
pCLServing->fwr = 0;
|
pCLServing->fwr = 0;
|
||||||
pCLServing->fwantwr = 0;
|
pCLServing->fwantwr = 0;
|
||||||
pCEServing->pCLwr = (CONSCLIENT *)0;
|
pCEServing->pCLwr = (CONSCLIENT *)0;
|
||||||
|
tagLogfile(pCEServing, "%s detached", pCLServing->acid);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1596,11 +1562,9 @@ drop:
|
|||||||
if (pCEServing->isNetworkConsole) {
|
if (pCEServing->isNetworkConsole) {
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (pCEServing->fvirtual) {
|
if (pCEServing->fvirtual) {
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
if (-1 == tcgetattr(pCEServing->fdtty, & sbuf)) {
|
if (-1 == tcgetattr(pCEServing->fdtty, & sbuf)) {
|
||||||
@ -1675,11 +1639,11 @@ unknown:
|
|||||||
}
|
}
|
||||||
so = sizeof(in_port.sin_addr);
|
so = sizeof(in_port.sin_addr);
|
||||||
if ((struct hostent *)0 == (hpPeer = gethostbyaddr((char *)&in_port.sin_addr, so, AF_INET))) {
|
if ((struct hostent *)0 == (hpPeer = gethostbyaddr((char *)&in_port.sin_addr, so, AF_INET))) {
|
||||||
CSTROUT(pCLFree->fd, "unknown peer name\r\n");
|
cType = AccType(&in_port.sin_addr, NULL);
|
||||||
(void)close(pCLFree->fd);
|
} else {
|
||||||
continue;
|
cType = AccType(&in_port.sin_addr, hpPeer->h_name);
|
||||||
}
|
}
|
||||||
if ('r' == (cType = AccType(hpPeer))) {
|
if ('r' == cType) {
|
||||||
CSTROUT(pCLFree->fd, "access from your host refused\r\n");
|
CSTROUT(pCLFree->fd, "access from your host refused\r\n");
|
||||||
(void)close(pCLFree->fd);
|
(void)close(pCLFree->fd);
|
||||||
continue;
|
continue;
|
||||||
@ -1692,10 +1656,14 @@ unknown:
|
|||||||
|
|
||||||
/* init the identification stuff
|
/* init the identification stuff
|
||||||
*/
|
*/
|
||||||
sprintf(pCL->acid, "client@%.*s", (int)(sizeof(pCL->acid)-10), hpPeer->h_name);
|
if (hpPeer == (struct hostent *)0) {
|
||||||
pCL->typetym = pCL->tym = time((time_t *)0);
|
sprintf(pCL->acid, "client@%.*s", (int)(sizeof(pCL->acid)-10), inet_ntoa(in_port.sin_addr));
|
||||||
(void)strcpy(pCL->actym, ctime(&(pCL->tym)));
|
} else {
|
||||||
pCL->actym[24] = '\000';
|
sprintf(pCL->acid, "client@%.*s", (int)(sizeof(pCL->acid)-10), hpPeer->h_name);
|
||||||
|
}
|
||||||
|
Debug( "Client acid initialized to `%s'", pCL->acid );
|
||||||
|
(void)strcpy(pCL->actym, strtime(&(pCL->tym)));
|
||||||
|
pCL->typetym = pCL->tym;
|
||||||
|
|
||||||
/* link into the control list for the dummy console
|
/* link into the control list for the dummy console
|
||||||
*/
|
*/
|
||||||
@ -1770,7 +1738,7 @@ GRPENT *pGE;
|
|||||||
(void)bzero((char *)&lstn_port, sizeof(lstn_port));
|
(void)bzero((char *)&lstn_port, sizeof(lstn_port));
|
||||||
#endif
|
#endif
|
||||||
lstn_port.sin_family = AF_INET;
|
lstn_port.sin_family = AF_INET;
|
||||||
*(u_long *)&lstn_port.sin_addr = INADDR_ANY;
|
*(u_long *)&lstn_port.sin_addr = bindAddr;
|
||||||
lstn_port.sin_port = 0;
|
lstn_port.sin_port = 0;
|
||||||
|
|
||||||
/* create a socket to listen on
|
/* create a socket to listen on
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: group.h,v 5.13 2001-02-21 17:26:06-08 bryan Exp $
|
* $Id: group.h,v 5.15 2001-06-28 02:05:22-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -48,3 +48,5 @@ typedef struct grpent { /* group info */
|
|||||||
|
|
||||||
extern void Spawn();
|
extern void Spawn();
|
||||||
extern int CheckPass();
|
extern int CheckPass();
|
||||||
|
extern const char *strtime();
|
||||||
|
extern void tagLogfile();
|
||||||
|
207
conserver/main.c
207
conserver/main.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: main.c,v 5.47 2001-06-15 09:04:08-07 bryan Exp $
|
* $Id: main.c,v 5.56 2001-07-05 05:48:18-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -36,6 +36,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -54,30 +55,44 @@
|
|||||||
#include <version.h>
|
#include <version.h>
|
||||||
#include <output.h>
|
#include <output.h>
|
||||||
|
|
||||||
char rcsid[] =
|
int fAll = 1, fVerbose = 0, fSoftcar = 0, fNoinit = 0, fVersion = 0;
|
||||||
"$Id: main.c,v 5.47 2001-06-15 09:04:08-07 bryan Exp $";
|
|
||||||
char *progname =
|
|
||||||
rcsid;
|
|
||||||
int fAll = 1, fVerbose = 0, fSoftcar = 0, fNoinit = 0, fDebug = 0, fVersion = 0;
|
|
||||||
int fDaemon = 0;
|
int fDaemon = 0;
|
||||||
char chDefAcc = 'r';
|
char chDefAcc = 'r';
|
||||||
int thepid = 0;
|
|
||||||
|
|
||||||
#define FULLCFPATH SYSCONFDIR "/" CONFIGFILE;
|
#define FULLCFPATH SYSCONFDIR "/" CONFIGFILE;
|
||||||
#define FULLPDPATH SYSCONFDIR "/" PASSWDFILE;
|
#define FULLPDPATH SYSCONFDIR "/" PASSWDFILE;
|
||||||
|
|
||||||
|
char *pcLogfile = LOGFILEPATH;
|
||||||
char *pcConfig = FULLCFPATH;
|
char *pcConfig = FULLCFPATH;
|
||||||
char *pcPasswd = FULLPDPATH;
|
char *pcPasswd = FULLPDPATH;
|
||||||
|
char *pcPort = DEFPORT;
|
||||||
int domainHack = 0;
|
int domainHack = 0;
|
||||||
|
char *pcAddress = NULL;
|
||||||
#if defined(SERVICENAME)
|
unsigned long bindAddr;
|
||||||
char acService[] = SERVICENAME;
|
unsigned int bindPort;
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sockaddr_in in_port;
|
struct sockaddr_in in_port;
|
||||||
char acMyAddr[4]; /* "\200\76\7\1" */
|
char acMyAddr[4]; /* "\200\76\7\1" */
|
||||||
char acMyHost[256]; /* staff.cc.purdue.edu */
|
char acMyHost[256]; /* staff.cc.purdue.edu */
|
||||||
|
|
||||||
|
void
|
||||||
|
reopenLogfile()
|
||||||
|
{
|
||||||
|
/* redirect stdout and stderr to the logfile.
|
||||||
|
*
|
||||||
|
* first time through any problems will show up (stderr still there).
|
||||||
|
* after that, all bets are off...probably not see the errors (well,
|
||||||
|
* aside from the tail of the old logfile, if it was rolled).
|
||||||
|
*/
|
||||||
|
close(1);
|
||||||
|
if (1 != open(pcLogfile, O_WRONLY|O_CREAT|O_APPEND, 0644)) {
|
||||||
|
Error( "open: %s: %s", pcLogfile, strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
close(2);
|
||||||
|
dup(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* become a daemon (ksb)
|
/* become a daemon (ksb)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -98,6 +113,9 @@ daemonize()
|
|||||||
(void) signal(SIGTSTP, SIG_IGN);
|
(void) signal(SIGTSTP, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
(void)fflush(stdout);
|
||||||
|
(void)fflush(stderr);
|
||||||
|
|
||||||
switch (res = fork()) {
|
switch (res = fork()) {
|
||||||
case -1:
|
case -1:
|
||||||
Error( "fork: %s", strerror(errno));
|
Error( "fork: %s", strerror(errno));
|
||||||
@ -106,18 +124,19 @@ daemonize()
|
|||||||
thepid = getpid();
|
thepid = getpid();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sleep(1);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we read from stdin (by accident) we don't wanna block
|
/* if we read from stdin (by accident) we don't wanna block
|
||||||
*/
|
*/
|
||||||
close(0);
|
close(0);
|
||||||
if (0 != open("/dev/null", 2, 0644)) {
|
if (0 != open("/dev/null", O_RDWR, 0644)) {
|
||||||
Error( "open: /dev/null: %s", strerror(errno));
|
Error( "open: /dev/null: %s", strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reopenLogfile();
|
||||||
|
|
||||||
/* Further disassociate this process from the terminal
|
/* Further disassociate this process from the terminal
|
||||||
* Maybe this will allow you to start a daemon from rsh,
|
* Maybe this will allow you to start a daemon from rsh,
|
||||||
* i.e. with no controlling terminal.
|
* i.e. with no controlling terminal.
|
||||||
@ -145,29 +164,33 @@ daemonize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char u_terse[] =
|
||||||
|
" [-dDhinsvV] [-a type] [-M addr] [-p port] [-C config] [-P passwd] [-L logfile]";
|
||||||
static char *apcLong[] = {
|
static char *apcLong[] = {
|
||||||
"a type set the default access type",
|
"a type set the default access type",
|
||||||
"C config give a new config file to the server process",
|
"C config give a new config file to the server process",
|
||||||
"d become a daemon, output to /dev/null",
|
"d become a daemon, output to logfile (see -L)",
|
||||||
"D enable debug output, sent to stderr",
|
"D enable debug output, sent to stderr",
|
||||||
"h output this message",
|
"h output this message",
|
||||||
"i init console connections on demand",
|
"i init console connections on demand",
|
||||||
"n do not output summary stream to stdout",
|
"L logfile give a new logfile path to the server process",
|
||||||
"C passwd give a new passwd file to the server process",
|
"M addr address to listen on (all addresses by default)",
|
||||||
"v be verbose on startup",
|
"n do not output summary stream to stdout",
|
||||||
"V output version info",
|
"p port port to listen on",
|
||||||
|
"P passwd give a new passwd file to the server process",
|
||||||
|
"v be verbose on startup",
|
||||||
|
"V output version info",
|
||||||
(char *)0
|
(char *)0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* output a long message to the user (ksb)
|
/* output a long message to the user (ksb)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
Usage(fp, ppc)
|
Usage(ppc)
|
||||||
FILE *fp;
|
|
||||||
char **ppc;
|
char **ppc;
|
||||||
{
|
{
|
||||||
for (/* passed */; (char *)0 != *ppc; ++ppc)
|
for (/* passed */; (char *)0 != *ppc; ++ppc)
|
||||||
(void)fprintf(fp, "%s\n", *ppc);
|
fprintf(stderr, "\t%s\n", *ppc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* show the user our version info (ksb)
|
/* show the user our version info (ksb)
|
||||||
@ -176,44 +199,46 @@ static void
|
|||||||
Version()
|
Version()
|
||||||
{
|
{
|
||||||
auto char acA1[16], acA2[16];
|
auto char acA1[16], acA2[16];
|
||||||
#if defined(SERVICENAME)
|
int i;
|
||||||
char acOut[BUFSIZ];
|
|
||||||
#endif
|
outputPid = 0;
|
||||||
|
|
||||||
Info("%s", THIS_VERSION);
|
Info("%s", THIS_VERSION);
|
||||||
Info("default access type `%c\'", chDefAcc);
|
Info("default access type `%c\'", chDefAcc);
|
||||||
Info("default escape sequence `%s%s\'", FmtCtl(DEFATTN, acA1), FmtCtl(DEFESC, acA2));
|
Info("default escape sequence `%s%s\'", FmtCtl(DEFATTN, acA1), FmtCtl(DEFESC, acA2));
|
||||||
Info("configuration in `%s\'", pcConfig);
|
Info("configuration in `%s\'", pcConfig);
|
||||||
Info("password in `%s\'", pcPasswd);
|
Info("password in `%s\'", pcPasswd);
|
||||||
Info("pidfile in `%s\'", PIDFILE);
|
Info("logfile is `%s\'", pcLogfile);
|
||||||
|
Info("pidfile is `%s\'", PIDFILE);
|
||||||
Info("limited to %d group%s with %d member%s", MAXGRP, MAXGRP == 1 ? "" : "s", MAXMEMB, MAXMEMB == 1 ? "" : "s");
|
Info("limited to %d group%s with %d member%s", MAXGRP, MAXGRP == 1 ? "" : "s", MAXMEMB, MAXMEMB == 1 ? "" : "s");
|
||||||
#if CPARITY
|
#if CPARITY
|
||||||
Info("high-bit of data stripped (7-bit clean)");
|
Info("high-bit of data stripped (7-bit clean)");
|
||||||
#else
|
#else
|
||||||
Info("high-bit of data *not* stripped (8-bit clean)");
|
Info("high-bit of data *not* stripped (8-bit clean)");
|
||||||
#endif
|
#endif
|
||||||
#if defined(SERVICENAME)
|
|
||||||
{
|
/* Look for non-numeric characters */
|
||||||
|
for (i=0;pcPort[i] != '\000';i++)
|
||||||
|
if (!isdigit((int)pcPort[i])) break;
|
||||||
|
|
||||||
|
if ( pcPort[i] == '\000' ) {
|
||||||
|
/* numeric only */
|
||||||
|
bindPort = atoi( pcPort );
|
||||||
|
Info("on port %u (referenced as `%s')", bindPort, pcPort);
|
||||||
|
} else {
|
||||||
|
/* non-numeric only */
|
||||||
struct servent *pSE;
|
struct servent *pSE;
|
||||||
if ((struct servent *)0 == (pSE = getservbyname(acService, "tcp"))) {
|
if ((struct servent *)0 == (pSE = getservbyname(pcPort, "tcp"))) {
|
||||||
Error( "getservbyname: %s: %s", acService, strerror(errno));
|
Error("getservbyname: %s: %s", pcPort, strerror(errno));
|
||||||
return;
|
} else {
|
||||||
|
bindPort = ntohs((u_short)pSE->s_port);
|
||||||
|
Info("on port %u (referenced as `%s')", bindPort, pcPort);
|
||||||
}
|
}
|
||||||
sprintf(acOut, "service name `%s\'", pSE->s_name);
|
|
||||||
if (0 != strcmp(pSE->s_name, acService)) {
|
|
||||||
sprintf(acOut, " (which we call `%s\')", acService);
|
|
||||||
}
|
|
||||||
sprintf(acOut, " on port %d", ntohs((u_short)pSE->s_port));
|
|
||||||
Info( "%s", acOut );
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#if defined(PORTNUMBER)
|
if (fVerbose)
|
||||||
Info("on port %d", PORTNUMBER);
|
printf(COPYRIGHT);
|
||||||
#else
|
|
||||||
Info("no service or port compiled in");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find out where/who we are (ksb)
|
/* find out where/who we are (ksb)
|
||||||
@ -232,13 +257,14 @@ char **argv;
|
|||||||
register int i, j;
|
register int i, j;
|
||||||
register FILE *fpConfig;
|
register FILE *fpConfig;
|
||||||
auto struct hostent *hpMe;
|
auto struct hostent *hpMe;
|
||||||
static char acOpts[] = "a:C:dDhinP:sVv",
|
static char acOpts[] = "a:C:dDhiM:np:P:sVv";
|
||||||
u_terse[] = " [-dDhinsvV] [-a type] [-C config] [-P passwd]";
|
|
||||||
extern int optopt;
|
extern int optopt;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
auto REMOTE
|
auto REMOTE
|
||||||
*pRCUniq; /* list of uniq console servers */
|
*pRCUniq; /* list of uniq console servers */
|
||||||
|
|
||||||
|
outputPid = 1; /* make sure stuff has the pid */
|
||||||
|
|
||||||
thepid = getpid();
|
thepid = getpid();
|
||||||
if ((char *)0 == (progname = strrchr(argv[0], '/'))) {
|
if ((char *)0 == (progname = strrchr(argv[0], '/'))) {
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
@ -247,13 +273,17 @@ char **argv;
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void)setpwent();
|
(void)setpwent();
|
||||||
|
|
||||||
#if HAVE_SETLINEBUF
|
#if HAVE_SETLINEBUF
|
||||||
|
setlinebuf(stdout);
|
||||||
setlinebuf(stderr);
|
setlinebuf(stderr);
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SETVBUF
|
#if HAVE_SETVBUF
|
||||||
|
setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
|
||||||
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
(void)gethostname(acMyHost, sizeof(acMyHost));
|
(void)gethostname(acMyHost, sizeof(acMyHost));
|
||||||
if ((struct hostent *)0 == (hpMe = gethostbyname(acMyHost))) {
|
if ((struct hostent *)0 == (hpMe = gethostbyname(acMyHost))) {
|
||||||
Error( "gethostbyname(%s): %s", acMyHost, hstrerror(h_errno));
|
Error( "gethostbyname(%s): %s", acMyHost, hstrerror(h_errno));
|
||||||
@ -289,6 +319,9 @@ char **argv;
|
|||||||
case 'C':
|
case 'C':
|
||||||
pcConfig = optarg;
|
pcConfig = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
pcPort = optarg;
|
||||||
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
pcPasswd = optarg;
|
pcPasswd = optarg;
|
||||||
break;
|
break;
|
||||||
@ -299,12 +332,18 @@ char **argv;
|
|||||||
fDebug = 1;
|
fDebug = 1;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
Error( "usage%s", u_terse);
|
fprintf(stderr, "%s: usage%s\n", progname, u_terse);
|
||||||
Usage(stdout, apcLong);
|
Usage(apcLong);
|
||||||
exit(0);
|
exit(0);
|
||||||
case 'i':
|
case 'i':
|
||||||
fNoinit = 1;
|
fNoinit = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'L':
|
||||||
|
pcLogfile = optarg;
|
||||||
|
break;
|
||||||
|
case 'M':
|
||||||
|
pcAddress = optarg;
|
||||||
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
fAll = 0;
|
fAll = 0;
|
||||||
break;
|
break;
|
||||||
@ -318,7 +357,7 @@ char **argv;
|
|||||||
fVerbose = 1;
|
fVerbose = 1;
|
||||||
break;
|
break;
|
||||||
case '\?':
|
case '\?':
|
||||||
Error( "usage%s", u_terse);
|
fprintf(stderr, "%s: usage%s\n", progname, u_terse);
|
||||||
exit(1);
|
exit(1);
|
||||||
default:
|
default:
|
||||||
Error( "option %c needs a parameter", optopt);
|
Error( "option %c needs a parameter", optopt);
|
||||||
@ -331,11 +370,13 @@ char **argv;
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fDaemon) {
|
||||||
|
daemonize();
|
||||||
|
}
|
||||||
|
|
||||||
#if HAVE_GETSPNAM
|
#if HAVE_GETSPNAM
|
||||||
/* Why force root??? Cause of getsp*() calls... */
|
|
||||||
if (0 != geteuid()) {
|
if (0 != geteuid()) {
|
||||||
Error( "must be the superuser" );
|
Error( "Warning: Running as a non-root user - any shadow password usage will most likely fail!" );
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -345,7 +386,6 @@ char **argv;
|
|||||||
Error( "fopen: %s: %s", pcConfig, strerror(errno));
|
Error( "fopen: %s: %s", pcConfig, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ReadCfg(pcConfig, fpConfig);
|
|
||||||
|
|
||||||
#if HAVE_FLOCK
|
#if HAVE_FLOCK
|
||||||
/* we lock the configuration file so that two identical
|
/* we lock the configuration file so that two identical
|
||||||
@ -358,24 +398,48 @@ char **argv;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ReadCfg(pcConfig, fpConfig);
|
||||||
|
|
||||||
|
if ( pcAddress == NULL ) {
|
||||||
|
bindAddr = (unsigned long)INADDR_ANY;
|
||||||
|
} else {
|
||||||
|
if ((bindAddr = inet_addr(pcAddress)) == -1) {
|
||||||
|
Error("inet_addr: %s: %s", pcAddress, "invalid IP address");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Debug( "Bind address set to `%s'", inet_ntoa(*(struct in_addr *)&bindAddr) );
|
||||||
|
|
||||||
|
if ( pcPort == NULL )
|
||||||
|
{
|
||||||
|
Error( "Severe error: pcPort is NULL???? How can that be?" );
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Look for non-numeric characters */
|
||||||
|
for (i=0;pcPort[i] != '\000';i++)
|
||||||
|
if (!isdigit((int)pcPort[i])) break;
|
||||||
|
|
||||||
|
if ( pcPort[i] == '\000' ) {
|
||||||
|
/* numeric only */
|
||||||
|
bindPort = atoi( pcPort );
|
||||||
|
} else {
|
||||||
|
/* non-numeric only */
|
||||||
|
struct servent *pSE;
|
||||||
|
if ((struct servent *)0 == (pSE = getservbyname(pcPort, "tcp"))) {
|
||||||
|
Debug("getservbyname: %s: %s", pcPort, strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
} else {
|
||||||
|
bindPort = ntohs((u_short)pSE->s_port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* if no one can use us we need to come up with a default
|
/* if no one can use us we need to come up with a default
|
||||||
*/
|
*/
|
||||||
if (0 == iAccess) {
|
if (0 == iAccess) {
|
||||||
SetDefAccess(hpMe);
|
SetDefAccess(hpMe);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SETLINEBUF
|
|
||||||
setlinebuf(stdout);
|
|
||||||
#endif
|
|
||||||
#if HAVE_SETVBUF
|
|
||||||
setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
(void)fflush(stdout);
|
|
||||||
(void)fflush(stderr);
|
|
||||||
if (fDaemon) {
|
|
||||||
daemonize();
|
|
||||||
}
|
|
||||||
/* spawn all the children, so fix kids has an initial pid
|
/* spawn all the children, so fix kids has an initial pid
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < MAXGRP; ++i) {
|
for (i = 0; i < MAXGRP; ++i) {
|
||||||
@ -411,11 +475,6 @@ char **argv;
|
|||||||
|
|
||||||
(void)fflush(stdout);
|
(void)fflush(stdout);
|
||||||
(void)fflush(stderr);
|
(void)fflush(stderr);
|
||||||
/*
|
|
||||||
if (fDaemon) {
|
|
||||||
daemonize();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
Master(pRCUniq);
|
Master(pRCUniq);
|
||||||
|
|
||||||
/* stop putting kids back, and shoot them
|
/* stop putting kids back, and shoot them
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: main.h,v 5.18 2001-06-12 19:18:58-07 bryan Exp $
|
* $Id: main.h,v 5.21 2001-07-05 05:09:50-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -37,18 +37,15 @@
|
|||||||
/* program options and stuff
|
/* program options and stuff
|
||||||
*/
|
*/
|
||||||
extern char rcsid[];
|
extern char rcsid[];
|
||||||
extern char *progname;
|
extern int fAll, fVerbose, fSoftcar, fNoinit, fInteractive;
|
||||||
extern int fAll, fVerbose, fSoftcar, fNoinit, fInteractive, fDebug;
|
|
||||||
extern char chDefAcc;
|
extern char chDefAcc;
|
||||||
|
extern unsigned long bindAddr;
|
||||||
|
extern unsigned int bindPort;
|
||||||
|
extern char *pcLogfile;
|
||||||
extern char *pcConfig;
|
extern char *pcConfig;
|
||||||
extern char *pcPasswd;
|
extern char *pcPasswd;
|
||||||
extern struct sockaddr_in in_port;
|
extern struct sockaddr_in in_port;
|
||||||
extern char acMyHost[];
|
extern char acMyHost[];
|
||||||
extern char acMyAddr[];
|
extern char acMyAddr[];
|
||||||
extern int domainHack;
|
extern int domainHack;
|
||||||
extern int thepid;
|
extern void reopenLogfile();
|
||||||
|
|
||||||
#if defined(SERVICENAME)
|
|
||||||
extern char acService[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: master.c,v 5.36 2001-06-15 09:12:01-07 bryan Exp $
|
* $Id: master.c,v 5.42 2001-07-05 07:36:57-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -76,9 +76,7 @@ static void
|
|||||||
FixKids()
|
FixKids()
|
||||||
{
|
{
|
||||||
register int i, pid;
|
register int i, pid;
|
||||||
auto time_t tyme;
|
|
||||||
auto int UWbuf;
|
auto int UWbuf;
|
||||||
char styme[26];
|
|
||||||
|
|
||||||
#if HAVE_WAIT3
|
#if HAVE_WAIT3
|
||||||
while (-1 != (pid = wait3(& UWbuf, WNOHANG, (struct rusage *)0))) {
|
while (-1 != (pid = wait3(& UWbuf, WNOHANG, (struct rusage *)0))) {
|
||||||
@ -103,10 +101,7 @@ FixKids()
|
|||||||
/* this kid kid is dead, start another
|
/* this kid kid is dead, start another
|
||||||
*/
|
*/
|
||||||
Spawn(& aGroups[i]);
|
Spawn(& aGroups[i]);
|
||||||
tyme = time((time_t *)0);
|
Info("%s: exit(%d), restarted %s", aGroups[i].pCElist[0].server, WEXITSTATUS(UWbuf), strtime(NULL));
|
||||||
(void)strcpy(styme, ctime(&tyme));
|
|
||||||
styme[24] = '\000';
|
|
||||||
Info("%s: exit(%d), restarted %s", aGroups[i].pCElist[0].server, WEXITSTATUS(UWbuf), styme);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,7 +147,7 @@ SignalKids(arg)
|
|||||||
if (0 == aGroups[i].imembers)
|
if (0 == aGroups[i].imembers)
|
||||||
continue;
|
continue;
|
||||||
if (-1 == kill(aGroups[i].pid, arg)) {
|
if (-1 == kill(aGroups[i].pid, arg)) {
|
||||||
Error("%s: kill: %s", strerror(errno));
|
Error("kill: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,40 +189,25 @@ REMOTE
|
|||||||
(void)bzero((char *)&master_port, sizeof(master_port));
|
(void)bzero((char *)&master_port, sizeof(master_port));
|
||||||
#endif
|
#endif
|
||||||
master_port.sin_family = AF_INET;
|
master_port.sin_family = AF_INET;
|
||||||
*(u_long *)&master_port.sin_addr = INADDR_ANY;
|
*(u_long *)&master_port.sin_addr = bindAddr;
|
||||||
#if defined(SERVICENAME)
|
master_port.sin_port = htons(bindPort);
|
||||||
{
|
|
||||||
struct servent *pSE;
|
|
||||||
if ((struct servent *)0 == (pSE = getservbyname(acService, "tcp"))) {
|
|
||||||
Error("%s: getservbyname: %s: %s", acService, strerror(errno));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
master_port.sin_port = pSE->s_port;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
# if defined(PORTNUMBER)
|
|
||||||
master_port.sin_port = htons((u_short)PORTNUMBER);
|
|
||||||
# else
|
|
||||||
Error("%s: no port or service compiled in?");
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((msfd=socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
if ((msfd=socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||||
Error("%s: socket: %s", strerror(errno));
|
Error("socket: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if HAVE_SETSOCKOPT
|
#if HAVE_SETSOCKOPT
|
||||||
if (setsockopt(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true))<0) {
|
if (setsockopt(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true))<0) {
|
||||||
Error("%s: setsockopt: %s", strerror(errno));
|
Error("setsockopt: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (bind(msfd, (struct sockaddr *)&master_port, sizeof(master_port))<0) {
|
if (bind(msfd, (struct sockaddr *)&master_port, sizeof(master_port))<0) {
|
||||||
Error("%s: bind: %s", strerror(errno));
|
Error("bind: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (listen(msfd, SOMAXCONN) < 0) {
|
if (listen(msfd, SOMAXCONN) < 0) {
|
||||||
Error("%s: listen: %s", strerror(errno));
|
Error("listen: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
FD_ZERO(&rmaster);
|
FD_ZERO(&rmaster);
|
||||||
@ -239,6 +219,7 @@ REMOTE
|
|||||||
}
|
}
|
||||||
if (fSawHUP) {
|
if (fSawHUP) {
|
||||||
fSawHUP = 0;
|
fSawHUP = 0;
|
||||||
|
reopenLogfile();
|
||||||
SignalKids(SIGHUP);
|
SignalKids(SIGHUP);
|
||||||
}
|
}
|
||||||
if (fSawUSR1) {
|
if (fSawUSR1) {
|
||||||
@ -250,7 +231,7 @@ REMOTE
|
|||||||
|
|
||||||
if (-1 == select(msfd+1, &rmask, (fd_set *)0, (fd_set *)0, (struct timeval *)0)) {
|
if (-1 == select(msfd+1, &rmask, (fd_set *)0, (fd_set *)0, (struct timeval *)0)) {
|
||||||
if ( errno != EINTR ) {
|
if ( errno != EINTR ) {
|
||||||
Error("%s: select: %s", strerror(errno));
|
Error("select: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -260,7 +241,7 @@ REMOTE
|
|||||||
so = sizeof(response_port);
|
so = sizeof(response_port);
|
||||||
cfd = accept(msfd, (struct sockaddr *)&response_port, (socklen_t *)&so);
|
cfd = accept(msfd, (struct sockaddr *)&response_port, (socklen_t *)&so);
|
||||||
if (cfd < 0) {
|
if (cfd < 0) {
|
||||||
Error("%s: accept: %s", strerror(errno));
|
Error("accept: %s", strerror(errno));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,11 +254,11 @@ REMOTE
|
|||||||
}
|
}
|
||||||
so = sizeof(in_port.sin_addr);
|
so = sizeof(in_port.sin_addr);
|
||||||
if ((struct hostent *)0 == (hpPeer = gethostbyaddr((char *)&in_port.sin_addr, so, AF_INET))) {
|
if ((struct hostent *)0 == (hpPeer = gethostbyaddr((char *)&in_port.sin_addr, so, AF_INET))) {
|
||||||
CSTROUT(cfd, "unknown peer name\r\n");
|
cType = AccType(&in_port.sin_addr, NULL);
|
||||||
(void)close(cfd);
|
} else {
|
||||||
continue;
|
cType = AccType(&in_port.sin_addr, hpPeer->h_name);
|
||||||
}
|
}
|
||||||
if ('r' == (cType = AccType(hpPeer))) {
|
if ('r' == cType) {
|
||||||
CSTROUT(cfd, "access from your host refused\r\n");
|
CSTROUT(cfd, "access from your host refused\r\n");
|
||||||
(void)close(cfd);
|
(void)close(cfd);
|
||||||
continue;
|
continue;
|
||||||
@ -322,7 +303,7 @@ REMOTE
|
|||||||
acIn[--i] = '\000';
|
acIn[--i] = '\000';
|
||||||
}
|
}
|
||||||
if (0 == i) {
|
if (0 == i) {
|
||||||
Error("%s: lost connection");
|
Error("lost connection");
|
||||||
(void)close(cfd);
|
(void)close(cfd);
|
||||||
#if TEST_FORK
|
#if TEST_FORK
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: output.c,v 1.5 2001-06-15 07:16:51-07 bryan Exp $
|
* $Id: output.c,v 1.6 2001-07-05 00:09:39-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -8,9 +8,13 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <varargs.h>
|
#include <varargs.h>
|
||||||
#include <main.h>
|
|
||||||
#include <output.h>
|
#include <output.h>
|
||||||
|
|
||||||
|
int outputPid = 0;
|
||||||
|
char *progname = "conserver package";
|
||||||
|
int thepid = 0;
|
||||||
|
int fDebug = 0;
|
||||||
|
|
||||||
void Debug(fmt, va_alist)
|
void Debug(fmt, va_alist)
|
||||||
char *fmt;
|
char *fmt;
|
||||||
va_dcl
|
va_dcl
|
||||||
@ -18,7 +22,10 @@ va_dcl
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap);
|
va_start(ap);
|
||||||
if (!fDebug) return;
|
if (!fDebug) return;
|
||||||
fprintf(stderr, "%s (%d): DEBUG: ", progname, thepid );
|
if (outputPid)
|
||||||
|
fprintf(stderr, "%s (%d): DEBUG: ", progname, thepid);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: DEBUG: ", progname);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
fprintf(stderr, "\n" );
|
fprintf(stderr, "\n" );
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
@ -30,7 +37,10 @@ va_dcl
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap);
|
va_start(ap);
|
||||||
fprintf(stderr, "%s (%d): ", progname, thepid );
|
if (outputPid)
|
||||||
|
fprintf(stderr, "%s (%d): ", progname, thepid);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: ", progname);
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
fprintf(stderr, "\n" );
|
fprintf(stderr, "\n" );
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
@ -42,7 +52,10 @@ va_dcl
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap);
|
va_start(ap);
|
||||||
fprintf(stdout, "%s (%d): ", progname, thepid );
|
if (outputPid)
|
||||||
|
fprintf(stdout, "%s (%d): ", progname, thepid);
|
||||||
|
else
|
||||||
|
fprintf(stdout, "%s: ", progname);
|
||||||
vfprintf(stdout, fmt, ap);
|
vfprintf(stdout, fmt, ap);
|
||||||
fprintf(stdout, "\n" );
|
fprintf(stdout, "\n" );
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: output.h,v 1.1 2001-06-14 09:28:05-07 bryan Exp $
|
* $Id: output.h,v 1.2 2001-07-05 00:09:39-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -9,3 +9,6 @@
|
|||||||
extern void Debug();
|
extern void Debug();
|
||||||
extern void Error();
|
extern void Error();
|
||||||
extern void Info();
|
extern void Info();
|
||||||
|
extern int outputPid, fDebug;
|
||||||
|
extern char *progname;
|
||||||
|
extern int thepid;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: port.h,v 1.21 2001-02-21 17:26:06-08 bryan Exp $
|
* $Id: port.h,v 1.26 2001-07-05 00:14:06-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -59,26 +59,6 @@
|
|||||||
# define MAXREPLAY (80*25)
|
# define MAXREPLAY (80*25)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* the console server will provide a pseudo-device console which
|
|
||||||
* allows operators to run backups and such without a hard wired
|
|
||||||
* line (this is also good for testing the server to see if you
|
|
||||||
* might wanna use it). Turn this on only if you (might) need it.
|
|
||||||
*/
|
|
||||||
#if !defined(DO_VIRTUAL)
|
|
||||||
# define DO_VIRTUAL 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
/* if the virtual console option is on we need a source to ptys,
|
|
||||||
* the PUCC ptyd daemon is the best source be know, else fall back
|
|
||||||
* on some emulation code?? (XXX)
|
|
||||||
*/
|
|
||||||
#if !defined(HAVE_PTYD)
|
|
||||||
# define HAVE_PTYD (defined(S81)||defined(VAX8800))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* virtual (process on a pseudo-tty) console support */
|
|
||||||
|
|
||||||
/* communication constants
|
/* communication constants
|
||||||
*/
|
*/
|
||||||
#define OB_SUSP 'Z' /* suspended by server */
|
#define OB_SUSP 'Z' /* suspended by server */
|
||||||
@ -110,3 +90,16 @@ extern int shut_up_lint;
|
|||||||
write(Mfd, _ac, sizeof(_ac)-1); \
|
write(Mfd, _ac, sizeof(_ac)-1); \
|
||||||
} while (shut_up_lint)
|
} while (shut_up_lint)
|
||||||
|
|
||||||
|
/* For legacy compile-time setting of the port...
|
||||||
|
*/
|
||||||
|
#if ! defined(DEFPORT)
|
||||||
|
# if defined(SERVICENAME)
|
||||||
|
# define DEFPORT SERVICENAME
|
||||||
|
# else
|
||||||
|
# if defined(PORTNUMBER)
|
||||||
|
# define DEFPORT PORTNUMBER
|
||||||
|
# else
|
||||||
|
# define DEFPORT "conserver"
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: readcfg.c,v 5.35 2001-06-15 09:04:41-07 bryan Exp $
|
* $Id: readcfg.c,v 5.45 2001-07-05 09:06:52-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -57,7 +57,6 @@
|
|||||||
#include <main.h>
|
#include <main.h>
|
||||||
#include <output.h>
|
#include <output.h>
|
||||||
|
|
||||||
|
|
||||||
GRPENT
|
GRPENT
|
||||||
aGroups[MAXGRP]; /* even spread is OK */
|
aGroups[MAXGRP]; /* even spread is OK */
|
||||||
CONSENT
|
CONSENT
|
||||||
@ -72,6 +71,122 @@ ACCESS
|
|||||||
int
|
int
|
||||||
iAccess; /* how many access restrictions we have */
|
iAccess; /* how many access restrictions we have */
|
||||||
|
|
||||||
|
/* Parse the [number(m|h|d|l)[a]] spec
|
||||||
|
* return 0 on invalid spec, non-zero on valid spec
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
parseMark(pcFile, iLine, pcMark, tyme, pCE)
|
||||||
|
const char *pcFile;
|
||||||
|
const int iLine;
|
||||||
|
const char *pcMark;
|
||||||
|
CONSENT *pCE;
|
||||||
|
{
|
||||||
|
char mark[BUFSIZ];
|
||||||
|
char *p, *n = (char *)0;
|
||||||
|
int activity = 0;
|
||||||
|
int factor = 0, pfactor = 0;
|
||||||
|
int value = 0, pvalue = 0;
|
||||||
|
|
||||||
|
if ((pcMark == (char *)0) ||
|
||||||
|
(*pcMark == '\000'))
|
||||||
|
return 0;
|
||||||
|
(void)strcpy(mark, pcMark);
|
||||||
|
|
||||||
|
for (p = mark; *p != '\000'; p++) {
|
||||||
|
if ( *p == 'a' || *p == 'A' ) {
|
||||||
|
if ( n != (char *)0 ) {
|
||||||
|
Error( "%s(%d) bad timestamp specification `%s': numeral before `a' (ignoring numeral)", pcFile, iLine, pcMark);
|
||||||
|
}
|
||||||
|
activity = 1;
|
||||||
|
} else if ( *p == 'm' || *p == 'M' ) {
|
||||||
|
pfactor = 60;
|
||||||
|
} else if ( *p == 'h' || *p == 'H' ) {
|
||||||
|
pfactor = 60 * 60;
|
||||||
|
} else if ( *p == 'd' || *p == 'D') {
|
||||||
|
pfactor = 60 * 60 * 24;
|
||||||
|
} else if ( *p == 'l' || *p == 'L') {
|
||||||
|
pfactor = -1;
|
||||||
|
} else if ( isdigit((int)*p) ) {
|
||||||
|
if ( n == (char *)0 )
|
||||||
|
n = p;
|
||||||
|
} else {
|
||||||
|
Error( "%s(%d) bad timestamp specification `%s': unknown character `%c'", pcFile, iLine, pcMark, *p);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if ( pfactor ) {
|
||||||
|
if ( n == (char *)0 ) {
|
||||||
|
Error( "%s(%d) bad timestamp specification `%s': missing numeric prefix for `%c'", pcFile, iLine, pcMark, *p);
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
*p = '\000';
|
||||||
|
pvalue = atoi(n);
|
||||||
|
if ( pvalue < 0 ) {
|
||||||
|
Error( "%s(%d) negative timestamp specification `%s'", pcFile, iLine, pcMark);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
n = (char *)0;
|
||||||
|
factor = pfactor;
|
||||||
|
value = pvalue * pfactor;
|
||||||
|
pvalue = pfactor = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug( "Mark spec of `%s' parsed: factor=%d, value=%d, activity=%d", pcMark, factor, value, activity );
|
||||||
|
|
||||||
|
if (pCE != (CONSENT *)0) {
|
||||||
|
pCE->activitylog = activity;
|
||||||
|
if ( factor && value ) {
|
||||||
|
pCE->mark = value;
|
||||||
|
if ( factor > 0 ) {
|
||||||
|
pCE->nextMark = tyme + value;
|
||||||
|
} else {
|
||||||
|
pCE->nextMark = value;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pCE->nextMark = pCE->mark = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return factor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* replace trailing space with '\000' in a string and return
|
||||||
|
* a pointer to the start of the non-space part
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
pruneSpace( string )
|
||||||
|
char *string;
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
char *head = (char *)0;
|
||||||
|
char *tail = (char *)0;
|
||||||
|
|
||||||
|
/* Don't do much if it's crap */
|
||||||
|
if ( string == (char *)0 || *string == '\000' )
|
||||||
|
return string;
|
||||||
|
|
||||||
|
/* Now for the tricky part - search the string */
|
||||||
|
for (p = string; *p != '\000'; p++) {
|
||||||
|
if (isspace((int)(*p))) {
|
||||||
|
if (tail == (char *)0)
|
||||||
|
tail = p; /* possible end of string */
|
||||||
|
} else {
|
||||||
|
if (head == (char *)0)
|
||||||
|
head = p; /* found the start */
|
||||||
|
tail = (char *)0; /* reset tail */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tail != (char *)0)
|
||||||
|
*tail = '\000';
|
||||||
|
|
||||||
|
if (head != (char *)0)
|
||||||
|
return head;
|
||||||
|
else
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
/* read in the configuration file, fill in all the structs we use (ksb)
|
/* read in the configuration file, fill in all the structs we use (ksb)
|
||||||
* to manage the consoles
|
* to manage the consoles
|
||||||
*/
|
*/
|
||||||
@ -84,11 +199,13 @@ register FILE *fp;
|
|||||||
register int iG, minG;
|
register int iG, minG;
|
||||||
auto int iLine;
|
auto int iLine;
|
||||||
auto char acIn[BUFSIZ];
|
auto char acIn[BUFSIZ];
|
||||||
|
char *acStart;
|
||||||
register GRPENT *pGEAll;
|
register GRPENT *pGEAll;
|
||||||
register CONSENT *pCE;
|
register CONSENT *pCE;
|
||||||
register REMOTE **ppRC;
|
register REMOTE **ppRC;
|
||||||
char LogDirectory[MAXLOGLEN];
|
char LogDirectory[MAXLOGLEN];
|
||||||
time_t tyme;
|
time_t tyme;
|
||||||
|
char defMark[BUFSIZ];
|
||||||
|
|
||||||
tyme = time((time_t *)0);
|
tyme = time((time_t *)0);
|
||||||
LogDirectory[0] = '\000';
|
LogDirectory[0] = '\000';
|
||||||
@ -103,33 +220,35 @@ register FILE *fp;
|
|||||||
register char *pcLine, *pcMode, *pcLog, *pcRem, *pcStart, *pcMark;
|
register char *pcLine, *pcMode, *pcLog, *pcRem, *pcStart, *pcMark;
|
||||||
|
|
||||||
++iLine;
|
++iLine;
|
||||||
for (pcRem = acIn+strlen(acIn)-1; pcRem >= acIn; --pcRem) {
|
|
||||||
if (!isspace((int)(*pcRem)))
|
acStart = pruneSpace( acIn );
|
||||||
break;
|
|
||||||
*pcRem = '\000';
|
if ('#' == acStart[0] || '\000' == acStart[0]) {
|
||||||
if (pcRem == acIn)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if ('#' == acIn[0] || '\000' == acIn[0]) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ('%' == acIn[0] && '%' == acIn[1] && '\000' == acIn[2]) {
|
if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( (char *)0 == strchr(acIn, ':') &&
|
if ( (char *)0 == strchr(acStart, ':') &&
|
||||||
(char *)0 != (pcLine = strchr(acIn, '=')) ) {
|
(char *)0 != (pcLine = strchr(acStart, '=')) ) {
|
||||||
*pcLine = '\000';
|
*pcLine++ = '\000';
|
||||||
if ( 0 == strcmp(acIn, "LOGDIR") ) {
|
acStart = pruneSpace( acStart );
|
||||||
(void)strcpy(LogDirectory, ++pcLine);
|
pcLine = pruneSpace( pcLine );
|
||||||
} else if ( 0 == strcmp(acIn, "DOMAINHACK") ) {
|
if ( 0 == strcmp(acStart, "LOGDIR") ) {
|
||||||
|
(void)strcpy(LogDirectory, pcLine);
|
||||||
|
} else if ( 0 == strcmp(acStart, "TIMESTAMP") ) {
|
||||||
|
if ( parseMark(pcFile, iLine, pcLine, tyme, NULL) )
|
||||||
|
(void)strcpy(defMark, pcLine);
|
||||||
|
else
|
||||||
|
defMark[0] = '\000';
|
||||||
|
} else if ( 0 == strcmp(acStart, "DOMAINHACK") ) {
|
||||||
domainHack = 1;
|
domainHack = 1;
|
||||||
} else {
|
} else {
|
||||||
*pcLine = '=';
|
Error( "%s(%d) unknown variable `%s'", pcFile, iLine, acStart);
|
||||||
Error( "%s(%d) bad variable line `%s'", pcFile, iLine, acIn);
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( (char *)0 == (pcLine = strchr(acIn, ':')) ||
|
if ( (char *)0 == (pcLine = strchr(acStart, ':')) ||
|
||||||
(char *)0 == (pcMode = strchr(pcLine+1, ':')) ||
|
(char *)0 == (pcMode = strchr(pcLine+1, ':')) ||
|
||||||
(char *)0 == (pcLog = strchr(pcMode+1, ':'))) {
|
(char *)0 == (pcLog = strchr(pcMode+1, ':'))) {
|
||||||
Error( "%s(%d) bad config line `%s'", pcFile, iLine, acIn);
|
Error( "%s(%d) bad config line `%s'", pcFile, iLine, acIn);
|
||||||
@ -139,8 +258,14 @@ register FILE *fp;
|
|||||||
*pcMode++ = '\000';
|
*pcMode++ = '\000';
|
||||||
*pcLog++ = '\000';
|
*pcLog++ = '\000';
|
||||||
|
|
||||||
|
acStart = pruneSpace( acStart );
|
||||||
|
pcLine = pruneSpace( pcLine );
|
||||||
|
pcMode = pruneSpace( pcMode );
|
||||||
|
pcLog = pruneSpace( pcLog );
|
||||||
|
|
||||||
if ((char *)0 != (pcMark = strchr(pcLog, ':'))) {
|
if ((char *)0 != (pcMark = strchr(pcLog, ':'))) {
|
||||||
*pcMark++ = '\000';
|
*pcMark++ = '\000';
|
||||||
|
pcMark = pruneSpace( pcMark );
|
||||||
/* Skip null intervals */
|
/* Skip null intervals */
|
||||||
if ( pcMark[0] == '\000' ) pcMark = (char *)0;
|
if ( pcMark[0] == '\000' ) pcMark = (char *)0;
|
||||||
}
|
}
|
||||||
@ -154,6 +279,8 @@ register FILE *fp;
|
|||||||
auto struct hostent *hpMe;
|
auto struct hostent *hpMe;
|
||||||
|
|
||||||
*pcRem++ = '\000';
|
*pcRem++ = '\000';
|
||||||
|
pcLine = pruneSpace( pcLine );
|
||||||
|
pcRem = pruneSpace( pcRem );
|
||||||
|
|
||||||
if ((struct hostent *)0 ==
|
if ((struct hostent *)0 ==
|
||||||
(hpMe = gethostbyname(pcRem))) {
|
(hpMe = gethostbyname(pcRem))) {
|
||||||
@ -181,11 +308,11 @@ register FILE *fp;
|
|||||||
exit(32);
|
exit(32);
|
||||||
}
|
}
|
||||||
(void)strcpy(pRCTemp->rhost, pcRem);
|
(void)strcpy(pRCTemp->rhost, pcRem);
|
||||||
(void)strcpy(pRCTemp->rserver, acIn);
|
(void)strcpy(pRCTemp->rserver, acStart);
|
||||||
*ppRC = pRCTemp;
|
*ppRC = pRCTemp;
|
||||||
ppRC = & pRCTemp->pRCnext;
|
ppRC = & pRCTemp->pRCnext;
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
Info("%s remote on %s", acIn, pcRem);
|
Info("%s remote on %s", acStart, pcRem);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -215,7 +342,7 @@ register FILE *fp;
|
|||||||
Error( "%s(%d) %d is too many consoles for hard coded tables, adjust MAXGRP or MAXMEMB", pcFile, iLine, iLocal);
|
Error( "%s(%d) %d is too many consoles for hard coded tables, adjust MAXGRP or MAXMEMB", pcFile, iLine, iLocal);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
(void)strcpy(pCE->server, acIn);
|
(void)strcpy(pCE->server, acStart);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here we substitute the console name for any '&' character in the
|
* Here we substitute the console name for any '&' character in the
|
||||||
@ -227,7 +354,7 @@ register FILE *fp;
|
|||||||
while ((char *)0 != (pcRem = strchr(pcStart, '&'))) {
|
while ((char *)0 != (pcRem = strchr(pcStart, '&'))) {
|
||||||
*pcRem = '\000';
|
*pcRem = '\000';
|
||||||
(void)strcat(pCE->lfile, pcStart);
|
(void)strcat(pCE->lfile, pcStart);
|
||||||
(void)strcat(pCE->lfile, acIn);
|
(void)strcat(pCE->lfile, acStart);
|
||||||
pcStart = pcRem + 1;
|
pcStart = pcRem + 1;
|
||||||
}
|
}
|
||||||
(void)strcat(pCE->lfile, pcStart);
|
(void)strcat(pCE->lfile, pcStart);
|
||||||
@ -240,41 +367,11 @@ register FILE *fp;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( pcMark ) {
|
if ( pcMark ) {
|
||||||
int factor = 0;
|
(void)parseMark(pcFile, iLine, pcMark, tyme, pCE);
|
||||||
char *p;
|
} else {
|
||||||
p = pcMark + strlen(pcMark) - 1;
|
(void)parseMark(pcFile, iLine, defMark, tyme, pCE);
|
||||||
if ( *p == 'm' || *p == 'M' ) {
|
|
||||||
factor = 60;
|
|
||||||
} else if ( *p == 'h' || *p == 'H' ) {
|
|
||||||
factor = 60 * 60;
|
|
||||||
} else if ( *p == 'd' || *p == 'D') {
|
|
||||||
factor = 60 * 60 * 24;
|
|
||||||
} else if ( *p == 'l' || *p == 'L') {
|
|
||||||
factor = -1;
|
|
||||||
} else {
|
|
||||||
Error( "%s(%d) bad mark specification `%s'", pcFile, iLine, pcMark);
|
|
||||||
pcMark = 0;
|
|
||||||
}
|
|
||||||
if ( factor ) {
|
|
||||||
*p = '\000';
|
|
||||||
pCE->mark = atoi(pcMark);
|
|
||||||
if ( pCE->mark < 0 ) {
|
|
||||||
Error( "%s(%d) negative mark specification `%s'", pcFile, iLine, pcMark);
|
|
||||||
pcMark = 0;
|
|
||||||
}
|
|
||||||
pCE->mark = pCE->mark * factor;
|
|
||||||
if ( factor > 0 ) {
|
|
||||||
pCE->nextMark = tyme + pCE->mark;
|
|
||||||
} else {
|
|
||||||
pCE->nextMark = pCE->mark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( !pcMark ) {
|
|
||||||
pCE->nextMark = pCE->mark = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (pcLine[0] == '!')
|
if (pcLine[0] == '!')
|
||||||
{
|
{
|
||||||
pCE->isNetworkConsole = 1;
|
pCE->isNetworkConsole = 1;
|
||||||
@ -282,8 +379,8 @@ register FILE *fp;
|
|||||||
pCE->networkConsolePort = atoi(pcMode);
|
pCE->networkConsolePort = atoi(pcMode);
|
||||||
|
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
Info("%d: %s is network on %s/%d logged to %s",
|
Info("%s is network on %s/%d logged to %s",
|
||||||
iG, acIn, pCE->networkConsoleHost,
|
acStart, pCE->networkConsoleHost,
|
||||||
pCE->networkConsolePort, pCE->lfile);
|
pCE->networkConsolePort, pCE->lfile);
|
||||||
}
|
}
|
||||||
pCE->fvirtual = 0;
|
pCE->fvirtual = 0;
|
||||||
@ -299,19 +396,13 @@ register FILE *fp;
|
|||||||
}
|
}
|
||||||
(void)strcpy(pCE->pccmd, pcLine+1);
|
(void)strcpy(pCE->pccmd, pcLine+1);
|
||||||
(void)strcpy(pCE->dfile, "/dev/null");
|
(void)strcpy(pCE->dfile, "/dev/null");
|
||||||
|
(void)strcpy(pCE->acslave, "/dev/null");
|
||||||
} else {
|
} else {
|
||||||
pCE->isNetworkConsole = 0;
|
pCE->isNetworkConsole = 0;
|
||||||
pCE->fvirtual = 0;
|
pCE->fvirtual = 0;
|
||||||
(void)strcpy(pCE->dfile, pcLine);
|
(void)strcpy(pCE->dfile, pcLine);
|
||||||
}
|
}
|
||||||
pCE->ipid = -1;
|
pCE->ipid = -1;
|
||||||
#else
|
|
||||||
if ('|' == pcLine[0]) {
|
|
||||||
Error( "%s(%d) this server doesn't provide any virtual console support", pcFile, iLine);
|
|
||||||
exit(9);
|
|
||||||
}
|
|
||||||
(void)strcpy(pCE->dfile, pcLine);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!pCE->isNetworkConsole)
|
if (!pCE->isNetworkConsole)
|
||||||
{
|
{
|
||||||
@ -321,12 +412,10 @@ register FILE *fp;
|
|||||||
pCE->pbaud = FindBaud(pcMode);
|
pCE->pbaud = FindBaud(pcMode);
|
||||||
pCE->pparity = FindParity(pcMode);
|
pCE->pparity = FindParity(pcMode);
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
#if DO_VIRTUAL
|
|
||||||
if (pCE->fvirtual)
|
if (pCE->fvirtual)
|
||||||
Info("%d: %s with command `%s' logged to %s", iG, acIn, pCE->pccmd, pCE->lfile);
|
Info("%s with command `%s' logged to %s", acStart, pCE->pccmd, pCE->lfile);
|
||||||
else
|
else
|
||||||
#endif
|
Info("%s is on %s (%s%c) logged to %s", acStart, pCE->dfile, pCE->pbaud->acrate, pCE->pparity->ckey, pCE->lfile);
|
||||||
Info("%d: %s is on %s (%s%c) logged to %s", iG, acIn, pCE->dfile, pCE->pbaud->acrate, pCE->pparity->ckey, pCE->lfile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++pCE, ++iLocal;
|
++pCE, ++iLocal;
|
||||||
@ -338,32 +427,30 @@ register FILE *fp;
|
|||||||
iG = iAccess = 0;
|
iG = iAccess = 0;
|
||||||
pACList = (ACCESS *)0;
|
pACList = (ACCESS *)0;
|
||||||
while (fgets(acIn, sizeof(acIn)-1, fp) != NULL) {
|
while (fgets(acIn, sizeof(acIn)-1, fp) != NULL) {
|
||||||
register char *pcRem, *pcMach, *pcNext, *pcMem;
|
register char *pcMach, *pcNext, *pcMem;
|
||||||
auto char cType;
|
auto char cType;
|
||||||
auto int iLen;
|
auto int iLen;
|
||||||
|
|
||||||
++iLine;
|
++iLine;
|
||||||
for (pcRem = acIn+strlen(acIn)-1; pcRem >= acIn; --pcRem) {
|
|
||||||
if (!isspace((int)(*pcRem)))
|
acStart = pruneSpace( acIn );
|
||||||
break;
|
|
||||||
*pcRem = '\000';
|
if ('#' == acStart[0] || '\000' == acStart[0]) {
|
||||||
if (pcRem == acIn)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if ('#' == acIn[0] || '\000' == acIn[0]) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ('%' == acIn[0] && '%' == acIn[1] && '\000' == acIn[2]) {
|
if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((char *)0 == (pcNext = strchr(acIn, ':'))) {
|
if ((char *)0 == (pcNext = strchr(acStart, ':'))) {
|
||||||
Error( "%s(%d) missing colon?", pcFile, iLine);
|
Error( "%s(%d) missing colon?", pcFile, iLine);
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
*pcNext++ = '\000';
|
*pcNext++ = '\000';
|
||||||
} while (isspace((int)(*pcNext)));
|
} while (isspace((int)(*pcNext)));
|
||||||
switch (acIn[0]) {
|
|
||||||
|
switch (acStart[0]) {
|
||||||
case 'a': /* allowed, allow, allows */
|
case 'a': /* allowed, allow, allows */
|
||||||
case 'A':
|
case 'A':
|
||||||
cType = 'a';
|
cType = 'a';
|
||||||
@ -377,7 +464,7 @@ register FILE *fp;
|
|||||||
cType = 't';
|
cType = 't';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Error( "%s(%d) unknown access key `%s\'", pcFile, iLine, acIn);
|
Error( "%s(%d) unknown access key `%s\'", pcFile, iLine, acStart);
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
while ('\000' != *(pcMach = pcNext)) {
|
while ('\000' != *(pcMach = pcNext)) {
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# $Id: stamper.sh,v 4.1 91/06/19 14:40:46 ksb Exp $
|
|
||||||
#
|
|
||||||
# The outputs a time stamp once an hour (on the hour, we hope).
|
|
||||||
# We take a list of logfiles to stamp
|
|
||||||
#
|
|
||||||
PROGNAME=`basename $0 .sh`
|
|
||||||
if [ "$#" -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "$PROGNAME: usage files" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# sleep until the top of the hour
|
|
||||||
# output a mark on each log file
|
|
||||||
# sleep for nearly an hour
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
(
|
|
||||||
IFS="$IFS:"
|
|
||||||
|
|
||||||
# _ Wed Jun 19 14:31:02 EST 1991
|
|
||||||
# $1 $2 $3 $4 $5 $6 $7 $8 $9
|
|
||||||
set _ `date`
|
|
||||||
|
|
||||||
#sleep `expr 3600 - \( $6 \* 60 + $7 \)`
|
|
||||||
)
|
|
||||||
|
|
||||||
mark="[-- MARK -- `date`]"
|
|
||||||
for file
|
|
||||||
do
|
|
||||||
if [ _"-" = _"$file" ]
|
|
||||||
then
|
|
||||||
echo "$mark"
|
|
||||||
else
|
|
||||||
echo "$mark" >>$file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
sleep 3530
|
|
||||||
done
|
|
||||||
|
|
||||||
# NOTREACHED
|
|
||||||
exit 0
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: version.h,v 1.23 2001-06-15 09:34:40-07 bryan Exp $
|
* $Id: version.h,v 1.25 2001-07-05 08:08:49-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -8,4 +8,10 @@
|
|||||||
* Copyright GNAC, Inc., 1998
|
* Copyright GNAC, Inc., 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define THIS_VERSION "conserver.com version 7.0.2"
|
#define COPYRIGHT "@(#) Copyright 1990 The Ohio State University.\n\
|
||||||
|
@(#) Copyright 1992 Purdue Research Foundation.\n\
|
||||||
|
@(#) Copyright 1998 GNAC, Inc.\n\
|
||||||
|
@(#) Copyright 2000 conserver.com.\n\
|
||||||
|
All rights reserved.\n"
|
||||||
|
|
||||||
|
#define THIS_VERSION "conserver.com version 7.0.3"
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
# $Id: INSTALL,v 4.1 91/06/19 15:27:49 ksb Exp $
|
|
||||||
#
|
|
||||||
|
|
||||||
Prep:
|
|
||||||
|
|
||||||
Did you do the prep work in ../conserver yet? If not please start there.
|
|
||||||
|
|
||||||
|
|
||||||
Compiling:
|
|
||||||
|
|
||||||
Try a
|
|
||||||
make
|
|
||||||
in this directory. If cons.h is correct this should just compile.
|
|
||||||
|
|
||||||
|
|
||||||
First test:
|
|
||||||
|
|
||||||
Run a version command:
|
|
||||||
./console -V
|
|
||||||
and see something like:
|
|
||||||
console: $Id: INSTALL,v 4.1 91/06/19 15:27:49 ksb Exp $
|
|
||||||
console: initial master server `staff.cc.purdue.edu'
|
|
||||||
console: default escape sequence `^Ec'
|
|
||||||
console: loopback address for mentor.cc.purdue.edu is 127.0.0.1
|
|
||||||
|
|
||||||
|
|
||||||
Finish the INSTALL in conserver now.
|
|
||||||
|
|
||||||
|
|
||||||
Connect to the conserver on your dumb port,
|
|
||||||
|
|
||||||
Try all the commands. Especially ^Ecz and ^Ecd/^Eco.
|
|
||||||
|
|
||||||
Try two connections to the same console, note the cool way you can force
|
|
||||||
the other guy off (^Ecf).
|
|
@ -25,7 +25,7 @@ LIBS = @LIBS@
|
|||||||
|
|
||||||
### Makefile rules - no user-servicable parts below
|
### Makefile rules - no user-servicable parts below
|
||||||
|
|
||||||
CONSOLE_OBJS = console.o
|
CONSOLE_OBJS = console.o ../conserver/output.o
|
||||||
CONSOLE_HDRS = ../config.h $(top_srcdir)/compat.h $(top_srcdir)/conserver/port.h
|
CONSOLE_HDRS = ../config.h $(top_srcdir)/compat.h $(top_srcdir)/conserver/port.h
|
||||||
ALL = console
|
ALL = console
|
||||||
|
|
||||||
@ -37,6 +37,9 @@ all: $(ALL)
|
|||||||
console: $(CONSOLE_OBJS)
|
console: $(CONSOLE_OBJS)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o console $(CONSOLE_OBJS) $(LIBS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -o console $(CONSOLE_OBJS) $(LIBS)
|
||||||
|
|
||||||
|
../conserver/output.o:
|
||||||
|
( cd ../conserver && $(MAKE) $(MAKE_FLAGS) output.o ) || exit 1;
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
# $Id: README,v 4.2 92/07/27 08:47:14 ksb Exp $
|
|
||||||
|
|
||||||
BUGS:
|
|
||||||
This program depends on a header file in ../conserver/cons.h,
|
|
||||||
which is dones't know how to make.
|
|
||||||
|
|
||||||
What does it do?
|
|
||||||
|
|
||||||
The console switch (conserver) uses some tty ports on a `switch machine' to
|
|
||||||
read the output of many host machines. Admins can use a client program
|
|
||||||
(console) to connect to any console under control of the `switch'. Thus from
|
|
||||||
my terminal here on the second floor I can control the console for each of
|
|
||||||
the machines in the machine room 3 floors below me!
|
|
||||||
|
|
||||||
The `switch' host is monitored by an operator who sees all the error output
|
|
||||||
from all the consoles (in a xterm here at PUCC). This operator can call up a
|
|
||||||
console on any machine in a flash and respond to problems. He is aware of
|
|
||||||
problems without having to poll many CRTs stacked out in the machine room --
|
|
||||||
he and the tape drives can be in a quiet place.
|
|
||||||
|
|
||||||
|
|
||||||
What platforms?
|
|
||||||
|
|
||||||
It runs under 4.2/4.3bsd, IBM's AIX6000, SunOS 4.X, and HPUX.
|
|
||||||
Only the client runs under HPUX at this release. It depends on
|
|
||||||
select(2) and sockets.
|
|
||||||
|
|
||||||
|
|
||||||
What do I need to evaluate it?
|
|
||||||
|
|
||||||
I believe a modem could be used in a pinch as a `host', anything that you can
|
|
||||||
trick into producing tty I/O. Even a dumb tty, but then you must do the
|
|
||||||
echo. Another port on the same machine was used for testing at one point...
|
|
||||||
and an EPROM programmer might even work.
|
|
||||||
|
|
||||||
|
|
||||||
Who would be interested in this kind of thing?
|
|
||||||
|
|
||||||
Anyone with more than one machine with a glass tty would love it, it also
|
|
||||||
gets rid of the need for paper consoles.
|
|
||||||
|
|
||||||
|
|
||||||
Is this software restricted in distribution?
|
|
||||||
|
|
||||||
Tom has an Ohio State copyright on the stuff, I'm sure that there will be no
|
|
||||||
problem with distribution. {He ripped the Purdue ECN copyright off the code
|
|
||||||
he got, I didn't change his.} Tom has not replied to any of my email in ~3
|
|
||||||
months....
|
|
||||||
|
|
||||||
|
|
||||||
Why this version rather than any other?
|
|
||||||
|
|
||||||
The PUCC version supports many more features (multiple `switch' machines for
|
|
||||||
when you run out of ports; job control; down'd consoles, etc) than either the
|
|
||||||
Ohio State or Purdue ECN versions.
|
|
||||||
|
|
||||||
|
|
||||||
How much trouble is it to port?
|
|
||||||
|
|
||||||
The code is ~2000 lines for the server and ~1150 for the client. Not too
|
|
||||||
hard to read in ~3 hours. It should work with a little push on any BSD type
|
|
||||||
UNIX.
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
"When you find me here, at the end of my rope!"
|
|
||||||
kayessbee, Kevin Braunsdorf, ksb@cc.purdue.edu, pur-ee!ksb, purdue!ksb
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: console.c,v 5.39 2001-06-15 08:53:48-07 bryan Exp $
|
* $Id: console.c,v 5.44 2001-07-05 02:15:04-07 bryan Exp $
|
||||||
*
|
*
|
||||||
* Copyright conserver.com, 2000-2001
|
* Copyright conserver.com, 2000-2001
|
||||||
*
|
*
|
||||||
@ -44,16 +44,15 @@
|
|||||||
|
|
||||||
#include <port.h>
|
#include <port.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
#include <output.h>
|
||||||
|
|
||||||
|
|
||||||
static char rcsid[] =
|
int fVerbose = 0, fReplay = 0, fRaw = 0, fVersion = 0;
|
||||||
"$Id: console.c,v 5.39 2001-06-15 08:53:48-07 bryan Exp $";
|
|
||||||
static char *progname =
|
|
||||||
rcsid;
|
|
||||||
int fVerbose = 0, fReplay = 0, fRaw = 0;
|
|
||||||
int chAttn = -1, chEsc = -1;
|
int chAttn = -1, chEsc = -1;
|
||||||
char *pcInMaster = /* which machine is current */
|
char *pcInMaster = /* which machine is current */
|
||||||
MASTERHOST;
|
MASTERHOST;
|
||||||
|
char *pcPort = DEFPORT;
|
||||||
|
unsigned int bindPort;
|
||||||
|
|
||||||
/* panic -- we have no more momory
|
/* panic -- we have no more momory
|
||||||
*/
|
*/
|
||||||
@ -133,13 +132,15 @@ static char *apcLong[] = {
|
|||||||
"h output this message",
|
"h output this message",
|
||||||
"l user use username instead of current username",
|
"l user use username instead of current username",
|
||||||
"M mach master server to poll first",
|
"M mach master server to poll first",
|
||||||
|
"p port port to connect to",
|
||||||
|
"P display pids of daemon(s)",
|
||||||
"q(Q) send a quit command to the (local) server",
|
"q(Q) send a quit command to the (local) server",
|
||||||
"r connect to the console group only",
|
"r connect to the console group only",
|
||||||
"s(S) spy on a console (and replay)",
|
"s(S) spy on a console (and replay)",
|
||||||
"u show users on the various consoles",
|
"u(U) show users on the various consoles",
|
||||||
"v be more verbose",
|
"v be more verbose",
|
||||||
"V show version information",
|
"V show version information",
|
||||||
"w show who is on which console",
|
"w(W) show who is on which console",
|
||||||
"x examine ports and baud rates",
|
"x examine ports and baud rates",
|
||||||
(char *)0
|
(char *)0
|
||||||
};
|
};
|
||||||
@ -147,12 +148,11 @@ static char *apcLong[] = {
|
|||||||
/* output a long message to the user
|
/* output a long message to the user
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
Usage(fp, ppc)
|
Usage(ppc)
|
||||||
FILE *fp;
|
|
||||||
char **ppc;
|
char **ppc;
|
||||||
{
|
{
|
||||||
for (/* passed */; (char *)0 != *ppc; ++ppc)
|
for (/* passed */; (char *)0 != *ppc; ++ppc)
|
||||||
(void)fprintf(fp, "%s\n", *ppc);
|
fprintf(stderr, "\t%s\n", *ppc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* expain who we are and which revision we are (ksb)
|
/* expain who we are and which revision we are (ksb)
|
||||||
@ -160,16 +160,34 @@ char **ppc;
|
|||||||
static void
|
static void
|
||||||
Version()
|
Version()
|
||||||
{
|
{
|
||||||
/* register unsigned char *puc; */
|
int i;
|
||||||
|
|
||||||
printf("%s: %s\n", progname, THIS_VERSION);
|
Info("%s", THIS_VERSION);
|
||||||
printf("%s: initial master server `%s\'\n", progname, pcInMaster);
|
Info("initial master server `%s\'", pcInMaster);
|
||||||
printf("%s: default escape sequence `", progname);
|
printf("%s: default escape sequence `", progname);
|
||||||
putCtlc(DEFATTN, stdout);
|
putCtlc(DEFATTN, stdout);
|
||||||
putCtlc(DEFESC, stdout);
|
putCtlc(DEFESC, stdout);
|
||||||
printf("\'\n");
|
printf("\'\n");
|
||||||
/* puc = (unsigned char *)&local_port.sin_addr;
|
/* Look for non-numeric characters */
|
||||||
printf("%s: loopback address for %s is %d.%d.%d.%d\n", progname, acMyName, puc[0], puc[1], puc[2], puc[3]); */
|
for (i=0;pcPort[i] != '\000';i++)
|
||||||
|
if (!isdigit((int)pcPort[i])) break;
|
||||||
|
|
||||||
|
if ( pcPort[i] == '\000' ) {
|
||||||
|
/* numeric only */
|
||||||
|
bindPort = atoi( pcPort );
|
||||||
|
Info("on port %u (referenced as `%s')", bindPort, pcPort);
|
||||||
|
} else {
|
||||||
|
/* non-numeric only */
|
||||||
|
struct servent *pSE;
|
||||||
|
if ((struct servent *)0 == (pSE = getservbyname(pcPort, "tcp"))) {
|
||||||
|
Error("getservbyname: %s: %s", pcPort, strerror(errno));
|
||||||
|
} else {
|
||||||
|
bindPort = ntohs((u_short)pSE->s_port);
|
||||||
|
Info("on port %u (referenced as `%s')", bindPort, pcPort);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fVerbose)
|
||||||
|
printf(COPYRIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,11 +250,11 @@ char *pcText;
|
|||||||
|
|
||||||
pcTemp = pcText;
|
pcTemp = pcText;
|
||||||
if (ParseChar(&pcTemp, &c1) || ParseChar(&pcTemp, &c2)) {
|
if (ParseChar(&pcTemp, &c1) || ParseChar(&pcTemp, &c2)) {
|
||||||
fprintf(stderr, "%s: poorly formed escape sequence `%s\'\n", progname, pcText);
|
Error("poorly formed escape sequence `%s\'", pcText);
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
if ('\000' != *pcTemp) {
|
if ('\000' != *pcTemp) {
|
||||||
fprintf(stderr, "%s: too many characters in new escape sequence at ...`%s\'\n", progname, pcTemp);
|
Error("too many characters in new escape sequence at ...`%s\'", pcTemp);
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
chAttn = c1;
|
chAttn = c1;
|
||||||
@ -279,7 +297,7 @@ short sPort;
|
|||||||
(void)bcopy((char *)hp->h_addr, (char *)&pPort->sin_addr, hp->h_length);
|
(void)bcopy((char *)hp->h_addr, (char *)&pPort->sin_addr, hp->h_length);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%s: gethostbyname: %s: %s\n", progname, pcToHost, hstrerror(h_errno));
|
Error("gethostbyname: %s: %s", pcToHost, hstrerror(h_errno));
|
||||||
exit(9);
|
exit(9);
|
||||||
}
|
}
|
||||||
pPort->sin_port = sPort;
|
pPort->sin_port = sPort;
|
||||||
@ -300,11 +318,11 @@ short sPort;
|
|||||||
* (it will tell us who to talk to to get a real connection)
|
* (it will tell us who to talk to to get a real connection)
|
||||||
*/
|
*/
|
||||||
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||||
fprintf(stderr, "%s: socket: %s\n", progname, strerror(errno));
|
Error("socket: %s", strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (connect(s, (struct sockaddr *)pPort, sizeof(*pPort)) < 0) {
|
if (connect(s, (struct sockaddr *)pPort, sizeof(*pPort)) < 0) {
|
||||||
fprintf(stderr, "%s: connect: %d@%s: %s\n", progname, ntohs(pPort->sin_port), pcToHost, strerror(errno));
|
Error("connect: %d@%s: %s", ntohs(pPort->sin_port), pcToHost, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,7 +377,7 @@ c2raw()
|
|||||||
if (0 != ioctl(0, TCGETS, & o_tios))
|
if (0 != ioctl(0, TCGETS, & o_tios))
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: iotcl: getsw: %s\n", progname, strerror(errno));
|
Error("iotcl: getsw: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
n_tios = o_tios;
|
n_tios = o_tios;
|
||||||
@ -374,13 +392,13 @@ c2raw()
|
|||||||
if (0 != ioctl(0, TCSETS, & n_tios))
|
if (0 != ioctl(0, TCSETS, & n_tios))
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: getarrt: %s\n", progname, strerror(errno));
|
Error("getarrt: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# ifdef HAVE_TERMIO_H
|
# ifdef HAVE_TERMIO_H
|
||||||
if (0 != ioctl(0, TCGETA, & o_tio)) {
|
if (0 != ioctl(0, TCGETA, & o_tio)) {
|
||||||
fprintf(stderr, "%s: iotcl: geta: %s\n", progname, strerror(errno));
|
Error("iotcl: geta: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
n_tio = o_tio;
|
n_tio = o_tio;
|
||||||
@ -390,12 +408,12 @@ c2raw()
|
|||||||
n_tio.c_cc[VMIN] = 1;
|
n_tio.c_cc[VMIN] = 1;
|
||||||
n_tio.c_cc[VTIME] = 0;
|
n_tio.c_cc[VTIME] = 0;
|
||||||
if (0 != ioctl(0, TCSETAF, & n_tio)) {
|
if (0 != ioctl(0, TCSETAF, & n_tio)) {
|
||||||
fprintf(stderr, "%s: iotcl: seta: %s\n", progname, strerror(errno));
|
Error("iotcl: seta: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
if (0 != ioctl(0, TIOCGETP, (char *)&o_sty)) {
|
if (0 != ioctl(0, TIOCGETP, (char *)&o_sty)) {
|
||||||
fprintf(stderr, "%s: iotcl: getp: %s\n", progname, strerror(errno));
|
Error("iotcl: getp: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
n_sty = o_sty;
|
n_sty = o_sty;
|
||||||
@ -405,25 +423,25 @@ c2raw()
|
|||||||
n_sty.sg_kill = -1;
|
n_sty.sg_kill = -1;
|
||||||
n_sty.sg_erase = -1;
|
n_sty.sg_erase = -1;
|
||||||
if (0 != ioctl(0, TIOCSETP, (char *)&n_sty)) {
|
if (0 != ioctl(0, TIOCSETP, (char *)&n_sty)) {
|
||||||
fprintf(stderr, "%s: iotcl: setp: %s\n", progname, strerror(errno));
|
Error("iotcl: setp: %s", strerror(errno));
|
||||||
exit(10);
|
exit(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stty undef all tty chars
|
/* stty undef all tty chars
|
||||||
*/
|
*/
|
||||||
if (-1 == ioctl(0, TIOCGETC, (char *)&n_tchars)) {
|
if (-1 == ioctl(0, TIOCGETC, (char *)&n_tchars)) {
|
||||||
fprintf(stderr, "%s: ioctl: getc: %s\n", progname, strerror(errno));
|
Error("ioctl: getc: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
o_tchars = n_tchars;
|
o_tchars = n_tchars;
|
||||||
n_tchars.t_intrc = -1;
|
n_tchars.t_intrc = -1;
|
||||||
n_tchars.t_quitc = -1;
|
n_tchars.t_quitc = -1;
|
||||||
if (-1 == ioctl(0, TIOCSETC, (char *)&n_tchars)) {
|
if (-1 == ioctl(0, TIOCSETC, (char *)&n_tchars)) {
|
||||||
fprintf(stderr, "%s: ioctl: setc: %s\n", progname, strerror(errno));
|
Error("ioctl: setc: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (-1 == ioctl(0, TIOCGLTC, (char *)&n_ltchars)) {
|
if (-1 == ioctl(0, TIOCGLTC, (char *)&n_ltchars)) {
|
||||||
fprintf(stderr, "%s: ioctl: gltc: %s\n", progname, strerror(errno));
|
Error("ioctl: gltc: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
o_ltchars = n_ltchars;
|
o_ltchars = n_ltchars;
|
||||||
@ -432,7 +450,7 @@ c2raw()
|
|||||||
n_ltchars.t_flushc = -1;
|
n_ltchars.t_flushc = -1;
|
||||||
n_ltchars.t_lnextc = -1;
|
n_ltchars.t_lnextc = -1;
|
||||||
if (-1 == ioctl(0, TIOCSLTC, (char *)&n_ltchars)) {
|
if (-1 == ioctl(0, TIOCSLTC, (char *)&n_ltchars)) {
|
||||||
fprintf(stderr, "%s: ioctl: sltc: %s\n", progname, strerror(errno));
|
Error("ioctl: sltc: %s", strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@ -480,7 +498,7 @@ char *pcBuf;
|
|||||||
while (0 != iLen) {
|
while (0 != iLen) {
|
||||||
if (-1 == (nr = write(fd, pcBuf, iLen))) {
|
if (-1 == (nr = write(fd, pcBuf, iLen))) {
|
||||||
c2cooked();
|
c2cooked();
|
||||||
fprintf(stderr, "%s: lost connection\n", progname);
|
Error("lost connection");
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
iLen -= nr;
|
iLen -= nr;
|
||||||
@ -508,7 +526,7 @@ char *pcBuf, *pcWant;
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
case -1:
|
case -1:
|
||||||
c2cooked();
|
c2cooked();
|
||||||
fprintf(stderr, "%s: lost connection\n", progname);
|
Error("lost connection");
|
||||||
exit(3);
|
exit(3);
|
||||||
default:
|
default:
|
||||||
j += nr;
|
j += nr;
|
||||||
@ -519,7 +537,7 @@ char *pcBuf, *pcWant;
|
|||||||
}
|
}
|
||||||
if (0 == iLen) {
|
if (0 == iLen) {
|
||||||
c2cooked();
|
c2cooked();
|
||||||
fprintf(stderr, "%s: reply too long\n", progname);
|
Error("reply too long");
|
||||||
exit(3);
|
exit(3);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -539,10 +557,6 @@ char *pcBuf, *pcWant;
|
|||||||
return strcmp(pcBuf, pcWant);
|
return strcmp(pcBuf, pcWant);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SERVICENAME)
|
|
||||||
static struct servent *pSE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* call a machine master for group master ports and machine master ports
|
/* call a machine master for group master ports and machine master ports
|
||||||
* take a list like "1782@localhost:@mentor.cc.purdue.edu:@pop.stat.purdue.edu"
|
* take a list like "1782@localhost:@mentor.cc.purdue.edu:@pop.stat.purdue.edu"
|
||||||
* and send the given command to the group leader at 1782
|
* and send the given command to the group leader at 1782
|
||||||
@ -576,19 +590,9 @@ char *pcPorts, *pcMaster, *pcTo, *pcCmd, *pcWho;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('\000' == *pcPorts) {
|
if ('\000' == *pcPorts) {
|
||||||
#if defined(SERVICENAME)
|
j = htons(bindPort);
|
||||||
/* in net order -- ksb */
|
|
||||||
j = pSE->s_port;
|
|
||||||
#else
|
|
||||||
# if defined(PORTNUMBER)
|
|
||||||
j = htons(PORTNUMBER);
|
|
||||||
# else
|
|
||||||
fprintf(stderr, "%s: no port or service compiled in?\n", progname);
|
|
||||||
exit(8);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
} else if (!isdigit((int)(pcPorts[0]))) {
|
} else if (!isdigit((int)(pcPorts[0]))) {
|
||||||
fprintf(stderr, "%s: %s: %s\n", progname, pcMaster, pcPorts);
|
Error("%s: %s", pcMaster, pcPorts);
|
||||||
exit(2);
|
exit(2);
|
||||||
} else {
|
} else {
|
||||||
j = htons((short)atoi(pcPorts));
|
j = htons((short)atoi(pcPorts));
|
||||||
@ -597,7 +601,7 @@ char *pcPorts, *pcMaster, *pcTo, *pcCmd, *pcWho;
|
|||||||
s = GetPort(acExcg, & client_port, j);
|
s = GetPort(acExcg, & client_port, j);
|
||||||
|
|
||||||
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "ok\r\n")) {
|
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "ok\r\n")) {
|
||||||
fprintf(stderr, "%s: %s: %s", progname, acExcg, acMesg);
|
Error("%s: %s", acExcg, acMesg);
|
||||||
exit(4);
|
exit(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,7 +650,7 @@ int s;
|
|||||||
continue;
|
continue;
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s: recv: %d: %s\r\n", progname, s, strerror(errno));
|
Error("recv: %d: %s\r", s, strerror(errno));
|
||||||
sleep(1);
|
sleep(1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -669,7 +673,7 @@ int s;
|
|||||||
exit(1);
|
exit(1);
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s: unknown out of band command `%c\'\r\n", progname, acCmd[0]);
|
Error("unknown out of band command `%c\'\r", acCmd[0]);
|
||||||
(void)fflush(stderr);
|
(void)fflush(stderr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -688,11 +692,11 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
extern int atoi();
|
extern int atoi();
|
||||||
|
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
printf("%s: %s to %s (%son %s)\n", progname, pcHow, pcMach, fRaw ? "raw " : "", pcMaster);
|
Info("%s to %s (%son %s)", pcHow, pcMach, fRaw ? "raw " : "", pcMaster);
|
||||||
}
|
}
|
||||||
#if defined(F_SETOWN)
|
#if defined(F_SETOWN)
|
||||||
if (-1 == fcntl(s, F_SETOWN, getpid())) {
|
if (-1 == fcntl(s, F_SETOWN, getpid())) {
|
||||||
fprintf(stderr, "%s: fcntl: %d: %s\n", progname, s, strerror(errno));
|
Error("fcntl: %d: %s", s, strerror(errno));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# if defined(SIOCSPGRP)
|
# if defined(SIOCSPGRP)
|
||||||
@ -702,7 +706,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
*/
|
*/
|
||||||
iTemp = -getpid();
|
iTemp = -getpid();
|
||||||
if (-1 == ioctl(s, SIOCSPGRP, & iTemp)) {
|
if (-1 == ioctl(s, SIOCSPGRP, & iTemp)) {
|
||||||
fprintf(stderr, "%s: ioctl: %d: %s\n", progname, s, strerror(errno));
|
Error("ioctl: %d: %s", s, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@ -724,7 +728,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
(void)sprintf(acMesg, "%c%ce%c%c", DEFATTN, DEFESC, chAttn, chEsc);
|
(void)sprintf(acMesg, "%c%ce%c%c", DEFATTN, DEFESC, chAttn, chEsc);
|
||||||
SendOut(s, acMesg, 5);
|
SendOut(s, acMesg, 5);
|
||||||
if (0 == ReadReply(s, acMesg, sizeof(acMesg), (char *)0)) {
|
if (0 == ReadReply(s, acMesg, sizeof(acMesg), (char *)0)) {
|
||||||
fprintf(stderr, "protocol botch on redef on escape sequence\n");
|
Error("protocol botch on redef on escape sequence");
|
||||||
exit(8);
|
exit(8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -747,14 +751,14 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
(void)sprintf(acMesg, "%c%c;", chAttn, chEsc);
|
(void)sprintf(acMesg, "%c%c;", chAttn, chEsc);
|
||||||
SendOut(s, acMesg, 3);
|
SendOut(s, acMesg, 3);
|
||||||
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "[login:\r\n") && 0 != strcmp(acMesg, "\r\n[login:\r\n")) {
|
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "[login:\r\n") && 0 != strcmp(acMesg, "\r\n[login:\r\n")) {
|
||||||
fprintf(stderr, "%s: call: %s\n", progname, acMesg);
|
Error("call: %s", acMesg);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)sprintf(acMesg, "%s@%s\n", pcUser, acThisHost);
|
(void)sprintf(acMesg, "%s@%s\n", pcUser, acThisHost);
|
||||||
SendOut(s, acMesg, strlen(acMesg));
|
SendOut(s, acMesg, strlen(acMesg));
|
||||||
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "host:\r\n")) {
|
if (0 != ReadReply(s, acMesg, sizeof(acMesg), "host:\r\n")) {
|
||||||
fprintf(stderr, "%s: %s\n", progname, acMesg);
|
Error("%s", acMesg);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -787,7 +791,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
} else if (0 == strcmp(acMesg, "line to host is down]")) {
|
} else if (0 == strcmp(acMesg, "line to host is down]")) {
|
||||||
/* ouch, the machine is down on the server */
|
/* ouch, the machine is down on the server */
|
||||||
fIn = '-';
|
fIn = '-';
|
||||||
fprintf(stderr, "%s: %s is down\n", progname, pcMach);
|
Error("%s is down", pcMach);
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
printf("[use `");
|
printf("[use `");
|
||||||
putCtlc(chAttn, stdout);
|
putCtlc(chAttn, stdout);
|
||||||
@ -796,7 +800,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
}
|
}
|
||||||
} else if (0 == strcmp(acMesg, "no -- on ctl]")) {
|
} else if (0 == strcmp(acMesg, "no -- on ctl]")) {
|
||||||
fIn = '-';
|
fIn = '-';
|
||||||
fprintf(stderr, "%s: %s is a control port\n", progname, pcMach);
|
Error("%s is a control port", pcMach);
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
printf("[use `");
|
printf("[use `");
|
||||||
putCtlc(chAttn, stdout);
|
putCtlc(chAttn, stdout);
|
||||||
@ -804,7 +808,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
printf(";\' to open a console line]\n");
|
printf(";\' to open a console line]\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%s: %s: %s\n", progname, pcMach, acMesg);
|
Error("%s: %s", pcMach, acMesg);
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -820,7 +824,7 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
|||||||
if ('-' != fIn) {
|
if ('-' != fIn) {
|
||||||
if (fIn == 'r') {
|
if (fIn == 'r') {
|
||||||
if ('s' != *pcHow) {
|
if ('s' != *pcHow) {
|
||||||
fprintf(stderr, "%s: %s is read-only\n", progname, pcMach);
|
Error("%s is read-only", pcMach);
|
||||||
}
|
}
|
||||||
} else if (fIn != ('f' == *pcHow ? 'a' : *pcHow)) {
|
} else if (fIn != ('f' == *pcHow ? 'a' : *pcHow)) {
|
||||||
(void)sprintf(acMesg, "%c%c%c", chAttn, chEsc, *pcHow);
|
(void)sprintf(acMesg, "%c%c%c", chAttn, chEsc, *pcHow);
|
||||||
@ -904,14 +908,14 @@ char *pcMaster, *pcMach, *pcCmd, *pcWho;
|
|||||||
|
|
||||||
/* get the ports number */
|
/* get the ports number */
|
||||||
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
||||||
fprintf(stderr, "%s: master forward broken\n", progname);
|
Error("master forward broken");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('@' == acPorts[0]) {
|
if ('@' == acPorts[0]) {
|
||||||
static int iLimit = 0;
|
static int iLimit = 0;
|
||||||
if (iLimit++ > 10) {
|
if (iLimit++ > 10) {
|
||||||
fprintf(stderr, "%s: forwarding level too deep!\n", progname);
|
Error("forwarding level too deep!");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return Gather(Indir, acPorts, pcMaster, pcMach, pcCmd, pcWho);
|
return Gather(Indir, acPorts, pcMaster, pcMach, pcCmd, pcWho);
|
||||||
@ -1029,7 +1033,7 @@ char *pcMaster, *pcMach, *pcCmd, *pcWho;
|
|||||||
|
|
||||||
/* get the ports number */
|
/* get the ports number */
|
||||||
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
||||||
fprintf(stderr, "%s: master forward broken\n", progname);
|
Error("master forward broken");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
@ -1057,7 +1061,7 @@ char *pcMaster, *pcMach, *pcCmd, *pcWho;
|
|||||||
|
|
||||||
/* get the ports number */
|
/* get the ports number */
|
||||||
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
||||||
fprintf(stderr, "%s: master forward broken\n", progname);
|
Error("master forward broken");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* to the command to each master
|
/* to the command to each master
|
||||||
@ -1085,7 +1089,7 @@ char *pcMaster, *pcMach, *pcCmd, *pcWho;
|
|||||||
|
|
||||||
/* get the ports number */
|
/* get the ports number */
|
||||||
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
||||||
fprintf(stderr, "%s: group leader died?\n", progname);
|
Error("group leader died?");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (fVerbose) {
|
if (fVerbose) {
|
||||||
@ -1115,7 +1119,7 @@ char *pcMaster, *pcMach, *pcCmd, *pcWho;
|
|||||||
|
|
||||||
/* get the ports number */
|
/* get the ports number */
|
||||||
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
if (0 >= ReadReply(s, acPorts, sizeof(acPorts), (char *)0)) {
|
||||||
fprintf(stderr, "%s: master forward broken\n", progname);
|
Error("master forward broken");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* to the command to each master
|
/* to the command to each master
|
||||||
@ -1145,11 +1149,14 @@ char **argv;
|
|||||||
auto char *pcUser;
|
auto char *pcUser;
|
||||||
auto char *pcMsg = '\000';
|
auto char *pcMsg = '\000';
|
||||||
auto int (*pfiCall)();
|
auto int (*pfiCall)();
|
||||||
static char acOpts[] = "b:aAdDsSfFe:hl:M:pvVwWUqQrux";
|
static char acOpts[] = "b:aAdDsSfFe:hl:M:p:PvVwWqQruUx";
|
||||||
extern long atol();
|
extern long atol();
|
||||||
extern int optind;
|
extern int optind;
|
||||||
extern int optopt;
|
extern int optopt;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
outputPid = 0; /* make sure stuff DOESN'T have the pid */
|
||||||
|
|
||||||
if ((char *)0 == (progname = strrchr(argv[0], '/'))) {
|
if ((char *)0 == (progname = strrchr(argv[0], '/'))) {
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
@ -1157,40 +1164,6 @@ char **argv;
|
|||||||
++progname;
|
++progname;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SERVICENAME)
|
|
||||||
if ((struct servent *)0 == (pSE = getservbyname(SERVICENAME, "tcp"))) {
|
|
||||||
fprintf(stderr, "%s: getservbyname: %s: %s\n", progname, SERVICENAME, strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (((char *)0 != (ptr = getenv("USER")) || (char *)0 != (ptr = getenv("LOGNAME"))) &&
|
|
||||||
(struct passwd *)0 != (pwdMe = getpwnam(ptr)) &&
|
|
||||||
getuid() == pwdMe->pw_uid) {
|
|
||||||
/* use the login $USER is set to, if it is our (real) uid */;
|
|
||||||
} else if ((struct passwd *)0 == (pwdMe = getpwuid(getuid()))) {
|
|
||||||
fprintf(stderr, "%s: getpwuid: %d: %s\n", progname, (int)(getuid()), strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
pcUser = pwdMe->pw_name;
|
|
||||||
|
|
||||||
/* get the out hostname and the loopback devices IP address
|
|
||||||
* (for trusted connections mostly)
|
|
||||||
*/
|
|
||||||
if (-1 == gethostname(acMyName, sizeof(acMyName)-1)) {
|
|
||||||
fprintf(stderr, "%s: gethostname: %s\n", progname, strerror(errno));
|
|
||||||
exit(2);
|
|
||||||
}
|
|
||||||
if ((struct hostent *)0 != (hp = gethostbyname(acLocalhost))) {
|
|
||||||
#if HAVE_MEMCPY
|
|
||||||
memcpy((char *)&local_port.sin_addr, (char *)hp->h_addr, hp->h_length);
|
|
||||||
#else
|
|
||||||
(void)bcopy((char *)hp->h_addr, (char *)&local_port.sin_addr, hp->h_length);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
acLocalhost[0] = '\000';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* command line parsing
|
/* command line parsing
|
||||||
*/
|
*/
|
||||||
pcCmd = (char *)0;
|
pcCmd = (char *)0;
|
||||||
@ -1263,7 +1236,11 @@ char **argv;
|
|||||||
pcCmd = "xamine";
|
pcCmd = "xamine";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': /* send a pid command to the server */
|
case 'p':
|
||||||
|
pcPort = optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'P': /* send a pid command to the server */
|
||||||
pcCmd = "pid";
|
pcCmd = "pid";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1279,22 +1256,76 @@ char **argv;
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
Version();
|
fVersion = 1;
|
||||||
exit(0);
|
break;
|
||||||
|
|
||||||
default: /* huh? */
|
default: /* huh? */
|
||||||
if ( opt != 'h' )
|
Error("usage [-aAfFsS] [-rv] [-e esc] [-M mach] [-l username] console");
|
||||||
fprintf(stderr, "%s: unknown option `%c\'\n", progname, optopt);
|
Error("usage [-v] [-hdDPuVwx] [-b message]");
|
||||||
printf("%s: usage [-aAfFsS] [-rv] [-e esc] [-M mach] [-l username] machine\n", progname);
|
Error("usage [-qQ] [-M mach]");
|
||||||
printf("%s: usage [-v] [-hdDuVwx] [-b message]\n", progname);
|
Usage(apcLong);
|
||||||
printf("%s: usage [-qQ] [-M mach]\n", progname);
|
|
||||||
Usage(stdout, apcLong);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fVersion) {
|
||||||
|
Version();
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( pcPort == NULL )
|
||||||
|
{
|
||||||
|
Error("Severe error: pcPort is NULL???? How can that be?" );
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Look for non-numeric characters */
|
||||||
|
for (i=0;pcPort[i] != '\000';i++)
|
||||||
|
if (!isdigit((int)pcPort[i])) break;
|
||||||
|
|
||||||
|
if ( pcPort[i] == '\000' ) {
|
||||||
|
/* numeric only */
|
||||||
|
bindPort = atoi( pcPort );
|
||||||
|
} else {
|
||||||
|
/* non-numeric only */
|
||||||
|
struct servent *pSE;
|
||||||
|
if ((struct servent *)0 == (pSE = getservbyname(pcPort, "tcp"))) {
|
||||||
|
Error("getservbyname: %s: %s", pcPort, strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
} else {
|
||||||
|
bindPort = ntohs((u_short)pSE->s_port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((char *)0 != (ptr = getenv("USER")) || (char *)0 != (ptr = getenv("LOGNAME"))) &&
|
||||||
|
(struct passwd *)0 != (pwdMe = getpwnam(ptr)) &&
|
||||||
|
getuid() == pwdMe->pw_uid) {
|
||||||
|
/* use the login $USER is set to, if it is our (real) uid */;
|
||||||
|
} else if ((struct passwd *)0 == (pwdMe = getpwuid(getuid()))) {
|
||||||
|
Error("getpwuid: %d: %s", (int)(getuid()), strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
pcUser = pwdMe->pw_name;
|
||||||
|
|
||||||
|
/* get the out hostname and the loopback devices IP address
|
||||||
|
* (for trusted connections mostly)
|
||||||
|
*/
|
||||||
|
if (-1 == gethostname(acMyName, sizeof(acMyName)-1)) {
|
||||||
|
Error("gethostname: %s", strerror(errno));
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
if ((struct hostent *)0 != (hp = gethostbyname(acLocalhost))) {
|
||||||
|
#if HAVE_MEMCPY
|
||||||
|
memcpy((char *)&local_port.sin_addr, (char *)hp->h_addr, hp->h_length);
|
||||||
|
#else
|
||||||
|
(void)bcopy((char *)hp->h_addr, (char *)&local_port.sin_addr, hp->h_length);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
acLocalhost[0] = '\000';
|
||||||
|
}
|
||||||
|
|
||||||
/* finish resolving the command to do, call Gather
|
/* finish resolving the command to do, call Gather
|
||||||
*/
|
*/
|
||||||
if ((char *)0 == pcCmd) {
|
if ((char *)0 == pcCmd) {
|
||||||
@ -1303,7 +1334,7 @@ char **argv;
|
|||||||
|
|
||||||
if ('a' == *pcCmd || 'f' == *pcCmd || 's' == *pcCmd) {
|
if ('a' == *pcCmd || 'f' == *pcCmd || 's' == *pcCmd) {
|
||||||
if (optind >= argc) {
|
if (optind >= argc) {
|
||||||
fprintf(stderr, "%s: missing machine name\n", progname);
|
Error("missing console name");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
pcTo = argv[optind++];
|
pcTo = argv[optind++];
|
||||||
@ -1311,7 +1342,7 @@ char **argv;
|
|||||||
pcTo = "*";
|
pcTo = "*";
|
||||||
}
|
}
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
fprintf(stderr, "%s: extra garbage on command line? (%s...)\n", progname, argv[optind]);
|
Error("extra garbage on command line? (%s...)", argv[optind]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
(void)sprintf(acPorts, "@%s", pcInMaster);
|
(void)sprintf(acPorts, "@%s", pcInMaster);
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
.\" $Id: console.man,v 1.5 1999-04-12 22:40:55-07 bryan Exp $
|
.\" $Id: console.man,v 1.6 2001-07-05 01:39:15-07 bryan Exp $
|
||||||
.TH CONSOLE 8 "Local"
|
.TH CONSOLE 8 "Local"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
console \- console server client program
|
console \- console server client program
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBconsole\fP [\-\fBaAfFsS\fP] [\-\fBrv\fP] [\-\fBe\fP \fIesc\fP] [\-\fBM\fP \fIserver\fP] \fIhost\fP
|
\fBconsole\fP [\-\fBaAfFsS\fP] [\-\fBrv\fP] [\-\fBe\fP \fIesc\fP] [\-\fBM\fP \fImach\fP] \fIconsole\fP
|
||||||
.br
|
.br
|
||||||
\fBconsole\fP [\-\fBv\fP] [\-\fBhdDuVwx\fP] [\-\fBb\fP \fImessage\fP]
|
\fBconsole\fP [\-\fBv\fP] [\-\fBhdDPuVwx\fP] [\-\fBb\fP \fImessage\fP]
|
||||||
.br
|
.br
|
||||||
\fBconsole\fP [\-\fBqQ\fP] [\-\fBM\fP \fIserver\fP]
|
\fBconsole\fP [\-\fBqQ\fP] [\-\fBM\fP \fImach\fP]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Console
|
.B Console
|
||||||
is used to manipulate console terminals remotely or poll running
|
is used to manipulate console terminals remotely or poll running
|
||||||
\fIconserver\fP(8L) daemons for status information.
|
\fIconserver\fP(8) daemons for status information.
|
||||||
.PP
|
.PP
|
||||||
.B Console
|
.B Console
|
||||||
queries the user for the their passwd before
|
queries the user for the their passwd before
|
||||||
@ -34,6 +34,9 @@ Display daemon versions. The \fIconsole\fP client connects to each
|
|||||||
server to request its version information. The uppercase varient of
|
server to request its version information. The uppercase varient of
|
||||||
this option only requests the primary server's version.
|
this option only requests the primary server's version.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-D
|
||||||
|
Same as \fB\-d\fP but just acts on the local server.
|
||||||
|
.TP
|
||||||
.BI \-e esc
|
.BI \-e esc
|
||||||
Set the initial two character escape sequence to
|
Set the initial two character escape sequence to
|
||||||
those represented by \fIesc\fP.
|
those represented by \fIesc\fP.
|
||||||
@ -41,24 +44,32 @@ Any of the forms output by \fIcat\fP(1)'s \-\fBv\fP option
|
|||||||
are accepted. The default value is ``^Ec''.
|
are accepted. The default value is ``^Ec''.
|
||||||
.TP
|
.TP
|
||||||
.B \-f
|
.B \-f
|
||||||
Same as
|
Same as \fB\-a\fP except it will force any existing connection into spy mode.
|
||||||
.I \-a
|
|
||||||
except it will force any existing connection into spy mode.
|
|
||||||
.TP
|
.TP
|
||||||
.B \-h
|
.B \-h
|
||||||
Display a brief help message.
|
Display a brief help message.
|
||||||
.TP
|
.TP
|
||||||
.BI \-M server
|
.BI \-l user
|
||||||
The \fIconsole\fP client program polls \fIserver\fP as the primary server,
|
Sets the username used for authentication to \fIuser\fP.
|
||||||
|
.TP
|
||||||
|
.BI \-M mach
|
||||||
|
The \fIconsole\fP client program polls \fImach\fP as the primary server,
|
||||||
rather than the hard coded default (``console'').
|
rather than the hard coded default (``console'').
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-p port
|
||||||
|
Set the port to connect to. The default \fIport\fP is set at compile time
|
||||||
|
using the --with-port option.
|
||||||
|
.TP
|
||||||
|
.B \-P
|
||||||
|
Display the pids of the master daemon processes.
|
||||||
|
.TP
|
||||||
.B \-q
|
.B \-q
|
||||||
The \fIconsole\fP client requests the server daemon quit (shutdown).
|
The \fIconsole\fP client requests the server daemon quit (shutdown).
|
||||||
A password is sent in the protocol stream, if none is required for
|
A password is sent in the protocol stream, if none is required for
|
||||||
the local host to shutdown the server just press return.
|
the local host to shutdown the server just press return.
|
||||||
.TP
|
.TP
|
||||||
.B \-Q
|
.B \-Q
|
||||||
Like -q, but just acts on the primary server.
|
Same as \fB\-q\fP but just acts on the local server.
|
||||||
.TP
|
.TP
|
||||||
.B \-r
|
.B \-r
|
||||||
Request a raw connection to the group control virtual console,
|
Request a raw connection to the group control virtual console,
|
||||||
@ -73,6 +84,9 @@ but all other keyboard input is discarded.
|
|||||||
.B \-u
|
.B \-u
|
||||||
Show a list of all consoles with status and attached users.
|
Show a list of all consoles with status and attached users.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-U
|
||||||
|
Same as \fB\-u\fP.
|
||||||
|
.TP
|
||||||
.B \-V
|
.B \-V
|
||||||
Output the version of the console client program.
|
Output the version of the console client program.
|
||||||
.TP
|
.TP
|
||||||
@ -84,15 +98,18 @@ for added benefit.
|
|||||||
.B \-w
|
.B \-w
|
||||||
Show a list of all connections to consoles.
|
Show a list of all connections to consoles.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-W
|
||||||
|
Same as \fB\-w\fP.
|
||||||
|
.TP
|
||||||
.B \-x
|
.B \-x
|
||||||
Show a list of consoles and devices.
|
Show a list of consoles and devices.
|
||||||
.PP
|
.PP
|
||||||
The \-\fBA\fP, \-\fBF\fP, or \-\fBS\fP options have the same effect as
|
The \fB\-A\fP, \fB\-F\fP, or \fB\-S\fP options have the same effect as
|
||||||
their lower case variants.
|
their lower case variants.
|
||||||
In addition they each request the last 20 lines of the console output after
|
In addition they each request the last 20 lines of the console output after
|
||||||
making the connection.
|
making the connection.
|
||||||
.PP
|
.PP
|
||||||
Any default (\-\fBa\fP) connection is dropped to spy mode if
|
Any default (\fB\-a\fP) connection is dropped to spy mode if
|
||||||
someone else is attached read-write.
|
someone else is attached read-write.
|
||||||
.SH "ESCAPE SEQUENCES"
|
.SH "ESCAPE SEQUENCES"
|
||||||
The connection can be controlled by a two character escape sequence, followed
|
The connection can be controlled by a two character escape sequence, followed
|
||||||
@ -120,8 +137,7 @@ w who is using this console
|
|||||||
x examine this group's devices and modes.
|
x examine this group's devices and modes.
|
||||||
z suspend this connection
|
z suspend this connection
|
||||||
? display list of commands
|
? display list of commands
|
||||||
^I toggle tab expansion
|
^M continue, ignore the escape sequence
|
||||||
^J continue, ignore the escape sequence
|
|
||||||
^R replay the last line only
|
^R replay the last line only
|
||||||
\. disconnect
|
\. disconnect
|
||||||
.TE
|
.TE
|
||||||
@ -179,18 +195,18 @@ Requests a connection to the host ``lv426'' with the escape characters
|
|||||||
set to ``escape one''.
|
set to ``escape one''.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
Connections suspended under Dynix sometimes break the kernel when
|
Connections suspended under Dynix sometimes break the kernel when
|
||||||
resumed. Suspended connections are a poor idea in general, just
|
resumed.
|
||||||
disconnect instead.
|
|
||||||
.PP
|
.PP
|
||||||
It is possible to create a loop of console connections, with ugly results.
|
It is possible to create a loop of console connections, with ugly results.
|
||||||
Never run \fIconsole\fP from within a console connection.
|
Never run \fIconsole\fP from within a console connection (unless you set each
|
||||||
|
escape sequence differently).
|
||||||
.PP
|
.PP
|
||||||
The \-\fBr\fP option doesn't help to explain how connections get built.
|
The \fB\-r\fP option doesn't help to explain how connections get built.
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Thomas A. Fine, Ohio State Computer Science.
|
Thomas A. Fine, Ohio State Computer Science.
|
||||||
.br
|
.br
|
||||||
Kevin Braunsdorf, Purdue University Computing Center
|
Kevin Braunsdorf, Purdue University Computing Center
|
||||||
.br
|
.br
|
||||||
Bryan Stansell, Global Networking and Computing, Inc.
|
Bryan Stansell, conserver.com
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
conserver.cf(5L), conserver(8L)
|
conserver.cf(5), conserver(8)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
%define pkg conserver
|
%define pkg conserver
|
||||||
%define ver 7.0.2
|
%define ver 7.0.3
|
||||||
|
|
||||||
# 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="7.0.2"
|
VERSION="7.0.3"
|
||||||
DESC="Console server and client"
|
DESC="Console server and client"
|
||||||
CLASSES=none
|
CLASSES=none
|
||||||
ARCH=sparc
|
ARCH=sparc
|
||||||
|
Loading…
Reference in New Issue
Block a user