mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-23 18:13:36 +00:00
Compare commits
No commits in common. "master" and "v8.1.7" have entirely different histories.
48
.cirrus.yml
48
.cirrus.yml
@ -1,48 +0,0 @@
|
|||||||
env:
|
|
||||||
CIRRUS_CLONE_DEPTH: 1
|
|
||||||
|
|
||||||
freebsd_13_task:
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-13-3
|
|
||||||
install_script:
|
|
||||||
- pkg install -y autoconf automake
|
|
||||||
- ./package/setup-configure
|
|
||||||
basic_script: &basic
|
|
||||||
- "[ -f Makefile ] && make distclean"
|
|
||||||
- ./configure || { cat config.log; exit 1; }
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
uds_script: &uds
|
|
||||||
- "[ -f Makefile ] && make distclean"
|
|
||||||
- ./configure --with-trust-uds-cred --with-uds || { cat config.log; exit 1; }
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
pam_ssl_script: &pamssl
|
|
||||||
- "[ -f Makefile ] && make distclean"
|
|
||||||
- ./configure --with-pam --with-openssl || { cat config.log; exit 1; }
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
gssapi_script: &gssapi
|
|
||||||
- "[ -f Makefile ] && make distclean"
|
|
||||||
- ./configure --with-gssapi || { cat config.log; exit 1; }
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
|
|
||||||
linux_gcc_task:
|
|
||||||
container:
|
|
||||||
image: gcc:latest
|
|
||||||
install_script:
|
|
||||||
- ./package/setup-configure
|
|
||||||
basic_script: *basic
|
|
||||||
uds_script: *uds
|
|
||||||
pam_ssl_script: *pamssl
|
|
||||||
|
|
||||||
#macos_task:
|
|
||||||
# osx_instance:
|
|
||||||
# image: mojave-xcode-10.1
|
|
||||||
# install_script:
|
|
||||||
# - brew install autoconf automake
|
|
||||||
# - ./package/setup-configure
|
|
||||||
# basic_script: *basic
|
|
||||||
# uds_script: *uds
|
|
||||||
# pam_ssl_script: *pamssl
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
*.[ch]~
|
|
265
CHANGES
265
CHANGES
@ -1,267 +1,6 @@
|
|||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
version 8.2.7 (July 7, 2022):
|
|
||||||
- configure.ac: autoconf-2.70 fix (Lars Wendler <polynomial-c@gentoo.org>)
|
|
||||||
- Add high baud rates (Peter Chubb <Peter.Chubb@data61.csiro.au>)
|
|
||||||
- Make compile --with-ipv6 & setproctitle (Bjoern A. Zeeb <patch@zabbadoz.net>)
|
|
||||||
- conserver.cf: devicesubst add 'b' for baud rate (Bjoern A. Zeeb <patch@zabbadoz.net>)
|
|
||||||
- Reflect that baud values have increased to 7 digits (Bjoern A. Zeeb <patch@zabbadoz.net>)
|
|
||||||
- cirrus-ci: move to freebsd-13-0 (Bryan Stansell <bryan@stansell.org>)
|
|
||||||
- configure.ac: support libgssapi_krb5 (Jiri Kastner <cz172638@gmail.com>)
|
|
||||||
|
|
||||||
version 8.2.6 (October 19, 2020):
|
|
||||||
- try and address license concerns with LICENSE.md
|
|
||||||
- replace usleep with nanosleep (Rosen Penev <rosenp@gmail.com>)
|
|
||||||
- console: Add 'k' option to exit on console-down (Mylène Josserand <mylene.josserand@collabora.com>)
|
|
||||||
- Fix #48 - apply ipv4 CIDR access list when compiled with ipv6 support
|
|
||||||
|
|
||||||
version 8.2.5 (May 1, 2020):
|
|
||||||
- support SO_PEERCRED as well as ucred (Stuart Henderson <stu@spacehopper.org>)
|
|
||||||
- fix TLS with LibreSSL, it doesn't have :@SECLEVEL=0 (Stuart Henderson <stu@spacehopper.org>)
|
|
||||||
- Handle INGSSACCEPT case when processing GSSAPI (Ryan Steinmetz <zi@FreeBSD.org>)
|
|
||||||
- Store status_minor when calling gss_release_buffer() (Ryan Steinmetz <zi@FreeBSD.org>)
|
|
||||||
- Add conditional for FreeBSD to use the correct structure element for address (Ryan Steinmetz <zi@FreeBSD.org>)
|
|
||||||
- Fix #35 - check for sed inplace style
|
|
||||||
- fix host consoles in combination --with-ipv6 (Tobias Waldekranz <tobias@waldekranz.com>)
|
|
||||||
- Fix #38 - task execution error message
|
|
||||||
- Prevent GetMaxFiles() debug output from going to forked processes
|
|
||||||
|
|
||||||
version 8.2.4 (March 26, 2019):
|
|
||||||
- Correct man page typo (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Remove autotools generated files from repo and create with release
|
|
||||||
- Better integration of Cirrus CI - FreeBSD, Linux, and MacOS
|
|
||||||
- Moving README to markdown
|
|
||||||
- Fix #12 - Remote infomation flags (i.e. "-x") cannot be filtered by console
|
|
||||||
- Fix #8 - defaultaccess appears broken
|
|
||||||
- Rename configure.in and use autoreconf
|
|
||||||
- Better use of version.h and letting configure build things with versions
|
|
||||||
|
|
||||||
version 8.2.3 (March 17, 2019):
|
|
||||||
- Correct 'impi' typo (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Correct argument type passed to time() (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Fix compilation without deprecated OpenSSL APIs (Rosen Penev <rosenp@gmail.com>)
|
|
||||||
- Fix compilation without deprecated OpenSSL 1.1 APIs (Rosen Penev <rosenp@gmail.com>)
|
|
||||||
- Fix #6 - clang "-Wstring-plus-int" warning (Bryan Stansell <bryan@conserver.com>)
|
|
||||||
- configure.in: Add test for closefrom (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- regenerate autoconf files (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Use closefrom if available (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Correct typo (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- Add Cirrus-CI FreeBSD CI build config (Ed Maste <emaste@freebsd.org>)
|
|
||||||
- off by one found by Ed Maste (Bryan Stansell <bryan@conserver.com>)
|
|
||||||
|
|
||||||
version 8.2.2 (May 28, 2018):
|
|
||||||
- fixes for OpenSSL 1.1+ - patch by Eneas U de Queiroz
|
|
||||||
<cote2004-github@yahoo.com>
|
|
||||||
- adjustments to documentation after move to github
|
|
||||||
- removal of old RCS/CVS tags since we have git
|
|
||||||
|
|
||||||
version 8.2.1 (Jun 2, 2015):
|
|
||||||
- added TCP keepalives between client and server - TCP-based consoles
|
|
||||||
already had the code - this was mostly an oversight
|
|
||||||
- patch for SEGV and task execution - patch by Artem Savkov
|
|
||||||
<asavkov@redhat.com>
|
|
||||||
- expanded break sequences from [1-9] to [1-9a-z] - based on patch by
|
|
||||||
Artem Savkov <asavkov@redhat.com>
|
|
||||||
|
|
||||||
version 8.2.0 (Apr 20, 2014):
|
|
||||||
- added --with-trust-uds-cred which uses getsockopt() to fetch and
|
|
||||||
trust the client uid, bypassing password lookups - patch by Anton
|
|
||||||
Lundin <glance@acc.umu.se>
|
|
||||||
- missing closedir() causing memory leak - patch by Anton Lundin
|
|
||||||
<glance@acc.umu.se>
|
|
||||||
- sending a break signal over IPMI was broken - based on patch by
|
|
||||||
Alexander Y. Fomichev <git.user@gmail.com>
|
|
||||||
- IPv6 support (marked as experimental at this point because it's
|
|
||||||
untested (except by the author), there's a lack of documentation, and
|
|
||||||
I'm hoping for non-getifaddrs() system support) - patch by Milos
|
|
||||||
Vyletel <milos.vyletel@gmail.com>
|
|
||||||
- no more K&R compiler support
|
|
||||||
|
|
||||||
version 8.1.20 (Apr 4, 2014):
|
|
||||||
- IPMI serial over LAN support via FreeIPMI - based on patch by Anton
|
|
||||||
D. Kachalov <mouse@yandex-team.ru>
|
|
||||||
- minor cleanup of code, removal of gcc warnings and such that should
|
|
||||||
have no fuctional change
|
|
||||||
|
|
||||||
version 8.1.19 (Sep 26, 2013):
|
|
||||||
- prevent select/read loop when EOF on non-pty input (console) -
|
|
||||||
reported by Chris Marget <chris@marget.com>
|
|
||||||
- "!" syntax prefixing use of group names not honored - reported by
|
|
||||||
Zonker <consoleteam@gmail.com>
|
|
||||||
- fixed memory leak using timestamps - patch by Karvendhan M.
|
|
||||||
<Karvendhan.M@netapp.com>
|
|
||||||
- deprecated --with-cycladests (noop now) - cross-compilation should
|
|
||||||
work without it as autologin now expects setpgrp() to take two
|
|
||||||
arugments instead of testing for it
|
|
||||||
- no automatic checks for an empty password when using PAM
|
|
||||||
authentication - based on discussion with Ryan Kirkpatrick
|
|
||||||
<linux@rkirkpat.net>
|
|
||||||
- added 'sslcacertificatefile' and 'sslcacertificatepath' client
|
|
||||||
configuration options - based on patch by Aki Tuomi <cmouse@cmouse.fi>
|
|
||||||
- added 'sslcacertificatefile' and 'sslreqclientcert' server
|
|
||||||
configuration options
|
|
||||||
- added --with-req-server-cert to force clients to require a certificate
|
|
||||||
from the server when using SSL - based on emails with Thor Simon
|
|
||||||
<tls@coyotepoint.com>
|
|
||||||
- added server-side tasks (see conserver.cf man page) that are invoked
|
|
||||||
by the client (useful for things like IPMI-based power control of
|
|
||||||
servers, invoking resets of terminal server ports, or anything else
|
|
||||||
that requires scripting) - ideas from patch by Anton Lundin
|
|
||||||
<glance@acc.umu.se> and discussion on mailing list (2011)
|
|
||||||
- added 'confirm' option to break sequences
|
|
||||||
- added 'breaklist' option to limit exposure of break sequences to
|
|
||||||
consoles
|
|
||||||
- sending of break signals is now announced to all attached clients
|
|
||||||
|
|
||||||
version 8.1.18 (Nov 11, 2010):
|
|
||||||
- install man pages read-only and improved the contributed redhat init
|
|
||||||
script - patches by Eric Biederman <ebiederm@aristanetworks.com>
|
|
||||||
- spec file improvements in contrib/redhat-rpm - patch by Jodok Ole
|
|
||||||
Muellers <jodok.muellers@aschendorff.de>
|
|
||||||
- GSS-API patch for client code - patch by Andras Horvath
|
|
||||||
<Andras.Horvath@cern.ch>
|
|
||||||
|
|
||||||
version 8.1.17 (Sep 29, 2009):
|
|
||||||
- fix for interface detection when HAVE_SA_LEN is defined - first
|
|
||||||
detected on NetBSD 5.0 and patched by Chris Ross
|
|
||||||
<cross+conserver@distal.com>
|
|
||||||
- first person to connect to a console wanting read/write now gets it
|
|
||||||
once the active user drops read/write - suggested by Thomas Gardner
|
|
||||||
<tmg@pobox.com>
|
|
||||||
- fix typo when setting nonblocking socket for client connections,
|
|
||||||
fixing stall issues - patch by Eric Biederman
|
|
||||||
<ebiederm@aristanetworks.com>
|
|
||||||
- GSS-API patch (--with-gssapi) to help with Kerberos tokens - patch by
|
|
||||||
Nate Straz <nstraz@redhat.com>
|
|
||||||
- authenticate username without @REALM when using GSS-API
|
|
||||||
(--with-striprealm) - based on patch by Andras Horvath
|
|
||||||
<Andras.Horvath@cern.ch>
|
|
||||||
- various contrib/redhat-rpm fixes - patch by Fabien Wernli
|
|
||||||
<wernli@in2p3.fr>
|
|
||||||
- fix handling of read(stdin) returning -1 in console client - patch by
|
|
||||||
Ed Swierk <eswierk@arastra.com>
|
|
||||||
|
|
||||||
version 8.1.16 (Apr 10, 2007):
|
|
||||||
- added 'replstring' substitution option - inspired by
|
|
||||||
conversation with Owen DeLong <owen@c2company.com>
|
|
||||||
- added '^Ecn' option for writing a note to the logfile - patch
|
|
||||||
by Bryan Schmersal <bschmer@yahoo.com>
|
|
||||||
- fixed leaking file descriptors when 'host' and 'uds' consoles
|
|
||||||
fail to connect - based on patch by Michael Heironimus
|
|
||||||
<michael_heironimus@archwayconcepts.com>
|
|
||||||
|
|
||||||
version 8.1.15 (Dec 31, 2006):
|
|
||||||
- protection again telnet option negotation loops - patch by
|
|
||||||
Robby Griffin <rmg@yakshavers.com>
|
|
||||||
- console now prints the attach/detach sequences when suspended
|
|
||||||
- added --with-cycladests configure option to allow
|
|
||||||
cross-compiling on a cyclades ts - patch by Matt Johnson
|
|
||||||
<mwj@doc.ic.ac.uk>
|
|
||||||
- added master conserver host to 'console -x' output for
|
|
||||||
'device' consoles - patch by Matt Johnson <mwj@doc.ic.ac.uk>
|
|
||||||
- fixed parsing error when dealing with encapsulated
|
|
||||||
client/server options
|
|
||||||
|
|
||||||
version 8.1.14 (Apr 9, 2006):
|
|
||||||
- fixed rpm conserver.spec file - based on patch by Martin Evans
|
|
||||||
<m.d.t.evans@qmul.ac.uk>
|
|
||||||
- added 'uds' console type for unix domain socket connections -
|
|
||||||
based on patch by DJ Gregor <dj@gregor.com>
|
|
||||||
- probing of interfaces under cygwin (and possibly others?) now
|
|
||||||
skips unconfigured interfaces (even if flagged as up!) -
|
|
||||||
reported by Chris Riddoch <chrisr@digeo.com>
|
|
||||||
- added the '!login' console option to prevent clients from
|
|
||||||
connecting to a console - suggested by Greg Tillman
|
|
||||||
<gregtillman@comcast.net>
|
|
||||||
- added a 'noop' console type for consoles you'd like to name,
|
|
||||||
but have no connection to - suggested by Greg Tillman
|
|
||||||
<gregtillman@comcast.net>
|
|
||||||
- deprecated escape commands removed from the code
|
|
||||||
- added '^EcP' and '^EcR' sequences to set the playback and
|
|
||||||
replay line lengths
|
|
||||||
- new console config options 'playback' and 'replay' to let the
|
|
||||||
client set prefered output lengths (with a special feature for
|
|
||||||
a size of zero)
|
|
||||||
- prefer strlcpy() over strcpy() - based on patch by Peter
|
|
||||||
Valchev <pvalchev@openbsd.org>
|
|
||||||
- fixed bug where '^Eco' by user on an 'exec' console with an
|
|
||||||
'initcmd' causes input by user to be ignored (could be other
|
|
||||||
console types as well) - reported by Mark Wedel
|
|
||||||
<Mark.Wedel@sun.com>
|
|
||||||
- made POSIX termios code in autologin a requirement (since
|
|
||||||
conserver requires it) and cleaned up a few other issues -
|
|
||||||
based on reports by Arthur Clune <ajc22@york.ac.uk>
|
|
||||||
|
|
||||||
version 8.1.13 (Jan 15, 2006):
|
|
||||||
- use SIOCGIFNUM for interface count (if available) and catch
|
|
||||||
EINVAL on Solaris - patch by Peter Jeremy
|
|
||||||
<peter.jeremy@alcatel.com.au>
|
|
||||||
- console output now resets idle timer - suggested by Peter
|
|
||||||
Saunders <pajs@fodder.org.uk>
|
|
||||||
- bug fix for conserver process running out of control and using
|
|
||||||
up cpu - debugged with Alexandra N. Kossovsky
|
|
||||||
<Alexandra.Kossovsky@oktetlabs.ru>
|
|
||||||
|
|
||||||
version 8.1.12 (Sep 5, 2005):
|
|
||||||
- printf() fix for autologin - patch by Menno Duursma
|
|
||||||
<druiloor@zonnet.nl>
|
|
||||||
- newly spawned (from SIGHUP) processes didn't properly close
|
|
||||||
primary socket
|
|
||||||
- SSL certificates now work again (anonymous ciphers are not
|
|
||||||
allowed if a certificate is used)
|
|
||||||
- client options -x, -u, -w, and -i can now take a console name
|
|
||||||
to restrict output - suggested by Evan McClure
|
|
||||||
<emcclure@internap.com>
|
|
||||||
- convert program now installed in $libdir/conserver - patch by
|
|
||||||
Petter Reinholdtsen <pere@hungry.com>
|
|
||||||
- we now ignore SIGXFSZ, if it exists
|
|
||||||
- added 'limited' access option to remove certain functionality
|
|
||||||
from users - suggested by Sven Michels <sven@darkman.de>
|
|
||||||
- added client option -z/-Z for sending commands to servers
|
|
||||||
(reload, quit, etc) - based on suggestion by Joshua Pincus
|
|
||||||
<Joshua.Pincus@Sun.COM>
|
|
||||||
- added 'execrunas' and 'initrunas' console options to allow
|
|
||||||
'exec' and 'initcmd' execution as another user and/or group -
|
|
||||||
based on patch by Gary Mills <mills@cc.umanitoba.ca>
|
|
||||||
- the east coast mirror had to shut down (for now, at least)
|
|
||||||
- crash from bad pointer manipulation during log replay - reported by
|
|
||||||
Ryan Kirkpatrick <linux@rkirkpat.net>
|
|
||||||
|
|
||||||
version 8.1.11 (Nov 9, 2004):
|
|
||||||
- fixed array bounds and stack tromping - reported by Emmett
|
|
||||||
Hogan <hogan@bigcityit.com>
|
|
||||||
- most recent client to ask for read-write now gets it (used to
|
|
||||||
be first client to connect)
|
|
||||||
- client read-write mode now separate from console up/down state
|
|
||||||
- 'make autologin.install' now compiles autologin - reported by
|
|
||||||
Graham Merrill <teddgram@sbcglobal.net>
|
|
||||||
- new 'autocomplete' option for controlling shortest-prefix
|
|
||||||
console name matching (which has always been on)
|
|
||||||
- client now blocks on ^Eco, waiting for status of connection
|
|
||||||
- added 'a' and 'A' for upper and lowercase alphanumeric
|
|
||||||
(0-9a-z) conversions to the *subst config items - based on
|
|
||||||
patch by Jonathan Chen <jon+conserver@spock.org>
|
|
||||||
|
|
||||||
version 8.1.10 (Sep 21, 2004):
|
|
||||||
- fix "forwarding level too deep" issue with '^Ec;' - reported
|
|
||||||
by Han Pilmeyer <han.pilmeyer@hp.com>
|
|
||||||
|
|
||||||
version 8.1.9 (Jul 14, 2004):
|
|
||||||
- fixed bug processing access lists when duplicates exist in the
|
|
||||||
list - reported by Phil Dibowitz <phil@usc.edu>
|
|
||||||
- fixed bug where 'idletimeout' was not recognized in default
|
|
||||||
blocks - reported by John Cagle <jcagle@gmail.com>
|
|
||||||
- added an 'autocomplete' config option to set the console name
|
|
||||||
autocompletion behavior - suggested by John Stoffel
|
|
||||||
<stoffel@lucent.com>
|
|
||||||
|
|
||||||
version 8.1.8 (Jun 9, 2004):
|
|
||||||
- added 'initspinmax' and 'initspintimer' console options to
|
|
||||||
help calm console initialization "spinning"
|
|
||||||
- fixed setsockopt() error on 64bit solaris - reported by Trond
|
|
||||||
Hagen <trond@basefarm.no>
|
|
||||||
|
|
||||||
version 8.1.7 (May 28, 2004):
|
version 8.1.7 (May 28, 2004):
|
||||||
- cleaned up the manpages a bit to make things clearer and more
|
- cleaned up the manpages a bit to make things clearer and more
|
||||||
standard - reported by Dave Stuit <djs@tellme.com>
|
standard - reported by Dave Stuit <djs@tellme.com>
|
||||||
@ -1013,3 +752,7 @@ version 6.05:
|
|||||||
before version 6.05:
|
before version 6.05:
|
||||||
- Many, many variations. Nothing was tracked well. Bug fixes
|
- Many, many variations. Nothing was tracked well. Bug fixes
|
||||||
and enhancements of various types were applied.
|
and enhancements of various types were applied.
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: CHANGES,v 1.186 2004/05/28 18:01:10 bryan Exp $
|
||||||
|
#
|
||||||
|
4
FAQ
4
FAQ
@ -184,3 +184,7 @@ directed to faq@conserver.com. The FAQ answers the following questions:
|
|||||||
- Have you tried a search on the conserver site (it searches
|
- Have you tried a search on the conserver site (it searches
|
||||||
mailing list traffic as well) to see if someone else has gone
|
mailing list traffic as well) to see if someone else has gone
|
||||||
through the same problem?
|
through the same problem?
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: FAQ,v 1.9 2003/08/23 19:27:10 bryan Exp $
|
||||||
|
#
|
||||||
|
39
INSTALL
39
INSTALL
@ -156,9 +156,8 @@ Detailed Instructions
|
|||||||
--with-port=PORT Specify port number [conserver]
|
--with-port=PORT Specify port number [conserver]
|
||||||
--with-base=PORT Base port for secondary channel [0]
|
--with-base=PORT Base port for secondary channel [0]
|
||||||
--with-master=MASTER Specify master server hostname [console]
|
--with-master=MASTER Specify master server hostname [console]
|
||||||
--with-ccffile=CFFILE Specify client config filename
|
--with-cffile=CFFILE Specify config filename
|
||||||
[SYSCONFDIR/console.cf]
|
[SYSCONFDIR/conserver.cf]
|
||||||
--with-cffile=CFFILE Specify config filename [SYSCONFDIR/conserver.cf]
|
|
||||||
--with-pwdfile=PWDFILE Specify password filename
|
--with-pwdfile=PWDFILE Specify password filename
|
||||||
[SYSCONFDIR/conserver.passwd]
|
[SYSCONFDIR/conserver.passwd]
|
||||||
--with-logfile=LOGFILE Specify log filename [/var/log/conserver]
|
--with-logfile=LOGFILE Specify log filename [/var/log/conserver]
|
||||||
@ -167,22 +166,12 @@ Detailed Instructions
|
|||||||
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
||||||
--with-trustrevdns Trust reverse DNS information
|
--with-trustrevdns Trust reverse DNS information
|
||||||
--with-extmsgs Produce extended messages
|
--with-extmsgs Produce extended messages
|
||||||
--with-rpath Use -R as well as -L for libraries
|
|
||||||
--with-cycladests (deprecated - noop) Build for a Cyclades TS
|
|
||||||
--with-uds[=DIR] Use Unix domain sockets for client/server
|
--with-uds[=DIR] Use Unix domain sockets for client/server
|
||||||
communication [/tmp/conserver]
|
communication [/tmp/conserver]
|
||||||
--with-trust-uds-cred Trust UDS credentials obtained via socket
|
|
||||||
--with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
|
--with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
|
||||||
--with-openssl[=PATH] Compile in OpenSSL support
|
--with-openssl[=PATH] Compile in OpenSSL support
|
||||||
--with-req-server-cert Require server SSL certificate by client
|
|
||||||
--with-gssapi[=PATH] Compile in GSS-API support
|
|
||||||
--with-striprealm retry username without @REALM with gss-api
|
|
||||||
authentication
|
|
||||||
--with-freeipmi[=PATH] Compile in FreeIPMI support
|
|
||||||
--with-dmalloc[=PATH] Compile in dmalloc support
|
--with-dmalloc[=PATH] Compile in dmalloc support
|
||||||
--with-pam Enable PAM support
|
--with-pam Enable PAM support
|
||||||
--with-ipv6 (experimental) Use IPv6 for client/server
|
|
||||||
communication
|
|
||||||
|
|
||||||
Not surprisingly, some match the old conserver/cons.h items...here
|
Not surprisingly, some match the old conserver/cons.h items...here
|
||||||
they are for reference:
|
they are for reference:
|
||||||
@ -239,10 +228,10 @@ Detailed Instructions
|
|||||||
step.
|
step.
|
||||||
|
|
||||||
+ Next, make sure conserver runs during boot. The init script we
|
+ Next, make sure conserver runs during boot. The init script we
|
||||||
use under Solaris is installed in
|
use under Solaris is installed in <PREFIX>/etc/conserver.rc.
|
||||||
<DATADIR>/examples/conserver/conserver.rc. Use that or some
|
Use that or some form of it for your own /etc/init.d script or
|
||||||
form of it for your own /etc/init.d script or an entry in
|
an entry in startup files (/etc/rc, /etc/rc.local, or
|
||||||
startup files (/etc/rc, /etc/rc.local, or whatever).
|
whatever).
|
||||||
|
|
||||||
+ Now for the fun stuff. You need to create a conserver.cf and
|
+ Now for the fun stuff. You need to create a conserver.cf and
|
||||||
conserver.passwd file. Those are defined with the
|
conserver.passwd file. Those are defined with the
|
||||||
@ -256,6 +245,17 @@ Detailed Instructions
|
|||||||
|
|
||||||
Other Information And Gotchas
|
Other Information And Gotchas
|
||||||
|
|
||||||
|
- Debian Linux Distribution
|
||||||
|
|
||||||
|
The Debian folks have conserver distributed with the package
|
||||||
|
names of conserver-client and conserver-server. They are in
|
||||||
|
the distribution "sid" and the "non-free" part (because the
|
||||||
|
Ohio State license doesn't explicitly allow for modification to
|
||||||
|
the code, even though it's totally implied and the intention of
|
||||||
|
the author - I've even got proof in email! Oh well, can't
|
||||||
|
blame the Debian folks for being cautious - they've been burned
|
||||||
|
before, apparently).
|
||||||
|
|
||||||
- Potential GCC bug
|
- Potential GCC bug
|
||||||
|
|
||||||
Adam Morris <AMorris@providence.org> reported a problem with
|
Adam Morris <AMorris@providence.org> reported a problem with
|
||||||
@ -275,3 +275,8 @@ Other Information And Gotchas
|
|||||||
connecting to servers, you might be tickling this bug and you
|
connecting to servers, you might be tickling this bug and you
|
||||||
can upgrade the compiler, turn off the optimization, or apply
|
can upgrade the compiler, turn off the optimization, or apply
|
||||||
this code change.
|
this code change.
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: INSTALL,v 1.38 2004/04/13 18:11:58 bryan Exp $
|
||||||
|
#
|
||||||
|
126
LICENSE
126
LICENSE
@ -1,29 +1,115 @@
|
|||||||
BSD 3-Clause License
|
Since this piece of software has had many contiributors, there is a
|
||||||
|
"chain" of licensing information embedded in the files. I've copied
|
||||||
|
what I could find here so that it's easy to reference. The entire
|
||||||
|
bundle of software is guided by these licensing statements.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 2000, conserver.com
|
Copyright (c) 2000, conserver.com
|
||||||
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
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
- Redistributions of source code must retain the above copyright notice,
|
||||||
list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
this list of conditions and the following disclaimer in the documentation
|
notice, this list of conditions and the following disclaimer in the
|
||||||
and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
* Neither the name of the copyright holder nor the names of its
|
- Neither the name of conserver.com nor the names of its contributors
|
||||||
contributors may be used to endorse or promote products derived from
|
may be used to endorse or promote products derived from this
|
||||||
this software without specific prior written permission.
|
software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 1998, GNAC, Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
- Neither the name of GNAC, Inc. nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this
|
||||||
|
software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||||
|
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright 1992 Purdue Research Foundation, West Lafayette, Indiana
|
||||||
|
47907. All rights reserved.
|
||||||
|
|
||||||
|
This software is not subject to any license of the American Telephone
|
||||||
|
and Telegraph Company or the Regents of the University of California.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose on
|
||||||
|
any computer system, and to alter it and redistribute it freely, subject
|
||||||
|
to the following restrictions:
|
||||||
|
|
||||||
|
1. Neither the authors nor Purdue University are responsible for any
|
||||||
|
consequences of the use of this software.
|
||||||
|
|
||||||
|
2. The origin of this software must not be misrepresented, either by
|
||||||
|
explicit claim or by omission. Credit to the authors and Purdue
|
||||||
|
University must appear in documentation and sources.
|
||||||
|
|
||||||
|
3. Altered versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
|
||||||
|
4. This notice may not be removed or altered.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 1990 The Ohio State University.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms are permitted
|
||||||
|
provided that: (1) source distributions retain this entire copyright
|
||||||
|
notice and comment, and (2) distributions including binaries display
|
||||||
|
the following acknowledgement: ``This product includes software
|
||||||
|
developed by The Ohio State University and its contributors''
|
||||||
|
in the documentation or other materials provided with the distribution
|
||||||
|
and in all advertising materials mentioning features or use of this
|
||||||
|
software. Neither the name of the University nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
115
LICENSES
115
LICENSES
@ -1,115 +0,0 @@
|
|||||||
Since this piece of software has had many contiributors, there is a
|
|
||||||
"chain" of licensing information embedded in the files. I've copied
|
|
||||||
what I could find here so that it's easy to reference. The entire
|
|
||||||
bundle of software is guided by these licensing statements.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2000, conserver.com
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are
|
|
||||||
met:
|
|
||||||
|
|
||||||
- Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
- Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
- Neither the name of conserver.com nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this
|
|
||||||
software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
||||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
||||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 1998, GNAC, Inc.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are
|
|
||||||
met:
|
|
||||||
|
|
||||||
- Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
- Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
- Neither the name of GNAC, Inc. nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this
|
|
||||||
software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
||||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
||||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright 1992 Purdue Research Foundation, West Lafayette, Indiana
|
|
||||||
47907. All rights reserved.
|
|
||||||
|
|
||||||
This software is not subject to any license of the American Telephone
|
|
||||||
and Telegraph Company or the Regents of the University of California.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose on
|
|
||||||
any computer system, and to alter it and redistribute it freely, subject
|
|
||||||
to the following restrictions:
|
|
||||||
|
|
||||||
1. Neither the authors nor Purdue University are responsible for any
|
|
||||||
consequences of the use of this software.
|
|
||||||
|
|
||||||
2. The origin of this software must not be misrepresented, either by
|
|
||||||
explicit claim or by omission. Credit to the authors and Purdue
|
|
||||||
University must appear in documentation and sources.
|
|
||||||
|
|
||||||
3. Altered versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
|
|
||||||
4. This notice may not be removed or altered.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 1990 The Ohio State University.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms are permitted
|
|
||||||
provided that: (1) source distributions retain this entire copyright
|
|
||||||
notice and comment, and (2) distributions including binaries display
|
|
||||||
the following acknowledgement: ``This product includes software
|
|
||||||
developed by The Ohio State University and its contributors''
|
|
||||||
in the documentation or other materials provided with the distribution
|
|
||||||
and in all advertising materials mentioning features or use of this
|
|
||||||
software. Neither the name of the University nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
|
||||||
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
104
LICENSES.md
104
LICENSES.md
@ -1,104 +0,0 @@
|
|||||||
License Clarification
|
|
||||||
=====================
|
|
||||||
|
|
||||||
The licenses attached to this software ([LICENSES](LICENSES)) are supposed
|
|
||||||
to paint a simple concept: that this software was built for the open source
|
|
||||||
community and they result in a license compatible with [LICENSE](LICENSE).
|
|
||||||
|
|
||||||
Unfortunately, the real world steps in and troubles can arise. This note
|
|
||||||
has been moved over from the [INSTALL](INSTALL) file:
|
|
||||||
|
|
||||||
The Debian folks have conserver distributed with the package
|
|
||||||
names of conserver-client and conserver-server. They are in
|
|
||||||
the distribution "sid" and the "non-free" part (because the
|
|
||||||
Ohio State license doesn't explicitly allow for modification to
|
|
||||||
the code, even though it's totally implied and the intention of
|
|
||||||
the author - I've even got proof in email! Oh well, can't
|
|
||||||
blame the Debian folks for being cautious - they've been burned
|
|
||||||
before, apparently).
|
|
||||||
|
|
||||||
Here's a copy of the message I exchanged with Thomas A. Fine (original
|
|
||||||
author at OSU) in 2001 that is referenced above:
|
|
||||||
|
|
||||||
Date: Wed, 27 Jun 2001 19:47:18 -0400 (EDT)
|
|
||||||
To: bryan@conserver.com
|
|
||||||
From: "Thomas A. Fine" <fine@head-cfa.harvard.edu>
|
|
||||||
Subject: Re: A conserver license question...
|
|
||||||
|
|
||||||
> Hi Tom,
|
|
||||||
>
|
|
||||||
> I had a little "problem" crop up that I was hoping you could help me
|
|
||||||
> with. A guy out in net-land is trying to put a debian package together
|
|
||||||
> of the code I've been releasing (based on your original work) and they
|
|
||||||
> don't like part of the Ohio State license. I've attached the message
|
|
||||||
> below.
|
|
||||||
>
|
|
||||||
> I'm not sure what can be done. One thought was a message from you that
|
|
||||||
> I could put with the code stating that modifications are ok would
|
|
||||||
> work. Or maybe just modifying the original license statement. Heck, I
|
|
||||||
> don't even know if either are 100% legal. Maybe I need to talk to
|
|
||||||
> someone at Ohio State.
|
|
||||||
>
|
|
||||||
> Well, if you have any ideas or suggestions, please let me know. Don't
|
|
||||||
> know if I ever got a chance to thank you for the great stuff you
|
|
||||||
> started! Thank you! ;-)
|
|
||||||
|
|
||||||
Well, if I knew then what I know now, I would have copyrighted it
|
|
||||||
under my own name, and not under OSU, and then I could change it.
|
|
||||||
Since I don't work there anymore, strictly speaking, I can't change
|
|
||||||
it.
|
|
||||||
|
|
||||||
However, IMHO, this license allows modifications, without explicitly
|
|
||||||
stating it. I can state without a doubt that this was my intention
|
|
||||||
at the time (and hence, OSU's intention, since I put in the copyright
|
|
||||||
while working for OSU).
|
|
||||||
|
|
||||||
But also, since it allows use of the source, and since the statement
|
|
||||||
required for inclusion says "includes software ..." it seems pretty
|
|
||||||
clear that modification was both allowed and expected. You can't
|
|
||||||
really use sources if you aren't changing them, and you certainly
|
|
||||||
can't include this software in some other product without making
|
|
||||||
modifications.
|
|
||||||
|
|
||||||
As I recall, I more or less used the copyright that Berkeley was using
|
|
||||||
back then for there BSD-related software, so I'm surprised there's a
|
|
||||||
problem with it.
|
|
||||||
|
|
||||||
I have to point out that version 1.2, available at
|
|
||||||
http://hea-www.harvard.edu/~fine/Tech/cs1.2/
|
|
||||||
is distributed entirely without copyright notices. Interesting, no?
|
|
||||||
So I guess I could add a copyright notice to that. But would I then
|
|
||||||
be violating the OSU copyright that I wrote for 1.1? Since it is
|
|
||||||
a different version, I could probably write a new copyright notice
|
|
||||||
and license and be free and clear.
|
|
||||||
|
|
||||||
There's also Purdue's versions of the software. It's mentioned on my
|
|
||||||
console server web page at
|
|
||||||
http://hea-www.harvard.edu/~fine/Tech/console-server.html
|
|
||||||
|
|
||||||
So, pass this on to the people you're working with and let me know how
|
|
||||||
you want to proceed.
|
|
||||||
|
|
||||||
tom
|
|
||||||
|
|
||||||
In addition, a post to the Conserver Users mailing list in May 2020 contained:
|
|
||||||
|
|
||||||
From: Paul Wise via users <users@conserver.com>
|
|
||||||
To: users@conserver.com
|
|
||||||
Subject: Re: license change?
|
|
||||||
Date: Mon, 25 May 2020 12:42:28 +0800
|
|
||||||
|
|
||||||
On Thu, 2019-07-04 at 10:20 +0200, Bryan Stansell via users wrote:
|
|
||||||
> So, it's more the lack of explicitly stating the code can be
|
|
||||||
> modified.
|
|
||||||
|
|
||||||
Since then I talked to one of RedHat's lawyers and they mentioned that
|
|
||||||
they have dealt with this problem too and also concluded that these
|
|
||||||
licenses were intended to cover modification. The current wording of
|
|
||||||
the initial part of the BSD license reflects an attempt to correct an
|
|
||||||
earlier mistake (i.e. someone pointed out the error and Berkeley added
|
|
||||||
"with or without modification"). Also the anti-endorsement clause
|
|
||||||
implies a right to modify.
|
|
||||||
|
|
||||||
Hopefully corporations (or, I suppose, their lawyers) will be happy with the
|
|
||||||
explanation above and become comfortable with the stated license.
|
|
@ -1,5 +1,4 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
|
36
PROTOCOL
36
PROTOCOL
@ -7,7 +7,7 @@ What Is This?
|
|||||||
|
|
||||||
The following is an attempt to describe the client/server protocol used
|
The following is an attempt to describe the client/server protocol used
|
||||||
between the server (conserver) and the client (console). This document
|
between the server (conserver) and the client (console). This document
|
||||||
bases its information on conserver version 8.1.4, as it's the release
|
bases it's information on conserver version 8.1.4, as it's the release
|
||||||
currently available. If there are changes to the client/server
|
currently available. If there are changes to the client/server
|
||||||
protocol, the INSTALL file should reference them and, ideally, this
|
protocol, the INSTALL file should reference them and, ideally, this
|
||||||
document will be updated.
|
document will be updated.
|
||||||
@ -106,13 +106,10 @@ Upon successful login, the commands available are:
|
|||||||
groups provide ports for group leaders
|
groups provide ports for group leaders
|
||||||
help this help message
|
help this help message
|
||||||
master provide a list of master servers
|
master provide a list of master servers
|
||||||
newlogs* close and open all logfiles (SIGUSR2)
|
|
||||||
pid provide pid of master process
|
pid provide pid of master process
|
||||||
quit* terminate conserver (SIGTERM)
|
quit* terminate conserver (SIGTERM)
|
||||||
restart* restart conserver (SIGHUP) - deprecated
|
restart* restart conserver (SIGHUP)
|
||||||
reconfig* reread config file (SIGHUP)
|
|
||||||
version provide version info for server
|
version provide version info for server
|
||||||
up* bring up all downed consoles (SIGUSR1)
|
|
||||||
* = requires admin privileges
|
* = requires admin privileges
|
||||||
|
|
||||||
"exit" and "help" are the same as before the client logged login.
|
"exit" and "help" are the same as before the client logged login.
|
||||||
@ -133,36 +130,23 @@ names. The list includes any hosts (including the possibility of the
|
|||||||
local host) which have locally managed consoles. The client is not
|
local host) which have locally managed consoles. The client is not
|
||||||
disconnected.
|
disconnected.
|
||||||
|
|
||||||
The "newlogs" command reopens all logfiles used by conserver, assuming
|
|
||||||
the user has administrative access. It responds with a message starting
|
|
||||||
with "ok" if successful and an error message otherwise (like
|
|
||||||
"unauthorized command"). The client is disconnected if it's successful.
|
|
||||||
|
|
||||||
The "pid" command responds with the pid of the master process (in this
|
The "pid" command responds with the pid of the master process (in this
|
||||||
case, the one the client is talking to). The client is not
|
case, the one the client is talking to). The client is not
|
||||||
disconnected.
|
disconnected.
|
||||||
|
|
||||||
The "quit" command will shut down conserver, assuming the user has
|
The "quit" command will shut down conserver, assuming the user has
|
||||||
administrative access. It responds with a message starting with "ok" if
|
administrative access. It responds with a message starting with "ok" if
|
||||||
successful and an error message otherwise (like "unauthorized command").
|
successful, and an error message otherwise (like "unauthorized
|
||||||
The client is disconnected if it's successful.
|
command"). The client is disconnected if it's successful.
|
||||||
|
|
||||||
The "restart" command has been deprecated. You should use "reconfig".
|
The "restart" command will shut down conserver, assuming the user has
|
||||||
|
administrative access. It responds with a message starting with "ok" if
|
||||||
The "reconfig" command will cause conserver to reread the configuration
|
successful, and an error message otherwise (like "unauthorized
|
||||||
file and apply any changes, assuming the user has administrative access.
|
command"). The client is not disconnected.
|
||||||
It responds with a message starting with "ok" if successful and an error
|
|
||||||
message otherwise (like "unauthorized command"). The client is not
|
|
||||||
disconnected.
|
|
||||||
|
|
||||||
The "version" command responds with the version string. The client is
|
The "version" command responds with the version string. The client is
|
||||||
not disconnected.
|
not disconnected.
|
||||||
|
|
||||||
The "up" command tries to "bring up" all disconnected consoles, assuming
|
|
||||||
the user has administrative access. It responds with a message starting
|
|
||||||
with "ok" if successful and an error message otherwise (like
|
|
||||||
"unauthorized command"). The client is disconnected if it's successful.
|
|
||||||
|
|
||||||
|
|
||||||
"group" Mode
|
"group" Mode
|
||||||
------------
|
------------
|
||||||
@ -300,3 +284,7 @@ The more "interesting" escape sequences are the following.
|
|||||||
" -- attached (nologging)]"
|
" -- attached (nologging)]"
|
||||||
" -- attached]"
|
" -- attached]"
|
||||||
" -- spy mode]"
|
" -- spy mode]"
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: PROTOCOL,v 1.1 2004/04/16 16:50:55 bryan Exp $
|
||||||
|
#
|
||||||
|
65
README
Normal file
65
README
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
README
|
||||||
|
======
|
||||||
|
|
||||||
|
|
||||||
|
Maintainer/Enhancer
|
||||||
|
|
||||||
|
Bryan Stansell (bryan@conserver.com)
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
|
||||||
|
See the INSTALL file for installation, the conserver.html file for
|
||||||
|
an overview, and the man pages for specifics.
|
||||||
|
|
||||||
|
|
||||||
|
Downloading
|
||||||
|
|
||||||
|
The latest version can be found at http://www.conserver.com/
|
||||||
|
(US-West).
|
||||||
|
|
||||||
|
Mirrors of the site are at:
|
||||||
|
|
||||||
|
Australia http://planetmirror.com/pub/conserver/
|
||||||
|
US-East http://conserver.syr.edu/
|
||||||
|
|
||||||
|
|
||||||
|
Systems Tested
|
||||||
|
|
||||||
|
Here's a list of systems that I've been told can successfully
|
||||||
|
compile conserver. If anyone has more to add to this list (or
|
||||||
|
something on the list doesn't work any more), please let me know.
|
||||||
|
|
||||||
|
AIX 4.3.3/5.1/5.2, native cc
|
||||||
|
BSDI BSD/OS 3.X, gcc
|
||||||
|
Cygwin (w2k),gcc 2.95.3
|
||||||
|
DEC Tru64 4.0, gcc
|
||||||
|
DEC Tru64 4.0/5.1, native cc
|
||||||
|
FreeBSD 4.2/4.8/5.1 (x86), gcc
|
||||||
|
HP-UX 10.20, gcc
|
||||||
|
HP-UX 11.10 parisc and ia64, native cc
|
||||||
|
Irix 6.15, native cc
|
||||||
|
Linux 2.2.18 (x86), gcc
|
||||||
|
Linux 2.4.2 (x86), gcc
|
||||||
|
Linux ia64, native gcc
|
||||||
|
Linux RedHat 6.2 and 7.2 (x86), native gcc
|
||||||
|
MacOS X, native gcc
|
||||||
|
Solaris 2.5.1 thru 9 (sparc/x86), gcc
|
||||||
|
Solaris 7/8, native cc
|
||||||
|
|
||||||
|
|
||||||
|
Contributions
|
||||||
|
|
||||||
|
Contributions distributed with the code can be found in the contrib
|
||||||
|
subdirectory. Other tools that complement conserver are listed
|
||||||
|
below.
|
||||||
|
|
||||||
|
Zinc
|
||||||
|
----
|
||||||
|
According to the website, Zinc is a console log output management
|
||||||
|
program. For more information, visit the website at:
|
||||||
|
http://www.columbia.edu/acis/sy/unixdev/zinc
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: README,v 1.23 2004/05/27 23:39:29 bryan Exp $
|
||||||
|
#
|
35
README.md
35
README.md
@ -1,35 +0,0 @@
|
|||||||
Conserver
|
|
||||||
=========
|
|
||||||
|
|
||||||
[](https://cirrus-ci.com/github/bstansell/conserver)
|
|
||||||
|
|
||||||
Conserver is an application that allows multiple users to watch a
|
|
||||||
serial console at the same time. It can log the data, allows users to
|
|
||||||
take write-access of a console (one at a time), and has a variety of
|
|
||||||
bells and whistles to accentuate that basic functionality. The idea is
|
|
||||||
that conserver will log all your serial traffic so you can go back and
|
|
||||||
review why something crashed, look at changes (if done on the console),
|
|
||||||
or tie the console logs into a monitoring system (just watch the
|
|
||||||
logfiles it creates). With multi-user capabilities you can work on
|
|
||||||
equipment with others, mentor, train, etc. It also does all that
|
|
||||||
client-server stuff so that, assuming you have a network connection,
|
|
||||||
you can interact with any of the equipment from home or wherever.
|
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
|
||||||
-------------
|
|
||||||
|
|
||||||
See the `INSTALL` file for installation and the man pages for specifics.
|
|
||||||
|
|
||||||
|
|
||||||
Downloading
|
|
||||||
-----------
|
|
||||||
|
|
||||||
The latest version can be found on [GitHub](https://github.com/bstansell/conserver/releases).
|
|
||||||
|
|
||||||
|
|
||||||
Contributions
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Contributions distributed with the code can be found in the `contrib`
|
|
||||||
subdirectory.
|
|
24
TODO
24
TODO
@ -54,6 +54,8 @@ Bryan Stansell
|
|||||||
|
|
||||||
- cyclades ts1000/2000 port : "Moses, Joel" <jmoses@deloitte.com>
|
- cyclades ts1000/2000 port : "Moses, Joel" <jmoses@deloitte.com>
|
||||||
|
|
||||||
|
- config file for client (list of masters, for example)
|
||||||
|
|
||||||
- strftime() idea for logfile names : Lars Kellogg-Stedman <lars@larsshack.org>
|
- strftime() idea for logfile names : Lars Kellogg-Stedman <lars@larsshack.org>
|
||||||
|
|
||||||
- 9600baud log replay?
|
- 9600baud log replay?
|
||||||
@ -84,25 +86,17 @@ Bryan Stansell
|
|||||||
- not even sure if this is possible w/o confusing the client,
|
- not even sure if this is possible w/o confusing the client,
|
||||||
but maybe with the new 8.1.0 client-server protocol, we can!
|
but maybe with the new 8.1.0 client-server protocol, we can!
|
||||||
|
|
||||||
|
- allow for very long replays (hundres of lines) : John Stoffel
|
||||||
|
<stoffel@lucent.com>
|
||||||
|
|
||||||
- log rotation by date : Tom Pachla <tom.pachla@nlc-bnc.ca>
|
- log rotation by date : Tom Pachla <tom.pachla@nlc-bnc.ca>
|
||||||
|
|
||||||
- strict file permission checks on conserver.passwd/conserver.cf : Erik
|
- strict file permission checks on conserver.passwd/conserver.cf : Erik
|
||||||
Sjolund <erik.sjolund@sbc.su.se>
|
Sjolund <erik.sjolund@sbc.su.se>
|
||||||
|
|
||||||
- netgroup support? : Nikolaos Papavassiliou
|
- netgroup support? : Nikolaos Papavassiliou
|
||||||
<Nikolaos.Papavassiliou@reuters.com> and Phil Dibowitz <phil@usc.edu>
|
<Nikolaos.Papavassiliou@reuters.com>
|
||||||
|
|
||||||
- send sequences to console on client connect? (to repaint screen,
|
#
|
||||||
for example) : John Cagle <jcagle@gmail.com>
|
# $Id: TODO,v 1.50 2004/05/28 01:58:43 bryan Exp $
|
||||||
|
#
|
||||||
- uucp locks : Sebastian Zagrodzki <sebek@heron.net.icm.edu.pl>
|
|
||||||
|
|
||||||
- support more than 9 break sequences : Danish Mirza <Danish@lehman.com>
|
|
||||||
thought it was easy, but adding more than could break things with
|
|
||||||
current encoding. doable, will have to think harder about it.
|
|
||||||
|
|
||||||
- reintroduce console grouping : Martin Turba
|
|
||||||
<martin.turba@igd.fraunhofer.de>
|
|
||||||
|
|
||||||
- quick-recheck of down consoles (for uds) and possibly only log state
|
|
||||||
changes (instead of each try) : DJ Gregor <dj@gregor.com>
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
theme: jekyll-theme-cayman
|
|
@ -1,3 +1,5 @@
|
|||||||
|
# $Id: INSTALL.old,v 1.1 2003/11/04 02:36:24 bryan Exp $
|
||||||
|
|
||||||
To install this program you need root access and access to the physical
|
To install this program you need root access and access to the physical
|
||||||
console of the machine (either through the console server or via the physical
|
console of the machine (either through the console server or via the physical
|
||||||
world).
|
world).
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
@ -46,7 +45,7 @@ clean:
|
|||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
|
|
||||||
install: autologin
|
install:
|
||||||
$(MKDIR) $(DESTDIR)$(bindir)
|
$(MKDIR) $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_PROGRAM) autologin $(DESTDIR)$(bindir)
|
$(INSTALL_PROGRAM) autologin $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
|
@ -15,3 +15,7 @@ No one I've ever talked to found a need for something like autologin.
|
|||||||
Good luck.
|
Good luck.
|
||||||
|
|
||||||
Bryan Stansell
|
Bryan Stansell
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: README,v 1.2 2002/09/23 21:08:42 bryan Exp $
|
||||||
|
#
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# $Id: README.old,v 1.1 2003/11/04 02:36:24 bryan Exp $
|
||||||
|
|
||||||
This program can be used to put a root shell on the console at boot time.
|
This program can be used to put a root shell on the console at boot time.
|
||||||
See the manual page.
|
See the manual page.
|
||||||
|
|
||||||
|
@ -68,6 +68,9 @@
|
|||||||
* Global variables
|
* Global variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef lint
|
||||||
|
char *rcsid = "$Id: autologin.c,v 1.23 2002/09/21 06:29:39 bryan Exp $";
|
||||||
|
#endif /* not lint */
|
||||||
extern char *progname;
|
extern char *progname;
|
||||||
gid_t awGrps[NGROUPS_MAX];
|
gid_t awGrps[NGROUPS_MAX];
|
||||||
int iGrps = 0;
|
int iGrps = 0;
|
||||||
@ -83,19 +86,39 @@ void make_utmp();
|
|||||||
void usage();
|
void usage();
|
||||||
|
|
||||||
int
|
int
|
||||||
Process(void)
|
Process()
|
||||||
{
|
{
|
||||||
|
register int c;
|
||||||
int iErrs = 0;
|
int iErrs = 0;
|
||||||
int i, iNewGrp;
|
int i, iNewGrp;
|
||||||
gid_t wGid;
|
gid_t wGid;
|
||||||
uid_t wUid;
|
uid_t wUid;
|
||||||
char *pcCmd = (char *)0, *pcDevTty = (char *)0;
|
char *pcCmd = (char *)0,
|
||||||
|
*pcDevTty = (char *)0;
|
||||||
|
char *pcTmp;
|
||||||
#ifdef HAVE_GETUSERATTR
|
#ifdef HAVE_GETUSERATTR
|
||||||
char *pcGrps;
|
char *pcGrps;
|
||||||
#endif
|
#endif
|
||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
#ifdef HAVE_TERMIOS_H
|
||||||
struct termios n_tio;
|
struct termios n_tio;
|
||||||
|
#else
|
||||||
|
# ifdef TIOCNOTTY
|
||||||
|
# ifdef O_CBREAK
|
||||||
|
auto struct tc n_tchars;
|
||||||
|
# else
|
||||||
|
auto struct tchars n_tchars;
|
||||||
|
# endif
|
||||||
|
# ifdef TIOCGLTC
|
||||||
|
auto struct ltchars n_ltchars;
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# ifdef TIOCGETP
|
||||||
|
auto struct sgttyb n_sty;
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||||
char my_hostname[MAXHOSTNAMELEN];
|
char my_hostname[MAXHOSTNAMELEN];
|
||||||
#endif
|
#endif
|
||||||
@ -103,16 +126,14 @@ Process(void)
|
|||||||
|
|
||||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||||
if (0 != gethostname(my_hostname, sizeof(my_hostname))) {
|
if (0 != gethostname(my_hostname, sizeof(my_hostname))) {
|
||||||
(void)fprintf(stderr, "%s: gethostname: %s\n", progname,
|
(void) fprintf(stderr, "%s: gethostname: %s\n", strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((char *)0 != pcCommand) {
|
if ((char *)0 != pcCommand) {
|
||||||
if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) {
|
if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) {
|
||||||
(void)fprintf(stderr, "%s: malloc: %s\n", progname,
|
(void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
@ -127,15 +148,13 @@ Process(void)
|
|||||||
if ( (char *)0 == pcLogin ) {
|
if ( (char *)0 == pcLogin ) {
|
||||||
static char acLogin[17];
|
static char acLogin[17];
|
||||||
if ((struct passwd *)0 == (pwd = getpwuid(geteuid()))) {
|
if ((struct passwd *)0 == (pwd = getpwuid(geteuid()))) {
|
||||||
(void)fprintf(stderr, "%s: %d: uid unknown\n", progname,
|
(void) fprintf(stderr, "%s: %d: uid unknown\n", progname, geteuid());
|
||||||
geteuid());
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
pcLogin = strcpy(acLogin, pwd->pw_name);
|
pcLogin = strcpy(acLogin, pwd->pw_name);
|
||||||
} else if ((struct passwd *)0 == (pwd = getpwnam(pcLogin))) {
|
} else if ((struct passwd *)0 == (pwd = getpwnam(pcLogin))) {
|
||||||
(void)fprintf(stderr, "%s: %s: login name unknown\n", progname,
|
(void) fprintf(stderr, "%s: %s: login name unknown\n", progname, pcLogin);
|
||||||
pcLogin);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
@ -162,10 +181,8 @@ Process(void)
|
|||||||
if ( '/' == *pcTty ) {
|
if ( '/' == *pcTty ) {
|
||||||
pcDevTty = pcTty;
|
pcDevTty = pcTty;
|
||||||
} else {
|
} else {
|
||||||
if ((char *)0 ==
|
if ( (char *)0 == (pcDevTty = (char *)malloc(strlen(pcTty)+5+1) ) ) {
|
||||||
(pcDevTty = (char *)malloc(strlen(pcTty) + 5 + 1))) {
|
(void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno));
|
||||||
(void)fprintf(stderr, "%s: malloc: %s\n", progname,
|
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
sprintf(pcDevTty, "/dev/%s", pcTty);
|
sprintf(pcDevTty, "/dev/%s", pcTty);
|
||||||
@ -173,13 +190,11 @@ Process(void)
|
|||||||
|
|
||||||
|
|
||||||
if (0 != stat(pcDevTty, &st)) {
|
if (0 != stat(pcDevTty, &st)) {
|
||||||
(void)fprintf(stderr, "%s: Can't stat %s: %s\n", progname,
|
(void) fprintf(stderr, "%s: Can't stat %s: %s\n", progname, pcDevTty, strerror(errno));
|
||||||
pcDevTty, strerror(errno));
|
|
||||||
++iErrs;
|
++iErrs;
|
||||||
#if defined(VCHR) && defined(VMPC)
|
#if defined(VCHR) && defined(VMPC)
|
||||||
} else if (VCHR != st.st_type && VMPC != st.st_type) {
|
} else if (VCHR != st.st_type && VMPC != st.st_type) {
|
||||||
(void)fprintf(stderr, "%s: %s is not a character device\n",
|
(void) fprintf(stderr, "%s: %s is not a character device\n", progname, pcDevTty);
|
||||||
progname, pcDevTty);
|
|
||||||
++iErrs;
|
++iErrs;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -198,32 +213,27 @@ Process(void)
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
if (iGrps && 0 < setgroups(iGrps, awGrps)) {
|
if (iGrps && 0 < setgroups(iGrps, awGrps)) {
|
||||||
(void)fprintf(stderr, "%s: Can't setgroups(): %s\n", progname,
|
(void) fprintf(stderr, "%s: Can't setgroups(): %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close open files
|
/* Close open files
|
||||||
*/
|
*/
|
||||||
#if HAVE_CLOSEFROM
|
|
||||||
closefrom((char *)0 == pcTty ? 3 : 0);
|
|
||||||
#else
|
|
||||||
for (i = (char *)0 == pcTty ? 3 : 0; i < getdtablesize(); ++i) {
|
for (i = (char *)0 == pcTty ? 3 : 0; i < getdtablesize(); ++i) {
|
||||||
(void) close(i);
|
(void) close(i);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Make us a session leader so that when we open /dev/tty
|
/* Make us a session leader so that when we open /dev/tty
|
||||||
* it will become our controlling terminal.
|
* it will become our controlling terminal.
|
||||||
*/
|
*/
|
||||||
if (-1 == (iNewGrp = getsid(getpid()))) {
|
if (-1 == (iNewGrp = getsid(getpid()))) {
|
||||||
if (-1 == (iNewGrp = setsid())) {
|
if (-1 == (iNewGrp = setsid())) {
|
||||||
(void)fprintf(stderr, "%s: setsid: %d: %s\n", progname,
|
(void) fprintf(stderr, "%s: setsid: %d: %s\n", progname, iNewGrp, strerror(errno));
|
||||||
iNewGrp, strerror(errno));
|
|
||||||
iNewGrp = getpid();
|
iNewGrp = getpid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||||
if (!cannot_audit(0)) {
|
if (!cannot_audit(0)) {
|
||||||
# if defined(HAVE_GETAUDIT_ADDR)
|
# if defined(HAVE_GETAUDIT_ADDR)
|
||||||
@ -253,7 +263,8 @@ Process(void)
|
|||||||
# else
|
# else
|
||||||
if ((char *)0 != (hp = gethostbyname(my_hostname))
|
if ((char *)0 != (hp = gethostbyname(my_hostname))
|
||||||
&& AF_INET == hp->h_addrtype) {
|
&& AF_INET == hp->h_addrtype) {
|
||||||
(void)memcpy(&audit_info.ai_termid.machine, hp->h_addr,
|
(void)memcpy(&audit_info.ai_termid.machine,
|
||||||
|
hp->h_addr,
|
||||||
sizeof(audit_info.ai_termid.machine));
|
sizeof(audit_info.ai_termid.machine));
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@ -263,26 +274,36 @@ Process(void)
|
|||||||
if (0 > setaudit(&audit_info))
|
if (0 > setaudit(&audit_info))
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: setaudit failed: %s\n", progname,
|
fprintf(stderr, "%s: setaudit failed: %s\n",
|
||||||
|
progname,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
fShowEvent = 0;
|
fShowEvent = 0;
|
||||||
}
|
}
|
||||||
if (fShowEvent) {
|
if (fShowEvent) {
|
||||||
fShowEvent =
|
fShowEvent = au_preselect(AUE_autologin,
|
||||||
au_preselect(AUE_autologin, &audit_mask, AU_PRS_SUCCESS,
|
&audit_mask,
|
||||||
|
AU_PRS_SUCCESS,
|
||||||
AU_PRS_REREAD);
|
AU_PRS_REREAD);
|
||||||
}
|
}
|
||||||
if (fShowEvent) {
|
if (fShowEvent) {
|
||||||
iAuditFile = au_open();
|
iAuditFile = au_open();
|
||||||
# if defined(HAVE_GETAUDIT_ADDR)
|
# if defined(HAVE_GETAUDIT_ADDR)
|
||||||
ptAuditToken =
|
ptAuditToken = au_to_subject_ex(wUid,
|
||||||
au_to_subject_ex(wUid, wUid, wGid, wUid, wGid,
|
wUid,
|
||||||
audit_info.ai_asid, audit_info.ai_asid,
|
wGid,
|
||||||
|
wUid,
|
||||||
|
wGid,
|
||||||
|
audit_info.ai_asid,
|
||||||
|
audit_info.ai_asid,
|
||||||
&audit_info.ai_termid),
|
&audit_info.ai_termid),
|
||||||
# else
|
# else
|
||||||
ptAuditToken =
|
ptAuditToken = au_to_subject(wUid,
|
||||||
au_to_subject(wUid, wUid, wGid, wUid, wGid,
|
wUid,
|
||||||
audit_info.ai_asid, audit_info.ai_asid,
|
wGid,
|
||||||
|
wUid,
|
||||||
|
wGid,
|
||||||
|
audit_info.ai_asid,
|
||||||
|
audit_info.ai_asid,
|
||||||
&audit_info.ai_termid),
|
&audit_info.ai_termid),
|
||||||
# endif
|
# endif
|
||||||
(void)au_write(iAuditFile, ptAuditToken);
|
(void)au_write(iAuditFile, ptAuditToken);
|
||||||
@ -299,7 +320,8 @@ Process(void)
|
|||||||
# endif
|
# endif
|
||||||
(void)au_write(iAuditFile, ptAuditToken);
|
(void)au_write(iAuditFile, ptAuditToken);
|
||||||
if(0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) {
|
if(0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) {
|
||||||
fprintf(stderr, "%s: audit write failed: %s", progname,
|
fprintf(stderr, "%s: audit write failed",
|
||||||
|
progname,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,9 +334,7 @@ Process(void)
|
|||||||
#ifdef TIOCNOTTY
|
#ifdef TIOCNOTTY
|
||||||
if (-1 != (i = open("/dev/tty", 2, 0))) {
|
if (-1 != (i = open("/dev/tty", 2, 0))) {
|
||||||
if ( ioctl(i, TIOCNOTTY, (char *)0) )
|
if ( ioctl(i, TIOCNOTTY, (char *)0) )
|
||||||
(void)fprintf(stderr,
|
(void) fprintf(stderr, "%s: ioctl(%d, TIOCNOTTY, (char *)0): %s\n", progname, i, strerror(errno));
|
||||||
"%s: ioctl(%d, TIOCNOTTY, (char *)0): %s\n",
|
|
||||||
progname, i, strerror(errno));
|
|
||||||
(void) close(i);
|
(void) close(i);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -330,46 +350,92 @@ Process(void)
|
|||||||
*/
|
*/
|
||||||
#ifdef HAVE_TCGETPGRP
|
#ifdef HAVE_TCGETPGRP
|
||||||
if (-1 >= (i = tcgetpgrp(0))){
|
if (-1 >= (i = tcgetpgrp(0))){
|
||||||
(void)fprintf(stderr, "%s: tcgetpgrp: %s\n", progname,
|
(void) fprintf(stderr, "%s: tcgetpgrp: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef SETPGRP_VOID
|
||||||
if (-1 != i && setpgrp(0, i) ){
|
if (-1 != i && setpgrp(0, i) ){
|
||||||
(void)fprintf(stderr, "%s: setpgrp: %s, i = %d\n", progname,
|
(void) fprintf(stderr, "%s: setpgrp: %s, i = %d\n", progname, strerror(errno), i);
|
||||||
strerror(errno), i);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TCSETPGRP
|
#ifdef HAVE_TCSETPGRP
|
||||||
if (tcsetpgrp(0, iNewGrp)){
|
if (tcsetpgrp(0, iNewGrp)){
|
||||||
(void)fprintf(stderr, "%s: tcsetpgrp: %s\n", progname,
|
(void) fprintf(stderr, "%s: tcsetpgrp: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef SETPGRP_VOID
|
||||||
if (-1 != iNewGrp && setpgrp(0, iNewGrp)){
|
if (-1 != iNewGrp && setpgrp(0, iNewGrp)){
|
||||||
(void)fprintf(stderr, "%s: setpgrp: %s, iNewGrp = %d\n", progname,
|
(void) fprintf(stderr, "%s: setpgrp: %s, iNewGrp = %d\n", progname, strerror(errno), iNewGrp);
|
||||||
strerror(errno), iNewGrp);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* put the tty in the correct mode
|
/* put the tty in the correct mode
|
||||||
*/
|
*/
|
||||||
|
#ifndef HAVE_TERMIOS_H
|
||||||
|
if (0 != ioctl(0, TIOCGETP, (char *)&n_sty)) {
|
||||||
|
fprintf(stderr, "%s: iotcl: getp: %s\n", progname, strerror(errno));
|
||||||
|
exit(10);
|
||||||
|
}
|
||||||
|
#ifdef O_CBREAK
|
||||||
|
n_sty.sg_flags &= ~(O_CBREAK);
|
||||||
|
n_sty.sg_flags |= (O_CRMOD|O_ECHO);
|
||||||
|
#else
|
||||||
|
n_sty.sg_flags &= ~(CBREAK);
|
||||||
|
n_sty.sg_flags |= (CRMOD|ECHO);
|
||||||
|
#endif
|
||||||
|
n_sty.sg_kill = '\025'; /* ^U */
|
||||||
|
n_sty.sg_erase = '\010'; /* ^H */
|
||||||
|
if (0 != ioctl(0, TIOCSETP, (char *)&n_sty)) {
|
||||||
|
fprintf(stderr, "%s: iotcl: setp: %s\n", progname, strerror(errno));
|
||||||
|
exit(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* stty undef all tty chars
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
|
if (-1 == ioctl(0, TIOCGETC, (char *)&n_tchars)) {
|
||||||
|
fprintf(stderr, "%s: ioctl: getc: %s\n", progname, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
n_tchars.t_intrc = -1;
|
||||||
|
n_tchars.t_quitc = -1;
|
||||||
|
if (-1 == ioctl(0, TIOCSETC, (char *)&n_tchars)) {
|
||||||
|
fprintf(stderr, "%s: ioctl: setc: %s\n", progname, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TIOCGLTC
|
||||||
|
if (-1 == ioctl(0, TIOCGLTC, (char *)&n_ltchars)) {
|
||||||
|
fprintf(stderr, "%s: ioctl: gltc: %s\n", progname, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
n_ltchars.t_suspc = -1;
|
||||||
|
n_ltchars.t_dsuspc = -1;
|
||||||
|
n_ltchars.t_flushc = -1;
|
||||||
|
n_ltchars.t_lnextc = -1;
|
||||||
|
if (-1 == ioctl(0, TIOCSLTC, (char *)&n_ltchars)) {
|
||||||
|
fprintf(stderr, "%s: ioctl: sltc: %s\n", progname, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#else /* not using ioctl, using POSIX or sun stuff */
|
||||||
#ifdef HAVE_TCGETATTR
|
#ifdef HAVE_TCGETATTR
|
||||||
if (0 != tcgetattr(0, &n_tio)) {
|
if (0 != tcgetattr(0, &n_tio)) {
|
||||||
(void)fprintf(stderr, "%s: tcgetattr: %s\n", progname,
|
(void) fprintf(stderr, "%s: tcgetattr: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (0 != ioctl(0, TCGETS, &n_tio)) {
|
if (0 != ioctl(0, TCGETS, &n_tio)) {
|
||||||
(void)fprintf(stderr, "%s: iotcl: TCGETS: %s\n", progname,
|
(void) fprintf(stderr, "%s: iotcl: TCGETS: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
n_tio.c_iflag &= ~(IGNCR|IUCLC);
|
n_tio.c_iflag &= ~(IGNCR|IUCLC);
|
||||||
n_tio.c_iflag |= ICRNL|IXON|IXANY;
|
n_tio.c_iflag |= ICRNL|IXON|IXANY;
|
||||||
n_tio.c_oflag &=
|
n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
|
||||||
~(OLCUC | ONOCR | ONLRET | OFILL | NLDLY | CRDLY | TABDLY | BSDLY);
|
|
||||||
n_tio.c_oflag |= OPOST|ONLCR|TAB3;
|
n_tio.c_oflag |= OPOST|ONLCR|TAB3;
|
||||||
n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
|
n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
|
||||||
n_tio.c_lflag |= ISIG|ICANON|ECHO;
|
n_tio.c_lflag |= ISIG|ICANON|ECHO;
|
||||||
@ -385,12 +451,20 @@ Process(void)
|
|||||||
n_tio.c_cc[VSUSP] = '\032'; /* ^Z */
|
n_tio.c_cc[VSUSP] = '\032'; /* ^Z */
|
||||||
#ifdef HAVE_TCSETATTR
|
#ifdef HAVE_TCSETATTR
|
||||||
if (0 != tcsetattr(0, TCSANOW, &n_tio)) {
|
if (0 != tcsetattr(0, TCSANOW, &n_tio)) {
|
||||||
(void)fprintf(stderr, "%s: tcsetattr: %s\n", progname,
|
(void) fprintf(stderr, "%s: tcsetattr: %s\n", progname, strerror(errno));
|
||||||
strerror(errno));
|
exit(1);
|
||||||
|
/* NOTREACHED */
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#ifndef HAVE_TERMIOS_H
|
||||||
|
if (0 != ioctl(0, TCSETS, &n_tio)) {
|
||||||
|
(void) fprintf(stderr, "%s: ioctl: TCSETS: %s\n", progname, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif /* setup tty */
|
||||||
|
|
||||||
if (fMakeUtmp) {
|
if (fMakeUtmp) {
|
||||||
extern char *ttyname();
|
extern char *ttyname();
|
||||||
@ -412,7 +486,8 @@ Process(void)
|
|||||||
|
|
||||||
#ifndef HAVE_PUTENV
|
#ifndef HAVE_PUTENV
|
||||||
int
|
int
|
||||||
putenv(char *pcAssign)
|
putenv(pcAssign)
|
||||||
|
char *pcAssign;
|
||||||
{
|
{
|
||||||
register char *pcEq;
|
register char *pcEq;
|
||||||
|
|
||||||
@ -427,7 +502,8 @@ putenv(char *pcAssign)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
addgroup(char *pcGrp)
|
addgroup(pcGrp)
|
||||||
|
char *pcGrp;
|
||||||
{
|
{
|
||||||
struct group *grp;
|
struct group *grp;
|
||||||
|
|
||||||
@ -437,9 +513,7 @@ addgroup(char *pcGrp)
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if (iGrps >= NGROUPS_MAX) {
|
if (iGrps >= NGROUPS_MAX) {
|
||||||
(void)fprintf(stderr,
|
(void) fprintf(stderr, "%s: Too many groups specified with \"%s\".\n", progname, pcGrp);
|
||||||
"%s: Too many groups specified with \"%s\".\n",
|
|
||||||
progname, pcGrp);
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
awGrps[iGrps++] = grp->gr_gid;
|
awGrps[iGrps++] = grp->gr_gid;
|
||||||
@ -450,13 +524,15 @@ addgroup(char *pcGrp)
|
|||||||
/* install a utmp entry to show the use we know is here is here (ksb)
|
/* install a utmp entry to show the use we know is here is here (ksb)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
make_utmp(char *pclogin, char *pctty)
|
make_utmp(pclogin, pctty)
|
||||||
|
char *pclogin;
|
||||||
|
char *pctty;
|
||||||
{
|
{
|
||||||
register int iFound, iPos;
|
register int iFound, iPos;
|
||||||
register int fdUtmp;
|
register int fdUtmp;
|
||||||
register char *pcDev;
|
register char *pcDev;
|
||||||
register struct utmp *up;
|
register struct utmp *up;
|
||||||
auto struct utmp utmp;
|
auto struct utmp outmp, utmp;
|
||||||
|
|
||||||
|
|
||||||
if ((char *)0 == pctty) {
|
if ((char *)0 == pctty) {
|
||||||
@ -559,7 +635,7 @@ make_utmp(char *pclogin, char *pctty)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage()
|
||||||
{
|
{
|
||||||
char *u_pch;
|
char *u_pch;
|
||||||
int u_loop;
|
int u_loop;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# mkcmd parser for autologin program
|
# mkcmd parser for autologin program
|
||||||
%%
|
%%
|
||||||
|
static char *rcsid =
|
||||||
|
"$Id: autologin.m,v 1.1 2003/11/04 02:36:24 bryan Exp $";
|
||||||
%%
|
%%
|
||||||
|
|
||||||
integer variable "iErrs" {
|
integer variable "iErrs" {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
.\" $Id: autologin.man,v 1.2 2004/03/23 18:32:06 bryan Exp $
|
||||||
.TH AUTOLOGIN 8L PUCC
|
.TH AUTOLOGIN 8L PUCC
|
||||||
.SH NAME
|
.SH NAME
|
||||||
autologin \- create an automatic login session from /etc/inittab
|
autologin \- create an automatic login session from /etc/inittab
|
||||||
|
@ -20,7 +20,9 @@ static int
|
|||||||
* does +arg if you give a last argument of "+", else give (char *)0
|
* does +arg if you give a last argument of "+", else give (char *)0
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
getopt(int nargc, char **nargv, char *ostr)
|
getopt(nargc, nargv, ostr)
|
||||||
|
int nargc;
|
||||||
|
char **nargv, *ostr;
|
||||||
{
|
{
|
||||||
register char *oli; /* option letter list index */
|
register char *oli; /* option letter list index */
|
||||||
static char EMSG[] = ""; /* just a null place */
|
static char EMSG[] = ""; /* just a null place */
|
||||||
@ -41,17 +43,14 @@ getopt(int nargc, char **nargv, char *ostr)
|
|||||||
++optind;
|
++optind;
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
}
|
} /* option letter okay? */
|
||||||
/* option letter okay? */
|
|
||||||
/* if we find the letter, (not a `:')
|
/* if we find the letter, (not a `:')
|
||||||
* or a digit to match a # in the list
|
* or a digit to match a # in the list
|
||||||
*/
|
*/
|
||||||
if ((optopt = *place++) == ':' ||
|
if ((optopt = *place++) == ':' ||
|
||||||
((char *)0 == (oli = strchr(ostr,optopt)) &&
|
((char *)0 == (oli = strchr(ostr,optopt)) &&
|
||||||
(!(isdigit(optopt) || '-' == optopt) ||
|
(!(isdigit(optopt)||'-'==optopt) || (char *)0 == (oli = strchr(ostr, '#'))))) {
|
||||||
(char *)0 == (oli = strchr(ostr, '#'))))) {
|
if(!*place) ++optind;
|
||||||
if (!*place)
|
|
||||||
++optind;
|
|
||||||
return('?');
|
return('?');
|
||||||
}
|
}
|
||||||
if ('#' == *oli) { /* accept as -digits */
|
if ('#' == *oli) { /* accept as -digits */
|
||||||
@ -81,13 +80,14 @@ getopt(int nargc, char **nargv, char *ostr)
|
|||||||
#endif /* ! HAVE_GETOPT */
|
#endif /* ! HAVE_GETOPT */
|
||||||
|
|
||||||
char
|
char
|
||||||
*progname = "", *au_terse[] = {
|
*progname = "$Id: main.c,v 1.1 2003/11/04 02:36:24 bryan Exp $",
|
||||||
|
*au_terse[] = {
|
||||||
" [-u] [-c cmd] [-e env=value] [-g group] [-l login] [-t tty]",
|
" [-u] [-c cmd] [-e env=value] [-g group] [-l login] [-t tty]",
|
||||||
" -h",
|
" -h",
|
||||||
" -V",
|
" -V",
|
||||||
(char *)0
|
(char *)0
|
||||||
}, *u_help[] = {
|
},
|
||||||
|
*u_help[] = {
|
||||||
"c cmd command to run",
|
"c cmd command to run",
|
||||||
"e env=value environment variable to set",
|
"e env=value environment variable to set",
|
||||||
"g group initial group",
|
"g group initial group",
|
||||||
@ -95,24 +95,35 @@ char
|
|||||||
"l login login name",
|
"l login login name",
|
||||||
"t tty attach to this terminal",
|
"t tty attach to this terminal",
|
||||||
"u do no make utmp entry",
|
"u do no make utmp entry",
|
||||||
"V show version information", (char *)0
|
"V show version information",
|
||||||
}, *pcCommand = (char *)0, *pcGroup = (char *)0, *pcLogin =
|
(char *)0
|
||||||
(char *)0, *pcTty = (char *)0;
|
},
|
||||||
|
*pcCommand = (char *)0,
|
||||||
|
*pcGroup = (char *)0,
|
||||||
|
*pcLogin = (char *)0,
|
||||||
|
*pcTty = (char *)0;
|
||||||
int
|
int
|
||||||
fMakeUtmp = 1, iErrs = 0;
|
fMakeUtmp = 1,
|
||||||
|
iErrs = 0;
|
||||||
|
|
||||||
#ifndef u_terse
|
#ifndef u_terse
|
||||||
#define u_terse (au_terse[0])
|
#define u_terse (au_terse[0])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static char *rcsid =
|
||||||
|
"$Id: main.c,v 1.1 2003/11/04 02:36:24 bryan Exp $";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* parser
|
* parser
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(argc, argv)
|
||||||
|
int argc;
|
||||||
|
char **argv;
|
||||||
{
|
{
|
||||||
static char
|
static char
|
||||||
sbOpt[] = "c:e:g:hl:t:uV", *u_pch = (char *)0;
|
sbOpt[] = "c:e:g:hl:t:uV",
|
||||||
|
*u_pch = (char *)0;
|
||||||
static int
|
static int
|
||||||
u_loop = 0;
|
u_loop = 0;
|
||||||
register int u_curopt;
|
register int u_curopt;
|
||||||
@ -126,21 +137,17 @@ main(int argc, char **argv)
|
|||||||
while (EOF != (u_curopt = getopt(argc, argv, sbOpt))) {
|
while (EOF != (u_curopt = getopt(argc, argv, sbOpt))) {
|
||||||
switch (u_curopt) {
|
switch (u_curopt) {
|
||||||
case '*':
|
case '*':
|
||||||
fprintf(stderr, "%s: option `-%c\' needs a parameter\n",
|
fprintf(stderr, "%s: option `-%c\' needs a parameter\n", progname, optopt);
|
||||||
progname, optopt);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
case '?':
|
case '?':
|
||||||
fprintf(stderr,
|
fprintf(stderr, "%s: unknown option `-%c\', use `-h\' for help\n", progname, optopt);
|
||||||
"%s: unknown option `-%c\', use `-h\' for help\n",
|
|
||||||
progname, optopt);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
case 'c':
|
case 'c':
|
||||||
pcCommand = optarg;
|
pcCommand = optarg;
|
||||||
continue;
|
continue;
|
||||||
case 'e':
|
case 'e':
|
||||||
if (putenv(optarg) != 0) {
|
if (putenv(optarg) != 0) {
|
||||||
(void)fprintf(stderr, "%s: putenv(\"%s\"): failed\n",
|
(void) fprintf(stderr, "%s: putenv(\"%s\"): failed\n", progname, optarg);
|
||||||
progname, optarg);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -148,17 +155,14 @@ main(int argc, char **argv)
|
|||||||
pcGroup = optarg;
|
pcGroup = optarg;
|
||||||
continue;
|
continue;
|
||||||
case 'h':
|
case 'h':
|
||||||
for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]);
|
for (u_loop = 0; (char *)0 != (u_pch = au_terse[u_loop]); ++u_loop) {
|
||||||
++u_loop) {
|
|
||||||
if ('\000' == *u_pch) {
|
if ('\000' == *u_pch) {
|
||||||
fprintf(stdout, "%s: with no parameters\n",
|
fprintf(stdout, "%s: with no parameters\n", progname);
|
||||||
progname);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fprintf(stdout, "%s: usage%s\n", progname, u_pch);
|
fprintf(stdout, "%s: usage%s\n", progname, u_pch);
|
||||||
}
|
}
|
||||||
for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]);
|
for (u_loop = 0; (char *)0 != (u_pch = u_help[u_loop]); ++u_loop) {
|
||||||
++u_loop) {
|
|
||||||
fprintf(stdout, "%s\n", u_pch);
|
fprintf(stdout, "%s\n", u_pch);
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -172,7 +176,7 @@ main(int argc, char **argv)
|
|||||||
fMakeUtmp = 0;
|
fMakeUtmp = 0;
|
||||||
continue;
|
continue;
|
||||||
case 'V':
|
case 'V':
|
||||||
printf("%s\n", progname);
|
printf("%s: %s\n", progname, rcsid);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -12,3 +12,4 @@ extern char *pcCommand, *pcGroup, *pcLogin, *pcTty;
|
|||||||
/* from std_help.m */
|
/* from std_help.m */
|
||||||
/* from std_version.m */
|
/* from std_version.m */
|
||||||
/* from autologin.m */
|
/* from autologin.m */
|
||||||
|
|
||||||
|
53
compat.h
53
compat.h
@ -8,7 +8,9 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
#endif
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -35,17 +37,6 @@
|
|||||||
# define DEFESC 'c'
|
# define DEFESC 'c'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set the default length of the replay functions
|
|
||||||
* DEFREPLAY for 'r'
|
|
||||||
* DEFPLAYBACK for 'p'
|
|
||||||
*/
|
|
||||||
#if !defined(DEFREPLAY)
|
|
||||||
# define DEFREPLAY 20
|
|
||||||
#endif
|
|
||||||
#if !defined(PLAYBACK)
|
|
||||||
# define DEFPLAYBACK 60
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* For legacy compile-time setting of the port...
|
/* For legacy compile-time setting of the port...
|
||||||
*/
|
*/
|
||||||
#if ! defined(DEFPORT)
|
#if ! defined(DEFPORT)
|
||||||
@ -103,18 +94,6 @@ typedef long fd_set;
|
|||||||
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
#ifndef TAB3
|
|
||||||
# ifdef OXTABS
|
|
||||||
# define TAB3 OXTABS
|
|
||||||
# else
|
|
||||||
# ifdef XTABS
|
|
||||||
# define TAB3 XTABS
|
|
||||||
# else
|
|
||||||
# define TAB3 0
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STROPTS_H
|
#ifdef HAVE_STROPTS_H
|
||||||
# include <stropts.h>
|
# include <stropts.h>
|
||||||
#endif
|
#endif
|
||||||
@ -315,6 +294,14 @@ typedef int socklen_t;
|
|||||||
#define SEEK_SET L_SET
|
#define SEEK_SET L_SET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PARAMS
|
||||||
|
# if PROTOTYPES
|
||||||
|
# define PARAMS(protos) protos
|
||||||
|
# else /* no PROTOTYPES */
|
||||||
|
# define PARAMS(protos) ()
|
||||||
|
# endif /* no PROTOTYPES */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* setup a conditional debugging line */
|
/* setup a conditional debugging line */
|
||||||
#ifndef CONDDEBUG
|
#ifndef CONDDEBUG
|
||||||
#define CONDDEBUG(line) if (fDebug) {debugFileName=__FILE__; debugLineNo=__LINE__; Debug line;}
|
#define CONDDEBUG(line) if (fDebug) {debugFileName=__FILE__; debugLineNo=__LINE__; Debug line;}
|
||||||
@ -323,23 +310,3 @@ typedef int socklen_t;
|
|||||||
#if HAVE_DMALLOC
|
#if HAVE_DMALLOC
|
||||||
#include <dmalloc.h>
|
#include <dmalloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_FREEIPMI
|
|
||||||
# include <ipmiconsole.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef INADDR_STYPE
|
|
||||||
# if USE_IPV6
|
|
||||||
# define INADDR_STYPE struct sockaddr_storage
|
|
||||||
# else
|
|
||||||
# define INADDR_STYPE struct in_addr
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SOCKADDR_STYPE
|
|
||||||
# if USE_IPV6
|
|
||||||
# define SOCKADDR_STYPE struct sockaddr_storage
|
|
||||||
# else
|
|
||||||
# define SOCKADDR_STYPE struct sockaddr_in
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
1459
config.guess
vendored
Executable file
1459
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
365
config.h.in
Normal file
365
config.h.in
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Client config file path */
|
||||||
|
#undef CLIENTCONFIGFILE
|
||||||
|
|
||||||
|
/* Config file path */
|
||||||
|
#undef CONFIGFILE
|
||||||
|
|
||||||
|
/* ./configure invocation */
|
||||||
|
#undef CONFIGINVOCATION
|
||||||
|
|
||||||
|
/* TCP connection timeout */
|
||||||
|
#undef CONNECTTIMEOUT
|
||||||
|
|
||||||
|
/* Base socket used for secondary channel */
|
||||||
|
#undef DEFBASEPORT
|
||||||
|
|
||||||
|
/* Socket used to communicate */
|
||||||
|
#undef DEFPORT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bigcrypt' function. */
|
||||||
|
#undef HAVE_BIGCRYPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <bsm/audit.h> header file. */
|
||||||
|
#undef HAVE_BSM_AUDIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crypt.h> header file. */
|
||||||
|
#undef HAVE_CRYPT_H
|
||||||
|
|
||||||
|
/* have dmalloc support */
|
||||||
|
#undef HAVE_DMALLOC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getaudit' function. */
|
||||||
|
#undef HAVE_GETAUDIT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getaudit_addr' function. */
|
||||||
|
#undef HAVE_GETAUDIT_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getdtablesize' function. */
|
||||||
|
#undef HAVE_GETDTABLESIZE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getlogin' function. */
|
||||||
|
#undef HAVE_GETLOGIN
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getopt' function. */
|
||||||
|
#undef HAVE_GETOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <getopt.h> header file. */
|
||||||
|
#undef HAVE_GETOPT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getprpwnam' function. */
|
||||||
|
#undef HAVE_GETPRPWNAM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getrlimit' function. */
|
||||||
|
#undef HAVE_GETRLIMIT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getsid' function. */
|
||||||
|
#undef HAVE_GETSID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getspnam' function. */
|
||||||
|
#undef HAVE_GETSPNAM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getuserattr' function. */
|
||||||
|
#undef HAVE_GETUSERATTR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getutent' function. */
|
||||||
|
#undef HAVE_GETUTENT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `grantpt' function. */
|
||||||
|
#undef HAVE_GRANTPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <hpsecurity.h> header file. */
|
||||||
|
#undef HAVE_HPSECURITY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `inet_aton' function. */
|
||||||
|
#undef HAVE_INET_ATON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Defined if in_addr_t exists */
|
||||||
|
#undef HAVE_IN_ADDR_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `iscomsec' function. */
|
||||||
|
#undef HAVE_ISCOMSEC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bsm' library (-lbsm). */
|
||||||
|
#undef HAVE_LIBBSM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sec' library (-lsec). */
|
||||||
|
#undef HAVE_LIBSEC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `util' library (-lutil). */
|
||||||
|
#undef HAVE_LIBUTIL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <libutil.h> header file. */
|
||||||
|
#undef HAVE_LIBUTIL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `xnet' library (-lxnet). */
|
||||||
|
#undef HAVE_LIBXNET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memcmp' function. */
|
||||||
|
#undef HAVE_MEMCMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memcpy' function. */
|
||||||
|
#undef HAVE_MEMCPY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memmove' function. */
|
||||||
|
#undef HAVE_MEMMOVE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `openpty' function. */
|
||||||
|
#undef HAVE_OPENPTY
|
||||||
|
|
||||||
|
/* have openssl support */
|
||||||
|
#undef HAVE_OPENSSL
|
||||||
|
|
||||||
|
/* have PAM support */
|
||||||
|
#undef HAVE_PAM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <prot.h> header file. */
|
||||||
|
#undef HAVE_PROT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ptsname' function. */
|
||||||
|
#undef HAVE_PTSNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <pty.h> header file. */
|
||||||
|
#undef HAVE_PTY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `putenv' function. */
|
||||||
|
#undef HAVE_PUTENV
|
||||||
|
|
||||||
|
/* Defined if sa_len member exists in struct sockaddr */
|
||||||
|
#undef HAVE_SA_LEN
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setgroups' function. */
|
||||||
|
#undef HAVE_SETGROUPS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setlinebuf' function. */
|
||||||
|
#undef HAVE_SETLINEBUF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setpgrp' function. */
|
||||||
|
#undef HAVE_SETPGRP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setproctitle' function. */
|
||||||
|
#undef HAVE_SETPROCTITLE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setsid' function. */
|
||||||
|
#undef HAVE_SETSID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setsockopt' function. */
|
||||||
|
#undef HAVE_SETSOCKOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setttyent' function. */
|
||||||
|
#undef HAVE_SETTTYENT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `setvbuf' function. */
|
||||||
|
#undef HAVE_SETVBUF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <shadow.h> header file. */
|
||||||
|
#undef HAVE_SHADOW_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sigaction' function. */
|
||||||
|
#undef HAVE_SIGACTION
|
||||||
|
|
||||||
|
/* Defined if socklen_t exists */
|
||||||
|
#undef HAVE_SOCKLEN_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define if strcasecmp is available */
|
||||||
|
#undef HAVE_STRCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strerror' function. */
|
||||||
|
#undef HAVE_STRERROR
|
||||||
|
|
||||||
|
/* Define if stricmp is available */
|
||||||
|
#undef HAVE_STRICMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stropts.h> header file. */
|
||||||
|
#undef HAVE_STROPTS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `sysconf' function. */
|
||||||
|
#undef HAVE_SYSCONF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sysexits.h> header file. */
|
||||||
|
#undef HAVE_SYSEXITS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/audit.h> header file. */
|
||||||
|
#undef HAVE_SYS_AUDIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl_compat.h> header file. */
|
||||||
|
#undef HAVE_SYS_IOCTL_COMPAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#undef HAVE_SYS_IOCTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/proc.h> header file. */
|
||||||
|
#undef HAVE_SYS_PROC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||||
|
#undef HAVE_SYS_RESOURCE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#undef HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||||
|
#undef HAVE_SYS_SOCKIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#undef HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ttold.h> header file. */
|
||||||
|
#undef HAVE_SYS_TTOLD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#undef HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/vlimit.h> header file. */
|
||||||
|
#undef HAVE_SYS_VLIMIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
|
#undef HAVE_SYS_WAIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tcgetattr' function. */
|
||||||
|
#undef HAVE_TCGETATTR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tcgetpgrp' function. */
|
||||||
|
#undef HAVE_TCGETPGRP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tcsendbreak' function. */
|
||||||
|
#undef HAVE_TCSENDBREAK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tcsetattr' function. */
|
||||||
|
#undef HAVE_TCSETATTR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `tcsetpgrp' function. */
|
||||||
|
#undef HAVE_TCSETPGRP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ttyent.h> header file. */
|
||||||
|
#undef HAVE_TTYENT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <types.h> header file. */
|
||||||
|
#undef HAVE_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `unlockpt' function. */
|
||||||
|
#undef HAVE_UNLOCKPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <usersec.h> header file. */
|
||||||
|
#undef HAVE_USERSEC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <util.h> header file. */
|
||||||
|
#undef HAVE_UTIL_H
|
||||||
|
|
||||||
|
/* Logfile path */
|
||||||
|
#undef LOGFILEPATH
|
||||||
|
|
||||||
|
/* Hostname of console server */
|
||||||
|
#undef MASTERHOST
|
||||||
|
|
||||||
|
/* Number of consoles per child process */
|
||||||
|
#undef MAXMEMB
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Password file path */
|
||||||
|
#undef PASSWDFILE
|
||||||
|
|
||||||
|
/* pidfile to write to */
|
||||||
|
#undef PIDFILE
|
||||||
|
|
||||||
|
/* Define to 1 if the C compiler supports function prototypes. */
|
||||||
|
#undef PROTOTYPES
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#undef RETSIGTYPE
|
||||||
|
|
||||||
|
/* Define to 1 if the `setpgrp' function takes no argument. */
|
||||||
|
#undef SETPGRP_VOID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Defined if we trust reverse DNS */
|
||||||
|
#undef TRUST_REVERSE_DNS
|
||||||
|
|
||||||
|
/* Directory for Unix domain sockets */
|
||||||
|
#undef UDSDIR
|
||||||
|
|
||||||
|
/* Defined if we produce extended messages */
|
||||||
|
#undef USE_EXTENDED_MESSAGES
|
||||||
|
|
||||||
|
/* use tcp_wrappers libwrap */
|
||||||
|
#undef USE_LIBWRAP
|
||||||
|
|
||||||
|
/* Defined if we use Unix domain sockets */
|
||||||
|
#undef USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
|
||||||
|
/* Define to 1 if on AIX 3.
|
||||||
|
System headers sometimes define this.
|
||||||
|
We just want to avoid a redefinition error message. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# undef _ALL_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||||
|
#undef __PROTOTYPES
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
#undef mode_t
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
#undef pid_t
|
||||||
|
|
||||||
|
/* Define if <signal.h> does not define sig_atomic_t */
|
||||||
|
#undef sig_atomic_t
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
1549
config.sub
vendored
Executable file
1549
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@ -14,27 +14,20 @@ AH_TEMPLATE([USE_LIBWRAP], [use tcp_wrappers libwrap])
|
|||||||
dnl AH_TEMPLATE([HAVE_POSIX_REGCOMP], [have POSIX regcomp])
|
dnl AH_TEMPLATE([HAVE_POSIX_REGCOMP], [have POSIX regcomp])
|
||||||
AH_TEMPLATE([HAVE_PAM], [have PAM support])
|
AH_TEMPLATE([HAVE_PAM], [have PAM support])
|
||||||
AH_TEMPLATE([HAVE_OPENSSL], [have openssl support])
|
AH_TEMPLATE([HAVE_OPENSSL], [have openssl support])
|
||||||
AH_TEMPLATE([HAVE_GSSAPI], [have gss-api support])
|
|
||||||
AH_TEMPLATE([HAVE_FREEIPMI], [have freeipmi support])
|
|
||||||
AH_TEMPLATE([STRIP_REALM], [retry username without @REALM with gss-api authentication])
|
|
||||||
AH_TEMPLATE([HAVE_DMALLOC], [have dmalloc support])
|
AH_TEMPLATE([HAVE_DMALLOC], [have dmalloc support])
|
||||||
AH_TEMPLATE([HAVE_SA_LEN],[Defined if sa_len member exists in struct sockaddr])
|
AH_TEMPLATE([HAVE_SA_LEN],[Defined if sa_len member exists in struct sockaddr])
|
||||||
AH_TEMPLATE([TRUST_REVERSE_DNS],[Defined if we trust reverse DNS])
|
AH_TEMPLATE([TRUST_REVERSE_DNS],[Defined if we trust reverse DNS])
|
||||||
AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages])
|
AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages])
|
||||||
AH_TEMPLATE([USE_UNIX_DOMAIN_SOCKETS],[Defined if we use Unix domain sockets])
|
AH_TEMPLATE([USE_UNIX_DOMAIN_SOCKETS],[Defined if we use Unix domain sockets])
|
||||||
AH_TEMPLATE([USE_IPV6], [Defined if building with IPv6 support])
|
|
||||||
AH_TEMPLATE([UDSDIR], [Directory for Unix domain sockets])
|
AH_TEMPLATE([UDSDIR], [Directory for Unix domain sockets])
|
||||||
AH_TEMPLATE([FOR_CYCLADES_TS], [Defined if building for a Cyclades TS])
|
|
||||||
AH_TEMPLATE([REQ_SERVER_CERT], [Defined if client requires server SSL certificate])
|
|
||||||
AH_TEMPLATE([TRUST_UDS_CRED], [Defined if we trust credentials from UDS client])
|
|
||||||
|
|
||||||
dnl ### Normal initialization. ######################################
|
dnl ### Normal initialization. ######################################
|
||||||
AC_INIT([conserver],m4_esyscmd_s([./gen-version number]))
|
AC_INIT
|
||||||
AC_PREREQ(2.69)
|
AC_PREREQ(2.59)
|
||||||
AC_CONFIG_SRCDIR([conserver/main.c])
|
AC_CONFIG_SRCDIR([conserver/main.c])
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(CONFIGINVOCATION, "$0 $*")
|
AC_DEFINE_UNQUOTED(CONFIGINVOCATION, "$0 $@")
|
||||||
|
|
||||||
dnl ### Set some option defaults. ###################################
|
dnl ### Set some option defaults. ###################################
|
||||||
if test -z "$CFLAGS"; then
|
if test -z "$CFLAGS"; then
|
||||||
@ -43,9 +36,6 @@ fi
|
|||||||
MKDIR="mkdir -p -m 755"
|
MKDIR="mkdir -p -m 755"
|
||||||
AC_SUBST(MKDIR)
|
AC_SUBST(MKDIR)
|
||||||
|
|
||||||
AC_SUBST(CONSERVER_VERSION, m4_esyscmd_s([./gen-version number]))
|
|
||||||
AC_SUBST(CONSERVER_DATE, m4_esyscmd_s([./gen-version date]))
|
|
||||||
|
|
||||||
|
|
||||||
dnl ### Custom settings. ############################################
|
dnl ### Custom settings. ############################################
|
||||||
dnl AC_MSG_CHECKING(whether to allow 64bit compilation)
|
dnl AC_MSG_CHECKING(whether to allow 64bit compilation)
|
||||||
@ -263,6 +253,35 @@ AC_ARG_WITH(extmsgs,
|
|||||||
;;
|
;;
|
||||||
esac],[AC_MSG_RESULT(no)])
|
esac],[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to use Unix domain sockets)
|
||||||
|
cons_with_uds="NO"
|
||||||
|
AC_ARG_WITH(uds,
|
||||||
|
AS_HELP_STRING([--with-uds@<:@=DIR@:>@ ],
|
||||||
|
[Use Unix domain sockets for client/server communication @<:@/tmp/conserver@:>@]),
|
||||||
|
[case "$withval" in
|
||||||
|
yes)
|
||||||
|
AC_DEFINE_UNQUOTED(UDSDIR, "/tmp/conserver")
|
||||||
|
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
||||||
|
AC_MSG_RESULT([/tmp/conserver])
|
||||||
|
cons_with_uds="YES"
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_DEFINE_UNQUOTED(UDSDIR, "$withval")
|
||||||
|
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
||||||
|
AC_MSG_RESULT('$withval')
|
||||||
|
cons_with_uds="YES"
|
||||||
|
if expr "$withval" : '/' >/dev/null 2>&1; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** WARNING *** you may have better success using a fully-qualified path"
|
||||||
|
echo "*** WARNING *** instead of '$withval'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac],[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
use_dash_r=no
|
use_dash_r=no
|
||||||
AC_MSG_CHECKING(whether to use -R paths as well as -L)
|
AC_MSG_CHECKING(whether to use -R paths as well as -L)
|
||||||
AC_ARG_WITH(rpath,
|
AC_ARG_WITH(rpath,
|
||||||
@ -278,20 +297,6 @@ AC_ARG_WITH(rpath,
|
|||||||
esac],
|
esac],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether we are building for a Cyclades TS)
|
|
||||||
AC_ARG_WITH(cycladests,
|
|
||||||
AS_HELP_STRING([--with-cycladests],[(deprecated - noop) Build for a Cyclades TS]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE(FOR_CYCLADES_TS)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
esac],[AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
|
|
||||||
dnl ### Check for compiler et al. ###################################
|
dnl ### Check for compiler et al. ###################################
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
@ -301,6 +306,7 @@ AC_PROG_MAKE_SET
|
|||||||
dnl ### Compiler characteristics. ##################################
|
dnl ### Compiler characteristics. ##################################
|
||||||
AC_AIX
|
AC_AIX
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
|
AC_C_PROTOTYPES
|
||||||
|
|
||||||
dnl AC_CHECK_SIZEOF(long)
|
dnl AC_CHECK_SIZEOF(long)
|
||||||
dnl if test "$ac_cv_sizeof_long" -gt 4; then
|
dnl if test "$ac_cv_sizeof_long" -gt 4; then
|
||||||
@ -320,7 +326,7 @@ if test "$ac_cv_sys_posix_termios" != "yes"; then
|
|||||||
AC_MSG_ERROR([POSIX termios interface required])
|
AC_MSG_ERROR([POSIX termios interface required])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADERS(unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h sys/uio.h sys/ioctl_compat.h usersec.h sys/select.h stropts.h sys/audit.h shadow.h sys/time.h crypt.h sysexits.h types.h sys/sockio.h sys/param.h sys/un.h)
|
AC_CHECK_HEADERS(unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h sys/uio.h sys/ioctl_compat.h usersec.h sys/select.h stropts.h sys/audit.h shadow.h sys/time.h crypt.h sysexits.h types.h sys/sockio.h sys/param.h)
|
||||||
dnl sys/proc.h needs sys/param.h on openbsd, apparently
|
dnl sys/proc.h needs sys/param.h on openbsd, apparently
|
||||||
AC_CHECK_HEADERS(sys/proc.h, [], [],
|
AC_CHECK_HEADERS(sys/proc.h, [], [],
|
||||||
[#if HAVE_SYS_PARAM_H
|
[#if HAVE_SYS_PARAM_H
|
||||||
@ -333,7 +339,6 @@ AC_TYPE_MODE_T
|
|||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_TYPE_UID_T
|
|
||||||
|
|
||||||
AC_CHECK_TYPE([sig_atomic_t],,
|
AC_CHECK_TYPE([sig_atomic_t],,
|
||||||
AC_DEFINE(sig_atomic_t, volatile int,
|
AC_DEFINE(sig_atomic_t, volatile int,
|
||||||
@ -377,97 +382,6 @@ AC_SEARCH_LIBS(crypt,crypt)
|
|||||||
AC_SUBST(CONSLIBS)
|
AC_SUBST(CONSLIBS)
|
||||||
AC_SUBST(CONSCPPFLAGS)
|
AC_SUBST(CONSCPPFLAGS)
|
||||||
AC_SUBST(CONSLDFLAGS)
|
AC_SUBST(CONSLDFLAGS)
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to use Unix domain sockets)
|
|
||||||
cons_with_uds="NO"
|
|
||||||
AC_ARG_WITH(uds,
|
|
||||||
AS_HELP_STRING([--with-uds@<:@=DIR@:>@ ],
|
|
||||||
[Use Unix domain sockets for client/server communication @<:@/tmp/conserver@:>@]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE_UNQUOTED(UDSDIR, "/tmp/conserver")
|
|
||||||
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
|
||||||
AC_MSG_RESULT([/tmp/conserver])
|
|
||||||
cons_with_uds="YES"
|
|
||||||
;;
|
|
||||||
no)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_DEFINE_UNQUOTED(UDSDIR, "$withval")
|
|
||||||
AC_DEFINE(USE_UNIX_DOMAIN_SOCKETS)
|
|
||||||
AC_MSG_RESULT('$withval')
|
|
||||||
cons_with_uds="YES"
|
|
||||||
if expr "$withval" : '/' >/dev/null 2>&1; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo "*** WARNING *** you may have better success using a fully-qualified path"
|
|
||||||
echo "*** WARNING *** instead of '$withval'"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test $cons_with_uds = YES; then
|
|
||||||
AC_MSG_CHECKING(whether to trust UDS credentials)
|
|
||||||
AC_ARG_WITH(trust-uds-cred,
|
|
||||||
AS_HELP_STRING([--with-trust-uds-cred],[Trust UDS credentials obtained via socket]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>],
|
|
||||||
[
|
|
||||||
struct sockpeercred u;
|
|
||||||
u.uid = 0;
|
|
||||||
#if !defined(SO_PEERCRED)
|
|
||||||
#error "no SO_PEERCRED defined"
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(UDS_CRED_STYPE, sockpeercred, [Defined to UDS credential structure name])
|
|
||||||
AC_DEFINE(UDS_CRED_UID, uid, [Defined to UDS credential structure uid field])
|
|
||||||
AC_DEFINE(UDS_CRED_SO, SO_PEERCRED, [Defined to UDS credential socket option])
|
|
||||||
AC_DEFINE(TRUST_UDS_CRED)],
|
|
||||||
[
|
|
||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>],
|
|
||||||
[
|
|
||||||
struct ucred u;
|
|
||||||
u.euid = 0;
|
|
||||||
#if !defined(SO_PEERCRED)
|
|
||||||
#error "no SO_PEERCRED defined"
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(UDS_CRED_STYPE, ucred, [Defined to UDS credential structure name])
|
|
||||||
AC_DEFINE(UDS_CRED_UID, uid, [Defined to UDS credential structure uid field])
|
|
||||||
AC_DEFINE(UDS_CRED_SO, SO_PEERCRED, [Defined to UDS credential socket option])
|
|
||||||
AC_DEFINE(TRUST_UDS_CRED)],
|
|
||||||
[
|
|
||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>],
|
|
||||||
[
|
|
||||||
struct peercred_struct u;
|
|
||||||
u.euid = 0;
|
|
||||||
#if !defined(SO_PEERID)
|
|
||||||
#error "no SO_PEERID defined"
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(UDS_CRED_STYPE, peercred_struct, [Defined to UDS credential structure name])
|
|
||||||
AC_DEFINE(UDS_CRED_UID, euid, [Defined to UDS credential structure uid field])
|
|
||||||
AC_DEFINE(UDS_CRED_SO, SO_PEERID, [Defined to UDS credential socket option])
|
|
||||||
AC_DEFINE(TRUST_UDS_CRED)],
|
|
||||||
[AC_MSG_RESULT(no)]),
|
|
||||||
])
|
|
||||||
])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
esac],[AC_MSG_RESULT(no)])
|
|
||||||
fi
|
|
||||||
],[AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
cons_with_libwrap="NO"
|
cons_with_libwrap="NO"
|
||||||
AC_ARG_WITH(libwrap,
|
AC_ARG_WITH(libwrap,
|
||||||
AS_HELP_STRING([--with-libwrap@<:@=PATH@:>@],
|
AS_HELP_STRING([--with-libwrap@<:@=PATH@:>@],
|
||||||
@ -554,7 +468,7 @@ AC_ARG_WITH(openssl,
|
|||||||
[LIBS="$LIBS -lssl -lcrypto"
|
[LIBS="$LIBS -lssl -lcrypto"
|
||||||
AC_MSG_CHECKING(for openssl libraries -lssl and -lcrypto)
|
AC_MSG_CHECKING(for openssl libraries -lssl and -lcrypto)
|
||||||
AC_TRY_LINK([#include <openssl/ssl.h>
|
AC_TRY_LINK([#include <openssl/ssl.h>
|
||||||
],[SSL_CTX_new(NULL)],
|
],[SSL_library_init()],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
cons_with_openssl="YES"
|
cons_with_openssl="YES"
|
||||||
AC_DEFINE(HAVE_OPENSSL)
|
AC_DEFINE(HAVE_OPENSSL)
|
||||||
@ -566,154 +480,6 @@ AC_ARG_WITH(openssl,
|
|||||||
CPPFLAGS="$oCPPFLAGS"
|
CPPFLAGS="$oCPPFLAGS"
|
||||||
LDFLAGS="$oLDFLAGS"
|
LDFLAGS="$oLDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to require server cert)
|
|
||||||
AC_ARG_WITH(req-server-cert,
|
|
||||||
AS_HELP_STRING([--with-req-server-cert],[Require server SSL certificate by client]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE(REQ_SERVER_CERT)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
esac],[AC_MSG_RESULT(no)])
|
|
||||||
fi]
|
|
||||||
)
|
|
||||||
|
|
||||||
cons_with_gssapi="NO"
|
|
||||||
cons_strip_realm="NO"
|
|
||||||
AC_ARG_WITH(gssapi,
|
|
||||||
AS_HELP_STRING([--with-gssapi@<:@=PATH@:>@],
|
|
||||||
[Compile in GSS-API support]),
|
|
||||||
[if test "$withval" != "no"; then
|
|
||||||
if test "$withval" != "yes"; then
|
|
||||||
GSSAPICPPFLAGS="-I$withval/include"
|
|
||||||
if test "$use_dash_r" != "yes"; then
|
|
||||||
GSSAPILDFLAGS="-L$withval/lib"
|
|
||||||
else
|
|
||||||
GSSAPILDFLAGS="-L$withval/lib -R$withval/lib"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
GSSAPICPPFLAGS=""
|
|
||||||
GSSAPILDFLAGS=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
oCPPFLAGS="$CPPFLAGS"
|
|
||||||
oLDFLAGS="$LDFLAGS"
|
|
||||||
oLIBS="$LIBS"
|
|
||||||
have_gssapi=no
|
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS $GSSAPICPPFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $GSSAPILDFLAGS"
|
|
||||||
|
|
||||||
AC_CHECK_HEADER([gssapi/gssapi.h],
|
|
||||||
[LIBS="$oLIBS -lgssapi"
|
|
||||||
AC_MSG_CHECKING(for gssapi library -lgssapi)
|
|
||||||
AC_TRY_LINK([#include <gssapi/gssapi.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
],[gss_create_empty_oid_set(NULL, NULL)],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
cons_with_gssapi="YES"
|
|
||||||
AC_DEFINE(HAVE_GSSAPI)
|
|
||||||
have_gssapi=yes],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
LIBS="$oLIBS -lgssglue"
|
|
||||||
AC_MSG_CHECKING(for gssapi library -lgssglue)
|
|
||||||
AC_TRY_LINK([#include <gssapi/gssapi.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
],[gss_create_empty_oid_set(NULL, NULL)],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
cons_with_gssapi="YES"
|
|
||||||
AC_DEFINE(HAVE_GSSAPI)
|
|
||||||
have_gssapi=yes],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
LIBS="$oLIBS -lgss"
|
|
||||||
AC_MSG_CHECKING(for gssapi library -lgss)
|
|
||||||
AC_TRY_LINK([#include <gssapi/gssapi.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
],[gss_create_empty_oid_set(NULL, NULL)],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
cons_with_gssapi="YES"
|
|
||||||
AC_DEFINE(HAVE_GSSAPI)
|
|
||||||
have_gssapi=yes],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
LIBS="$oLIBS -lgssapi_krb5"
|
|
||||||
AC_MSG_CHECKING(for gssapi library -lgssapi_krb5)
|
|
||||||
AC_TRY_LINK([#include <gssapi/gssapi.h>
|
|
||||||
],[gss_create_empty_oid_set(NULL, NULL)],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
cons_with_gssapi="YES"
|
|
||||||
AC_DEFINE(HAVE_GSSAPI)
|
|
||||||
have_gssapi=yes],
|
|
||||||
[AC_MSG_RESULT(no)])])])])],)
|
|
||||||
|
|
||||||
|
|
||||||
if test $have_gssapi = no; then
|
|
||||||
LIBS="$oLIBS"
|
|
||||||
CPPFLAGS="$oCPPFLAGS"
|
|
||||||
LDFLAGS="$oLDFLAGS"
|
|
||||||
else
|
|
||||||
AC_MSG_CHECKING(whether to fallback to username without @REALM)
|
|
||||||
AC_ARG_WITH(striprealm,
|
|
||||||
AS_HELP_STRING([--with-striprealm],[retry username without @REALM with gss-api authentication]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE(STRIP_REALM)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
cons_strip_realm="YES"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
esac],[AC_MSG_RESULT(no)])
|
|
||||||
fi
|
|
||||||
fi]
|
|
||||||
)
|
|
||||||
|
|
||||||
cons_with_freeipmi="NO"
|
|
||||||
AC_ARG_WITH(freeipmi,
|
|
||||||
AS_HELP_STRING([--with-freeipmi@<:@=PATH@:>@],
|
|
||||||
[Compile in FreeIPMI support]),
|
|
||||||
[if test "$withval" != "no"; then
|
|
||||||
if test "$withval" != "yes"; then
|
|
||||||
FREEIPMICPPFLAGS="-I$withval/include"
|
|
||||||
if test "$use_dash_r" != "yes"; then
|
|
||||||
FREEIPMILDFLAGS="-L$withval/lib"
|
|
||||||
else
|
|
||||||
FREEIPMILDFLAGS="-L$withval/lib -R$withval/lib"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
FREEIPMICPPFLAGS=""
|
|
||||||
FREEIPMILDFLAGS=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
oCPPFLAGS="$CPPFLAGS"
|
|
||||||
oLDFLAGS="$LDFLAGS"
|
|
||||||
oLIBS="$LIBS"
|
|
||||||
have_freeipmi=no
|
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS $FREEIPMICPPFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $FREEIPMILDFLAGS"
|
|
||||||
|
|
||||||
AC_CHECK_HEADER([ipmiconsole.h],
|
|
||||||
[LIBS="$LIBS -lipmiconsole"
|
|
||||||
AC_MSG_CHECKING(for freeipmi libraries -lipmiconsole)
|
|
||||||
AC_TRY_LINK([#include <ipmiconsole.h>
|
|
||||||
],[ipmiconsole_ctx_fd(0)],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
cons_with_freeipmi="YES"
|
|
||||||
AC_DEFINE(HAVE_FREEIPMI)
|
|
||||||
CONSLIBS="$CONSLIBS -lipmiconsole"
|
|
||||||
have_freeipmi=yes],
|
|
||||||
[AC_MSG_RESULT(no)])],)
|
|
||||||
|
|
||||||
LIBS="$oLIBS"
|
|
||||||
if test $have_freeipmi = no; then
|
|
||||||
CPPFLAGS="$oCPPFLAGS"
|
|
||||||
LDFLAGS="$oLDFLAGS"
|
|
||||||
fi
|
|
||||||
fi]
|
fi]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -828,23 +594,6 @@ AC_ARG_WITH(pam,
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi],[AC_MSG_RESULT(no)])
|
fi],[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
cons_with_ipv6="NO"
|
|
||||||
AC_MSG_CHECKING(whether to support IPv6)
|
|
||||||
AC_ARG_WITH(ipv6,
|
|
||||||
AS_HELP_STRING([--with-ipv6],
|
|
||||||
[(experimental) Use IPv6 for client/server communication]),
|
|
||||||
[case "$withval" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE(USE_IPV6)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
cons_with_ipv6="YES"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
esac],[AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Checks for pty allocation...
|
dnl Checks for pty allocation...
|
||||||
dnl According to the xemacs distribution:
|
dnl According to the xemacs distribution:
|
||||||
dnl getpt() is the preferred pty allocation method on glibc systems.
|
dnl getpt() is the preferred pty allocation method on glibc systems.
|
||||||
@ -860,7 +609,8 @@ AC_CHECK_HEADERS(pty.h libutil.h util.h)
|
|||||||
AC_CHECK_LIB(util, openpty)
|
AC_CHECK_LIB(util, openpty)
|
||||||
AC_CHECK_FUNCS(openpty)
|
AC_CHECK_FUNCS(openpty)
|
||||||
|
|
||||||
AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt sigaction setsockopt getdtablesize putenv memset memcpy memcmp memmove sysconf getlogin inet_aton setproctitle gettimeofday strlcpy closefrom nanosleep)
|
AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt sigaction setsockopt getdtablesize putenv memset memcpy memcmp memmove sysconf getlogin inet_aton setproctitle)
|
||||||
|
AC_FUNC_SETPGRP
|
||||||
AC_CHECK_FUNC(strcasecmp,
|
AC_CHECK_FUNC(strcasecmp,
|
||||||
[AC_DEFINE(HAVE_STRCASECMP, 1, [Define if strcasecmp is available])],
|
[AC_DEFINE(HAVE_STRCASECMP, 1, [Define if strcasecmp is available])],
|
||||||
[AC_CHECK_FUNC(stricmp,
|
[AC_CHECK_FUNC(stricmp,
|
||||||
@ -876,7 +626,6 @@ AC_CHECK_FUNCS(getaudit getaudit_addr)
|
|||||||
dnl ### Create output files. #######################################
|
dnl ### Create output files. #######################################
|
||||||
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile contrib/chat/Makefile])
|
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile contrib/chat/Makefile])
|
||||||
AC_CONFIG_FILES([conserver/conserver.rc], [chmod +x conserver/conserver.rc])
|
AC_CONFIG_FILES([conserver/conserver.rc], [chmod +x conserver/conserver.rc])
|
||||||
AC_CONFIG_FILES([conserver.cf/conserver.cf.man conserver.cf/conserver.passwd.man conserver/conserver.man console/console.man])
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -886,14 +635,8 @@ echo ""
|
|||||||
echo " Unix domain sockets (--with-uds) : $cons_with_uds"
|
echo " Unix domain sockets (--with-uds) : $cons_with_uds"
|
||||||
echo " TCP wrappers (--with-libwrap): $cons_with_libwrap"
|
echo " TCP wrappers (--with-libwrap): $cons_with_libwrap"
|
||||||
echo " OpenSSL (--with-openssl): $cons_with_openssl"
|
echo " OpenSSL (--with-openssl): $cons_with_openssl"
|
||||||
echo " GSS-API (--with-gssapi) : $cons_with_gssapi"
|
|
||||||
echo " FreeIPMI (--with-freeipmi) : $cons_with_freeipmi"
|
|
||||||
if [ $cons_with_gssapi = "YES" ]; then
|
|
||||||
echo " strip @REALM (--with-striprealm): $cons_strip_realm"
|
|
||||||
fi
|
|
||||||
echo " dmalloc (--with-dmalloc): $cons_with_dmalloc"
|
echo " dmalloc (--with-dmalloc): $cons_with_dmalloc"
|
||||||
echo " PAM support (--with-pam) : $cons_with_pam"
|
echo " PAM support (--with-pam) : $cons_with_pam"
|
||||||
echo " IPv6 support (--with-ipv6) : $cons_with_ipv6"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=============================================================="
|
echo "=============================================================="
|
||||||
]
|
]
|
@ -1,7 +1,11 @@
|
|||||||
The two files you need to set up are the conserver.cf and conserver.passwd
|
The two files you need to set up are the conserver.cf and conserver.passwd
|
||||||
files. See the sample conserver.cf and conserver.passwd files for examples
|
files. See the sample conserver.cf and conserver.passwd files
|
||||||
(installed in <DATADIR>/examples/conserver). You can start with those and
|
for examples. You can start with those and then modify extensively.
|
||||||
then modify extensively. The man page for conserver.cf and conserver.passwd
|
The man page for conserver.cf and conserver.passwd should explain the
|
||||||
should explain the files with enough detail to get you going.
|
files with enough detail to get you going.
|
||||||
|
|
||||||
That's about it. Good luck.
|
That's about it. Good luck.
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: INSTALL,v 1.3 2003/07/04 18:21:21 bryan Exp $
|
||||||
|
#
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
@ -25,8 +24,8 @@ distclean: clean
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
$(MKDIR) $(DESTDIR)$(mandir)/man5
|
$(MKDIR) $(DESTDIR)$(mandir)/man5
|
||||||
$(INSTALL) -m 0644 conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5
|
$(INSTALL) conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5
|
||||||
$(INSTALL) -m 0644 conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5
|
$(INSTALL) conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5
|
||||||
$(MKDIR) $(DESTDIR)$(exampledir)
|
$(MKDIR) $(DESTDIR)$(exampledir)
|
||||||
$(INSTALL) -m 0644 conserver.cf $(DESTDIR)$(exampledir)
|
$(INSTALL) -m 0644 conserver.cf $(DESTDIR)$(exampledir)
|
||||||
$(INSTALL) -m 0644 conserver.passwd $(DESTDIR)$(exampledir)
|
$(INSTALL) -m 0644 conserver.passwd $(DESTDIR)$(exampledir)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
.TH CONSERVER.CF 5 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
.\" $Id: conserver.cf.man,v 1.65 2004/05/27 23:39:06 bryan Exp $
|
||||||
|
.TH CONSERVER.CF 5 "2004/05/27" "conserver-8.1.7" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver.cf \- console configuration file for
|
conserver.cf \- console configuration file for
|
||||||
.BR conserver (8)
|
.BR conserver (8)
|
||||||
@ -173,31 +174,6 @@ The access lists defined using the name
|
|||||||
are applied to the current access block.
|
are applied to the current access block.
|
||||||
The included access block must be previously defined.
|
The included access block must be previously defined.
|
||||||
.TP
|
.TP
|
||||||
\f3limited\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP
|
|
||||||
.br
|
|
||||||
Define a list of users with limited functionality on the console server.
|
|
||||||
These users will not be allowed to suspend their connection,
|
|
||||||
shift to another console, or attach to a local command.
|
|
||||||
If
|
|
||||||
.I username
|
|
||||||
matches a previously defined group name, all members of the previous
|
|
||||||
group are applied to the admin list (with access reversed if prefixed
|
|
||||||
with a `!').
|
|
||||||
If
|
|
||||||
.I username
|
|
||||||
doesn't match a previously defined group and
|
|
||||||
.I username
|
|
||||||
begins with `@', the name (minus the `@') is checked against the
|
|
||||||
host's group database.
|
|
||||||
All users found in the group will be granted (or denied, if prefixed
|
|
||||||
with `!') access.
|
|
||||||
If
|
|
||||||
.I username
|
|
||||||
doesn't match a previous group and doesn't begin with `@', the users
|
|
||||||
will be granted (or denied, if prefixed with `!') access.
|
|
||||||
If the null string (``\f3""\fP'') is used, any
|
|
||||||
users previously defined for the console server's limited list are removed.
|
|
||||||
.TP
|
|
||||||
\f3rejected\fP \f2hostname\fP[\f3,\fP...]
|
\f3rejected\fP \f2hostname\fP[\f3,\fP...]
|
||||||
.br
|
.br
|
||||||
The list of hostnames are added to the ``rejected'' list, which rejects
|
The list of hostnames are added to the ``rejected'' list, which rejects
|
||||||
@ -211,22 +187,14 @@ connections from the hosts without username authentication.
|
|||||||
.TP
|
.TP
|
||||||
\f3break\fP \f2n\fP
|
\f3break\fP \f2n\fP
|
||||||
.br
|
.br
|
||||||
Define a break sequence where (1 <=
|
Define a break sequence where 0 <
|
||||||
.I n
|
.I n
|
||||||
<= 9) or (a <=
|
< 10.
|
||||||
.I n
|
|
||||||
<= z).
|
|
||||||
Break sequences are accessed via the
|
Break sequences are accessed via the
|
||||||
.RI ``^Ecl n ''
|
.RI ``^El n ''
|
||||||
client escape sequence.
|
client escape sequence.
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
\f3confirm\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
|
||||||
.br
|
|
||||||
Set whether or not to ask the client for confirmation before sending the
|
|
||||||
break sequence.
|
|
||||||
The default is ``no''.
|
|
||||||
.TP
|
|
||||||
\f3delay\fP \f2n\fP
|
\f3delay\fP \f2n\fP
|
||||||
.br
|
.br
|
||||||
Set the time delay for the
|
Set the time delay for the
|
||||||
@ -315,13 +283,6 @@ If the value of ``*'' is used, the configuration block will be applied to
|
|||||||
all conserver hosts.
|
all conserver hosts.
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
\f3autocomplete\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
|
||||||
.br
|
|
||||||
Turn the console name autocompletion feature on or off.
|
|
||||||
If autocompletion is on, a client can use any unique leading portion of a
|
|
||||||
console name when connecting to a console.
|
|
||||||
Autocompletion is on by default.
|
|
||||||
.TP
|
|
||||||
\f3defaultaccess\fP \f3rejected\fP|\f3trusted\fP|\f3allowed\fP
|
\f3defaultaccess\fP \f3rejected\fP|\f3trusted\fP|\f3allowed\fP
|
||||||
.br
|
.br
|
||||||
Set the default access permission for all hosts not matched by
|
Set the default access permission for all hosts not matched by
|
||||||
@ -329,7 +290,7 @@ an access list (see the
|
|||||||
.B \-a
|
.B \-a
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3daemonmode\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
\f3daemonmode\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off
|
||||||
.br
|
.br
|
||||||
Set whether or not to become a daemon when run (see the
|
Set whether or not to become a daemon when run (see the
|
||||||
.B \-d
|
.B \-d
|
||||||
@ -379,20 +340,17 @@ Set the port used by the master conserver process (see the
|
|||||||
.B \-p
|
.B \-p
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3redirect\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
\f3redirect\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off
|
||||||
.br
|
.br
|
||||||
Turn redirection on or off (see the
|
Turn redirection on or off (see the
|
||||||
.B \-R
|
.B \-R
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3reinitcheck\fP \f2number\fP[\f3s\fP|\f3m\fP]
|
\f3reinitcheck\fP \f2number\fP
|
||||||
.br
|
.br
|
||||||
Set the number of minutes used between reinitialization checks (see the
|
Set the number of minutes used between reinitialization checks (see the
|
||||||
.B \-O
|
.B \-O
|
||||||
command-line flag).
|
command-line flag).
|
||||||
If an `s' or `m' is used after
|
|
||||||
.IR number ,
|
|
||||||
the specified time is interpreted as seconds or minutes.
|
|
||||||
.TP
|
.TP
|
||||||
\f3secondaryport\fP \f2number\fP|\f2name\fP
|
\f3secondaryport\fP \f2number\fP|\f2name\fP
|
||||||
.br
|
.br
|
||||||
@ -400,7 +358,7 @@ Set the base port number used by child processes (see the
|
|||||||
.B \-b
|
.B \-b
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3setproctitle\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
\f3setproctitle\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off
|
||||||
.br
|
.br
|
||||||
Set whether or not the process title shows master/group functionality
|
Set whether or not the process title shows master/group functionality
|
||||||
as well as the port number the process is listening on and how many
|
as well as the port number the process is listening on and how many
|
||||||
@ -417,19 +375,7 @@ credentials file location (see the
|
|||||||
.B \-c
|
.B \-c
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3sslcacertificatefile\fP \f2filename\fP
|
\f3sslrequired\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off
|
||||||
.br
|
|
||||||
Load the valid CA certificates for the
|
|
||||||
.SM SSL
|
|
||||||
connection from the PEM encoded file. This option overrides the global CA
|
|
||||||
list.
|
|
||||||
.TP
|
|
||||||
\f3sslreqclientcert\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
|
||||||
.br
|
|
||||||
Set whether or not a certificate is required by the client to connect.
|
|
||||||
The default is ``no''.
|
|
||||||
.TP
|
|
||||||
\f3sslrequired\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
|
||||||
.br
|
.br
|
||||||
Set whether or not encryption is required when talking to clients (see the
|
Set whether or not encryption is required when talking to clients (see the
|
||||||
.B \-E
|
.B \-E
|
||||||
@ -471,7 +417,7 @@ all consoles have an implicit ``include "*";'' at the beginning
|
|||||||
of their definition).
|
of their definition).
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
\f3baud\fP \f3300\fP|\f3600\fP|\f31800\fP|\f32400\fP|\f34800\fP|\f39600\fP|\f319200\fP|\f338400\fP|\f357600\fP|\f3115200\fP|..|\f34000000\fP
|
\f3baud\fP \f3300\fP|\f3600\fP|\f31800\fP|\f32400\fP|\f34800\fP|\f39600\fP|\f319200\fP|\f338400\fP|\f357600\fP|\f3115200\fP
|
||||||
.br
|
.br
|
||||||
Assign the baud rate to the console.
|
Assign the baud rate to the console.
|
||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
@ -483,18 +429,11 @@ Assign the break sequence
|
|||||||
as the default for the console, which is used by
|
as the default for the console, which is used by
|
||||||
the ``^Ecl0'' client escape sequence.
|
the ``^Ecl0'' client escape sequence.
|
||||||
.TP
|
.TP
|
||||||
\f3breaklist\fP \f2n\fP[\f3,\fP...]|\f3""\fP
|
|
||||||
Associate a list of break sequences referenced by
|
|
||||||
.I n
|
|
||||||
with the console.
|
|
||||||
If ``*'' is used (the default), all defined break sequences will be available.
|
|
||||||
If the null string (``\f3""\fP'') is used, no sequences will be available.
|
|
||||||
.TP
|
|
||||||
\f3device\fP \f2filename\fP
|
\f3device\fP \f2filename\fP
|
||||||
.br
|
.br
|
||||||
Assign the serial device
|
Assign the serial device
|
||||||
.I filename
|
.I filename
|
||||||
as the path to the console.
|
as the access to the console.
|
||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
.TP
|
.TP
|
||||||
\f3devicesubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
\f3devicesubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
||||||
@ -529,24 +468,16 @@ fields.
|
|||||||
.TP
|
.TP
|
||||||
String Replacement
|
String Replacement
|
||||||
.TP
|
.TP
|
||||||
.B c
|
|
||||||
console name
|
|
||||||
.TP
|
|
||||||
.B h
|
.B h
|
||||||
.B host
|
.B host
|
||||||
value
|
value
|
||||||
.TP
|
.TP
|
||||||
.B r
|
.B c
|
||||||
.B replstring
|
console name
|
||||||
value
|
|
||||||
.sp
|
.sp
|
||||||
.PP
|
.PP
|
||||||
Numeric Replacement
|
Numeric Replacement
|
||||||
.TP
|
.TP
|
||||||
.B b
|
|
||||||
.B baud
|
|
||||||
value
|
|
||||||
.TP
|
|
||||||
.B p
|
.B p
|
||||||
config
|
config
|
||||||
.B port
|
.B port
|
||||||
@ -569,9 +500,8 @@ characters, padded with 0s if
|
|||||||
.I n
|
.I n
|
||||||
begins with a 0, and space characters otherwise.
|
begins with a 0, and space characters otherwise.
|
||||||
.I f
|
.I f
|
||||||
must be either `d', `x', `X', `a', or `A', specifying a decimal, lowercase
|
must be either `d', `x' or `X', specifying a decimal, lower-case
|
||||||
hexadecimal (0-9a-f), uppercase hexadecimal (0-9A-F), lowercase
|
hexadecimal, or an uppercase hexadecimal conversion.
|
||||||
alphanumeric (0-9a-z), or uppercase alphanumeric (0-9A-Z) conversion.
|
|
||||||
If the null string (``\f3""\fP'') is used, no replacements will be done.
|
If the null string (``\f3""\fP'') is used, no replacements will be done.
|
||||||
.TP
|
.TP
|
||||||
\f3exec\fP \f2command|\f3""\fP
|
\f3exec\fP \f2command|\f3""\fP
|
||||||
@ -586,27 +516,6 @@ If the null string (``\f3""\fP'') is used or no
|
|||||||
keyword is specified, conserver will use the command ``/bin/sh -i''.
|
keyword is specified, conserver will use the command ``/bin/sh -i''.
|
||||||
Only consoles of type ``exec'' will use this value.
|
Only consoles of type ``exec'' will use this value.
|
||||||
.TP
|
.TP
|
||||||
\f3execrunas\fP [\f2user\fP][:\f2group\fP]|\f3""\fP
|
|
||||||
.br
|
|
||||||
By default, the command invoked by
|
|
||||||
.B exec
|
|
||||||
is run with the same privileges as the server.
|
|
||||||
If the server is running with root privileges, this option resets the user
|
|
||||||
and/or group of the invoked process to
|
|
||||||
.I user
|
|
||||||
and
|
|
||||||
.I group
|
|
||||||
respectively.
|
|
||||||
.I user
|
|
||||||
may be a username or numeric uid and
|
|
||||||
.I group
|
|
||||||
may be a group name or numeric gid.
|
|
||||||
Either one is optional.
|
|
||||||
If the server is not running with root privileges, these values
|
|
||||||
are not used.
|
|
||||||
If the null string (``\f3""\fP'') is specified, the default of running
|
|
||||||
with the same privileges as the server is restored.
|
|
||||||
.TP
|
|
||||||
\f3execsubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
\f3execsubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
||||||
.br
|
.br
|
||||||
Perform character substitutions on the
|
Perform character substitutions on the
|
||||||
@ -624,9 +533,9 @@ Assign
|
|||||||
as the host to connect to for accessing the console.
|
as the host to connect to for accessing the console.
|
||||||
You must also set the
|
You must also set the
|
||||||
.B port
|
.B port
|
||||||
option for consoles of type ``host''.
|
option as well.
|
||||||
Normally, only consoles of type ``host'' and ``ipmi'' will use this value,
|
Normally, only consoles of type ``host'' will use this value, however
|
||||||
however if the
|
if the
|
||||||
.BR devicesubst ,
|
.BR devicesubst ,
|
||||||
.BR execsubst ,
|
.BR execsubst ,
|
||||||
or
|
or
|
||||||
@ -660,111 +569,6 @@ If an `s', `m', or `h' is used after
|
|||||||
the specified time is interpreted as seconds, minutes, or hours.
|
the specified time is interpreted as seconds, minutes, or hours.
|
||||||
Set the timeout to zero to disable the idle timeout (the default).
|
Set the timeout to zero to disable the idle timeout (the default).
|
||||||
.TP
|
.TP
|
||||||
\f3ipmiciphersuite\fP \f2number\fP
|
|
||||||
.br
|
|
||||||
Set the IPMI cipher suite. Syntactically valid
|
|
||||||
values are -1 (the default) and greater. Check the FreeIPMI documentation
|
|
||||||
for usable values.
|
|
||||||
.TP
|
|
||||||
\f3ipmikg\fP \f2string\fP|\f3""\fP
|
|
||||||
Set the BMC authentication key K_g to
|
|
||||||
.IR string .
|
|
||||||
A K_g value is a simple character string with the exception of `\e':
|
|
||||||
.RS
|
|
||||||
.RS
|
|
||||||
.sp
|
|
||||||
.PD 0
|
|
||||||
.TP 6
|
|
||||||
.B \e\e
|
|
||||||
backslash
|
|
||||||
.TP
|
|
||||||
.BI \e ooo
|
|
||||||
octal representation of a character (where
|
|
||||||
.I ooo
|
|
||||||
is one to three octal digits)
|
|
||||||
.TP
|
|
||||||
.BI \e c
|
|
||||||
character
|
|
||||||
.I c
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.RE
|
|
||||||
.IP
|
|
||||||
The resulting value must be no more than 20 characters.
|
|
||||||
The null string (``\f3""\fP'') is the default.
|
|
||||||
.TP
|
|
||||||
\f3ipmiworkaround\fP [\f3!\fP]option[\f3,\fP...]|\f3""\fP
|
|
||||||
.br
|
|
||||||
You can turn off a workaround by prefixing it with a
|
|
||||||
.RB `` ! ''
|
|
||||||
character.
|
|
||||||
So, to turn off the
|
|
||||||
.B integrity
|
|
||||||
workaround, you would use
|
|
||||||
.BR !integrity .
|
|
||||||
The following are valid
|
|
||||||
.IR option s
|
|
||||||
and their mapping to FreeIPMI settings:
|
|
||||||
.RS
|
|
||||||
.sp
|
|
||||||
.PD 0
|
|
||||||
.TP 21
|
|
||||||
.B activation-status
|
|
||||||
.SM SKIP_SOL_ACTIVATION_STATUS
|
|
||||||
.TP
|
|
||||||
.B auth-capabilites
|
|
||||||
.SM AUTHENTICATION_CAPABILITIES
|
|
||||||
.TP
|
|
||||||
.B channel-payload
|
|
||||||
.SM SKIP_CHANNEL_PAYLOAD_SUPPORT
|
|
||||||
.TP
|
|
||||||
.B checksum
|
|
||||||
.SM NO_CHECKSUM_CHECK
|
|
||||||
.TP
|
|
||||||
.B default
|
|
||||||
.SM DEFAULT
|
|
||||||
.TP
|
|
||||||
.B ignore-payload-size
|
|
||||||
.SM IGNORE_SOL_PAYLOAD_SIZE
|
|
||||||
.TP
|
|
||||||
.B ignore-port
|
|
||||||
.SM IGNORE_SOL_PORT
|
|
||||||
.TP
|
|
||||||
.B integrity
|
|
||||||
.SM NON_EMPTY_INTEGRITY_CHECK_VALUE
|
|
||||||
.TP
|
|
||||||
.B intel-session
|
|
||||||
.SM INTEL_2_0_SESSION
|
|
||||||
.TP
|
|
||||||
.B packet-sequence
|
|
||||||
.SM INCREMENT_SOL_PACKET_SEQUENCE
|
|
||||||
.TP
|
|
||||||
.B privilege
|
|
||||||
.SM OPEN_SESSION_PRIVILEGE
|
|
||||||
.TP
|
|
||||||
.B serial-alerts
|
|
||||||
.SM SERIAL_ALERTS_DEFERRED
|
|
||||||
.TP
|
|
||||||
.B sun-session
|
|
||||||
.SM SUN_2_0_SESSION
|
|
||||||
.TP
|
|
||||||
.B supermicro-session
|
|
||||||
.SM SUPERMICRO_2_0_SESSION
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.IP
|
|
||||||
If no
|
|
||||||
.B ipmiworkaround
|
|
||||||
is specified, the ``\f3default\fP'' workaround will be used.
|
|
||||||
The null string (``\f3""\fP'') unsets all workarounds,
|
|
||||||
including ``\f3default\fP''.
|
|
||||||
See the FreeIPMI documentation for details on what workarounds affect.
|
|
||||||
.TP
|
|
||||||
\f3ipmiprivlevel\fP \f2user\fP|\f2operator\fP|\f2admin\fP
|
|
||||||
.br
|
|
||||||
Set the privilege level for the username used during IPMI authentication.
|
|
||||||
The default privilege level is ``\f2admin\fP''.
|
|
||||||
.TP
|
|
||||||
\f3include\fP \f2default\fP
|
\f3include\fP \f2default\fP
|
||||||
.br
|
.br
|
||||||
The default block defined using the name
|
The default block defined using the name
|
||||||
@ -772,7 +576,7 @@ The default block defined using the name
|
|||||||
is applied to the current console or default block.
|
is applied to the current console or default block.
|
||||||
The included default block must be previously defined.
|
The included default block must be previously defined.
|
||||||
.TP
|
.TP
|
||||||
\f3initcmd\fP \f2command\fP|\f3""\fP
|
\f3initcmd\fP \f3command\fP|\f3""\fP
|
||||||
.br
|
.br
|
||||||
Invoke
|
Invoke
|
||||||
.I command
|
.I command
|
||||||
@ -785,66 +589,6 @@ is passed as an argument to ``/bin/sh -ce''.
|
|||||||
If the null string (``\f3""\fP'') is used, the command is unset and
|
If the null string (``\f3""\fP'') is used, the command is unset and
|
||||||
nothing is invoked.
|
nothing is invoked.
|
||||||
.TP
|
.TP
|
||||||
\f3initrunas\fP [\f2user\fP][:\f2group\fP]|\f3""\fP
|
|
||||||
.br
|
|
||||||
By default, the command invoked by
|
|
||||||
.B initcmd
|
|
||||||
is run with the same privileges as the server.
|
|
||||||
If the server is running with root privileges, this option resets the user
|
|
||||||
and/or group of the invoked process to
|
|
||||||
.I user
|
|
||||||
and
|
|
||||||
.I group
|
|
||||||
respectively.
|
|
||||||
.I user
|
|
||||||
may be a username or numeric uid and
|
|
||||||
.I group
|
|
||||||
may be a group name or numeric gid.
|
|
||||||
Either one is optional.
|
|
||||||
If the server is not running with root privileges, these values
|
|
||||||
are not used.
|
|
||||||
If the null string (``\f3""\fP'') is specified, the default of running
|
|
||||||
with the same privileges as the server is restored.
|
|
||||||
.TP
|
|
||||||
\f3initspinmax\fP \f2n\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Set the maximum number of ``spins'' allowed for the console to
|
|
||||||
.IR n ,
|
|
||||||
where 0 <=
|
|
||||||
.I n
|
|
||||||
<= 254.
|
|
||||||
A console is determined to be ``spinning'' if an attempt to initialize
|
|
||||||
the console occurs in under
|
|
||||||
.B initspintimer
|
|
||||||
seconds from its previous initialization and this quick
|
|
||||||
initialization occurs
|
|
||||||
.B initspinmax
|
|
||||||
times in a row.
|
|
||||||
If, at any point, the time between initializations is greater than
|
|
||||||
.BR initspintimer ,
|
|
||||||
the counter for reaching
|
|
||||||
.B initspinmax
|
|
||||||
resets to zero.
|
|
||||||
When a console is determined to be ``spinning'' it is forced down.
|
|
||||||
If the null string (``\f3""\fP'') is specified, the default of
|
|
||||||
.B 5
|
|
||||||
is used.
|
|
||||||
.TP
|
|
||||||
\f3initspintimer\fP \f2t\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Set the number of seconds a console must be ``up'' to not be
|
|
||||||
considered ``spinning'' to
|
|
||||||
.IR t ,
|
|
||||||
where 0 <=
|
|
||||||
.I t
|
|
||||||
<= 254.
|
|
||||||
See
|
|
||||||
.B initspinmax
|
|
||||||
for a full description of console ``spinning.''
|
|
||||||
If the null string (``\f3""\fP'') is specified, the default of
|
|
||||||
.B 1
|
|
||||||
is used.
|
|
||||||
.TP
|
|
||||||
\f3initsubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
\f3initsubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
||||||
.br
|
.br
|
||||||
Perform character substitutions on the
|
Perform character substitutions on the
|
||||||
@ -870,7 +614,7 @@ no logging will occur.
|
|||||||
.br
|
.br
|
||||||
Enable automatic rotation of
|
Enable automatic rotation of
|
||||||
.B logfile
|
.B logfile
|
||||||
once its size exceeds
|
once it's size exceeds
|
||||||
.I number
|
.I number
|
||||||
bytes.
|
bytes.
|
||||||
Specifying
|
Specifying
|
||||||
@ -899,7 +643,7 @@ logfile is read from the end of the file.
|
|||||||
All data past the first newline is moved (not copied) to the new logfile
|
All data past the first newline is moved (not copied) to the new logfile
|
||||||
so that a replay of the console works and starts on a line boundary.
|
so that a replay of the console works and starts on a line boundary.
|
||||||
.TP
|
.TP
|
||||||
\f3master\fP \f2hostname\fP|\f2ipaddr\fP
|
\f3master\fP \f2hostname\fP|\f3ipaddr\fP
|
||||||
.br
|
.br
|
||||||
Define which conserver host manages the console.
|
Define which conserver host manages the console.
|
||||||
The host may be specified by
|
The host may be specified by
|
||||||
@ -1019,7 +763,7 @@ Default is
|
|||||||
.BR autoreinit .
|
.BR autoreinit .
|
||||||
.TP
|
.TP
|
||||||
.B unloved
|
.B unloved
|
||||||
Enable the sending of this console's output (prefixed with its
|
Enable the sending of this console's output (prefixed with it's
|
||||||
name) to the daemon's stdout (or the logfile if in daemon mode) when no
|
name) to the daemon's stdout (or the logfile if in daemon mode) when no
|
||||||
clients are connected to the console.
|
clients are connected to the console.
|
||||||
The conserver option
|
The conserver option
|
||||||
@ -1027,16 +771,6 @@ The conserver option
|
|||||||
will set this flag for all consoles.
|
will set this flag for all consoles.
|
||||||
Default is
|
Default is
|
||||||
.BR !unloved .
|
.BR !unloved .
|
||||||
.TP
|
|
||||||
.B login
|
|
||||||
Allow users to log into this console.
|
|
||||||
If logins are not allowed, conserver will send a generic message to the
|
|
||||||
client saying so and terminate the connection.
|
|
||||||
You can override the generic message by setting the
|
|
||||||
.B motd
|
|
||||||
message.
|
|
||||||
Default is
|
|
||||||
.BR login .
|
|
||||||
.PD
|
.PD
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
@ -1045,13 +779,6 @@ Default is
|
|||||||
Set the parity option for the console.
|
Set the parity option for the console.
|
||||||
Only consoles of type ``device'' will use this value.
|
Only consoles of type ``device'' will use this value.
|
||||||
.TP
|
.TP
|
||||||
\f3password\fP \f2password\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Use
|
|
||||||
.I password
|
|
||||||
during IPMI authentication.
|
|
||||||
If the null string (``\f3""\fP'') is used (the default), no password will be used.
|
|
||||||
.TP
|
|
||||||
\f3port\fP \f2number\fP|\f2name\fP
|
\f3port\fP \f2number\fP|\f2name\fP
|
||||||
.br
|
.br
|
||||||
Set the port used to access the console.
|
Set the port used to access the console.
|
||||||
@ -1080,7 +807,7 @@ terminal server by their physical numbering of
|
|||||||
or
|
or
|
||||||
.RI 1.. n
|
.RI 1.. n
|
||||||
(depending on if you like zero-based or one-based numbering).
|
(depending on if you like zero-based or one-based numbering).
|
||||||
Warning: you can generate a -1 value with this formula,
|
Warning: you can generate a \-1 value with this formula,
|
||||||
which will become a very high numbered positive
|
which will become a very high numbered positive
|
||||||
value (since things are stored unsigned).
|
value (since things are stored unsigned).
|
||||||
You must also set the
|
You must also set the
|
||||||
@ -1128,15 +855,6 @@ The
|
|||||||
console option still applies when data is read by the server, and if enabled,
|
console option still applies when data is read by the server, and if enabled,
|
||||||
can impact the encapsulation process.
|
can impact the encapsulation process.
|
||||||
.TP
|
.TP
|
||||||
\f3replstring\fP \f2string\fP
|
|
||||||
.br
|
|
||||||
A generic replacement string that can be used by the
|
|
||||||
.BR devicesubst ,
|
|
||||||
.BR execsubst ,
|
|
||||||
and
|
|
||||||
.B initsubst
|
|
||||||
keywords.
|
|
||||||
.TP
|
|
||||||
\f3ro\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP
|
\f3ro\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP
|
||||||
.br
|
.br
|
||||||
Define a list of users making up the read-only access list
|
Define a list of users making up the read-only access list
|
||||||
@ -1185,13 +903,6 @@ will be granted (or denied, if prefixed with `!') read-write access.
|
|||||||
If the null string (``\f3""\fP'') is used, any
|
If the null string (``\f3""\fP'') is used, any
|
||||||
users previously defined for the console's read-write list are removed.
|
users previously defined for the console's read-write list are removed.
|
||||||
.TP
|
.TP
|
||||||
\f3tasklist\fP \f2c\fP[\f3,\fP...]|\f3""\fP
|
|
||||||
Associate a list of tasks referenced by
|
|
||||||
.I c
|
|
||||||
with the console.
|
|
||||||
If ``*'' is used (the default), all defined tasks will be available.
|
|
||||||
If the null string (``\f3""\fP'') is used, no tasks will be available.
|
|
||||||
.TP
|
|
||||||
\f3timestamp\fP [\f2number\fP[\f3m\fP|\f3h\fP|\f3d\fP|\f3l\fP]][\f3a\fP][\f3b\fP]|\f3""\fP
|
\f3timestamp\fP [\f2number\fP[\f3m\fP|\f3h\fP|\f3d\fP|\f3l\fP]][\f3a\fP][\f3b\fP]|\f3""\fP
|
||||||
.br
|
.br
|
||||||
Specifies the time between timestamps applied to the console
|
Specifies the time between timestamps applied to the console
|
||||||
@ -1221,81 +932,31 @@ A
|
|||||||
.RB ` b '
|
.RB ` b '
|
||||||
can be specified to add logging of break sequences sent to the console.
|
can be specified to add logging of break sequences sent to the console.
|
||||||
.TP
|
.TP
|
||||||
\f3type\fP \f3device\fP|\f3ipmi\fP|\f3exec\fP|\f3host\fP|\f3noop\fP|\f3uds\fP
|
\f3type\fP \f3device\fP|\f3exec\fP|\f3host\fP
|
||||||
.br
|
.br
|
||||||
Set the type of console.
|
Set the type of console.
|
||||||
A type of
|
The type
|
||||||
.RB `` device ''
|
.RB `` device ''
|
||||||
should be used for local serial ports (also set the
|
should be used for local serial ports (also set the
|
||||||
.B device
|
.B device
|
||||||
value).
|
option), the type
|
||||||
A type of
|
|
||||||
.RB `` ipmi ''
|
|
||||||
should be used for IPMI serial over LAN consoles (also set the
|
|
||||||
.B host
|
|
||||||
value and possibly the
|
|
||||||
.BR username ,
|
|
||||||
.BR password ,
|
|
||||||
and
|
|
||||||
.BR ipmi *
|
|
||||||
values).
|
|
||||||
A type of
|
|
||||||
.RB `` exec ''
|
.RB `` exec ''
|
||||||
should be used for command invocations (perhaps also set the
|
should be used for command invocations (perhaps also set the
|
||||||
.B exec
|
.B exec
|
||||||
value).
|
option), and the type
|
||||||
A type of
|
|
||||||
.RB `` host ''
|
.RB `` host ''
|
||||||
should be used for terminal servers and other TCP socket-based
|
should be used for terminal servers and other socket-based
|
||||||
interaction (also set the
|
interaction (also set the
|
||||||
.B host
|
.B host
|
||||||
and
|
and
|
||||||
.B port
|
.B port
|
||||||
values).
|
options).
|
||||||
A type of
|
|
||||||
.RB `` noop ''
|
|
||||||
should be used as a placeholder - it does nothing, ignores any
|
|
||||||
.B logfile
|
|
||||||
value and forces the
|
|
||||||
.B !nologin
|
|
||||||
option (so you might want to set the
|
|
||||||
.B motd
|
|
||||||
value).
|
|
||||||
A type of
|
|
||||||
.RB `` uds ''
|
|
||||||
should be used for Unix domain sockets (also set the
|
|
||||||
.B uds
|
|
||||||
option).
|
|
||||||
.TP
|
|
||||||
\f3uds\fP \f2filename\fP
|
|
||||||
.br
|
|
||||||
Assign the Unix domain socket
|
|
||||||
.I filename
|
|
||||||
as the path to the console.
|
|
||||||
Only consoles of type ``uds'' will use this value.
|
|
||||||
.TP
|
|
||||||
\f3udssubst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
|
||||||
.br
|
|
||||||
Perform character substitutions on the
|
|
||||||
.B uds
|
|
||||||
value.
|
|
||||||
See the
|
|
||||||
.B devicesubst
|
|
||||||
option for an explanation of the format string.
|
|
||||||
If the null string (``\f3""\fP'') is used, no replacements will be done.
|
|
||||||
.TP
|
|
||||||
\f3username\fP \f2username\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Use
|
|
||||||
.I username
|
|
||||||
during IPMI authentication.
|
|
||||||
If the null string (``\f3""\fP'') is used (the default), the ``null'' user will be used.
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\f3group\fP \f2name\fP
|
\f3group\fP \f2name\fP
|
||||||
.br
|
.br
|
||||||
Define a user group identified as
|
Define a user group identified as
|
||||||
.IR name .
|
.I name
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
\f3users\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP
|
\f3users\fP [\f3!\fP]\f2username\fP[\f3,\fP...]|\f3""\fP
|
||||||
@ -1322,74 +983,6 @@ will be recorded with (or without, if prefixed with `!') access.
|
|||||||
If the null string (``\f3""\fP'') is used, any
|
If the null string (``\f3""\fP'') is used, any
|
||||||
users previously defined for this group are removed.
|
users previously defined for this group are removed.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
|
||||||
\f3task\fP \f2c\fP
|
|
||||||
.br
|
|
||||||
Define a task where
|
|
||||||
.I c
|
|
||||||
is a lowercase alphanumeric (0-9a-z).
|
|
||||||
Tasks are invoked via the
|
|
||||||
.RI ``^Ec! c ''
|
|
||||||
client escape sequence.
|
|
||||||
.RS
|
|
||||||
.TP
|
|
||||||
\f3cmd\fP \f2command\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Invoke
|
|
||||||
.I command
|
|
||||||
on the server when instructed by the client.
|
|
||||||
All file descriptors are closed, except for stderr (which is inherited from
|
|
||||||
the server).
|
|
||||||
The
|
|
||||||
.I command
|
|
||||||
is passed as an argument to ``/bin/sh -ce'' and is a ``fire and forget''
|
|
||||||
methodology (you need to check logs for any issues).
|
|
||||||
If the null string (``\f3""\fP'') is used, the entire task definition is ignored.
|
|
||||||
.TP
|
|
||||||
\f3confirm\fP \f3yes\fP|\f3true\fP|\f3on\fP|\f3no\fP|\f3false\fP|\f3off\fP
|
|
||||||
.br
|
|
||||||
Set whether or not to ask the client for confirmation before invoking the task.
|
|
||||||
The default is ``no''.
|
|
||||||
.TP
|
|
||||||
\f3description\fP \f2string\fP
|
|
||||||
.br
|
|
||||||
Set a description for the task. When a client lists tasks,
|
|
||||||
.I string
|
|
||||||
will be printed instead of the command defined above.
|
|
||||||
If the null string (``\f3""\fP'') is used, the command defined above will
|
|
||||||
be printed.
|
|
||||||
.TP
|
|
||||||
\f3runas\fP [\f2user\fP][:\f2group\fP]|\f3""\fP
|
|
||||||
.br
|
|
||||||
By default, the command invoked by
|
|
||||||
.B cmd
|
|
||||||
is run with the same privileges as the server.
|
|
||||||
If the server is running with root privileges, this option resets the user
|
|
||||||
and/or group of the invoked process to
|
|
||||||
.I user
|
|
||||||
and
|
|
||||||
.I group
|
|
||||||
respectively.
|
|
||||||
.I user
|
|
||||||
may be a username or numeric uid and
|
|
||||||
.I group
|
|
||||||
may be a group name or numeric gid.
|
|
||||||
Either one is optional.
|
|
||||||
If the server is not running with root privileges, these values
|
|
||||||
are not used.
|
|
||||||
If the null string (``\f3""\fP'') is specified, the default of running
|
|
||||||
with the same privileges as the server is restored.
|
|
||||||
.TP
|
|
||||||
\f3subst\fP \f2c\fP\f3=\fP\f2t\fP[\f2n\fP]\f2f\fP[\f3,\fP...]|\f3""\fP
|
|
||||||
.br
|
|
||||||
Perform character substitutions on the
|
|
||||||
.B cmd
|
|
||||||
value.
|
|
||||||
See the
|
|
||||||
.B devicesubst
|
|
||||||
option for an explanation of the format string.
|
|
||||||
If the null string (``\f3""\fP'') is used, no replacements will be done.
|
|
||||||
.RE
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
Bryan Stansell, conserver.com
|
Bryan Stansell, conserver.com
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
@ -1,4 +1,5 @@
|
|||||||
.TH CONSERVER.PASSWD 5 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
.\" $Id: conserver.passwd.man,v 1.10 2004/01/08 16:12:33 bryan Exp $
|
||||||
|
.TH CONSERVER.PASSWD 5 "2004/01/08" "conserver-8.1.7" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver.passwd \- user access information for
|
conserver.passwd \- user access information for
|
||||||
.BR conserver (8)
|
.BR conserver (8)
|
@ -1,4 +1,5 @@
|
|||||||
%!PS-Adobe-2.0 EPSF-1.2
|
%!PS-Adobe-2.0 EPSF-1.2
|
||||||
|
%%$Id: label.ps,v 1.1 2003/11/04 02:36:26 bryan Exp $
|
||||||
%%Title: RJ-11
|
%%Title: RJ-11
|
||||||
%%Creator: A Braunsdorf
|
%%Creator: A Braunsdorf
|
||||||
%%CreationDate:
|
%%CreationDate:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# dummy conserver config file
|
# dummy conserver config file
|
||||||
#
|
#
|
||||||
|
# $Id: test.cf,v 1.2 2003/07/04 18:04:05 bryan Exp $
|
||||||
|
#
|
||||||
default full {
|
default full {
|
||||||
rw *;
|
rw *;
|
||||||
}
|
}
|
||||||
|
274
conserver.html
Normal file
274
conserver.html
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
|
||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<META name="generator" content=
|
||||||
|
"HTML Tidy for Solaris (vers 1st May 2002), see www.w3.org">
|
||||||
|
<META name="keywords" content=
|
||||||
|
"conserver,serial,console,serial console,unix,tty,ttya,ttyb, rs-232,rs232,bryan stansell,stansell,console server,terminal server,headless">
|
||||||
|
<META name="author" content=
|
||||||
|
"Bryan Stansell <bryan@conserver.com>">
|
||||||
|
<LINK rel="SHORTCUT ICON" href="conserver.ico">
|
||||||
|
<LINK rel="icon" href="conserver.ico">
|
||||||
|
|
||||||
|
<TITLE>Conserver</TITLE>
|
||||||
|
|
||||||
|
<STYLE type="text/css">
|
||||||
|
body {
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</STYLE>
|
||||||
|
</HEAD>
|
||||||
|
|
||||||
|
<BODY>
|
||||||
|
<TABLE summary="Logo" bgcolor="black" width="100%" align=
|
||||||
|
"center">
|
||||||
|
<TR>
|
||||||
|
<TD align="center"><IMG src="conserver.jpg" alt=
|
||||||
|
"Conserver"><BR>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TABLE>
|
||||||
|
|
||||||
|
<TABLE summary="Conserver Page" width="80%" align="center">
|
||||||
|
<TR>
|
||||||
|
<TD colspan="2" align="center">Please pick your closest
|
||||||
|
mirror: <A href=
|
||||||
|
"http://planetmirror.com/pub/conserver/">Australia</A>
|
||||||
|
<A href="http://conserver.syr.edu/">US-East</A>
|
||||||
|
<A href="http://www.conserver.com/">US-West
|
||||||
|
(Primary)</A><BR>
|
||||||
|
<BR>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
|
||||||
|
<TR>
|
||||||
|
<TD>
|
||||||
|
<!-- empty cell here, then search box on right spans two rows,
|
||||||
|
then we have the text that appears on the left, so things
|
||||||
|
appear in the right order so they look right in lynx
|
||||||
|
-->
|
||||||
|
</TD>
|
||||||
|
|
||||||
|
<TD rowspan="2" 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="conserver.com">
|
||||||
|
<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>
|
||||||
|
<H3>What is conserver?</H3>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
|
||||||
|
<TR>
|
||||||
|
<TD colspan="2">
|
||||||
|
<P>From an email I once sent...</P>
|
||||||
|
|
||||||
|
<P>Conserver is an application that allows multiple users
|
||||||
|
to watch a serial console at the same time. It can log
|
||||||
|
the data, allows users to take write-access of a console
|
||||||
|
(one at a time), and has a variety of bells and whistles
|
||||||
|
to accentuate that basic functionality. The idea is that
|
||||||
|
conserver will log all your serial traffic so you can go
|
||||||
|
back and review why something crashed, look at changes
|
||||||
|
(if done on the console), or tie the console logs into a
|
||||||
|
monitoring system (just watch the logfiles it creates).
|
||||||
|
With multi-user capabilities you can work on equipment
|
||||||
|
with others, mentor, train, etc. It also does all that
|
||||||
|
client-server stuff so that, assuming you have a network
|
||||||
|
connection, you can interact with any of the equipment
|
||||||
|
from home or wherever.</P>
|
||||||
|
|
||||||
|
<H3>The FAQ</H3>
|
||||||
|
Here's the conserver <A href="FAQ">FAQ</A>. Got any
|
||||||
|
additions? Let me know.
|
||||||
|
|
||||||
|
<H3>Mailing Lists</H3>
|
||||||
|
|
||||||
|
<P>There are currently two mailing lists available. <A
|
||||||
|
href=
|
||||||
|
"mailto:announce@conserver.com">announce@conserver.com</A>
|
||||||
|
is an announcement-only mailing list for informing of new
|
||||||
|
versions, major developments, etc. <A href=
|
||||||
|
"mailto:users@conserver.com">users@conserver.com</A> is
|
||||||
|
for general Q&A, discussions, ideas, etc. for
|
||||||
|
conserver users. You can sign up by sending a message to
|
||||||
|
<A href=
|
||||||
|
"mailto:announce-request@conserver.com">announce-request@conserver.com</A>
|
||||||
|
or <A href=
|
||||||
|
"mailto:users-request@conserver.com">users-request@conserver.com</A>
|
||||||
|
with a subject of "subscribe" or head over to the online
|
||||||
|
<A href="https://www.conserver.com/mailman/listinfo">web
|
||||||
|
pages</A>.</P>
|
||||||
|
|
||||||
|
<H3>Origin</H3>
|
||||||
|
|
||||||
|
<P>The console server software found here is a heavily
|
||||||
|
modified version originally written by <A href=
|
||||||
|
"http://hea-www.harvard.edu/~fine/">Tom Fine</A> (<A
|
||||||
|
href=
|
||||||
|
"mailto:fine@head-cfa.harvard.edu">fine@head-cfa.harvard.edu</A>)
|
||||||
|
at <A href="http://www.ohio-state.edu/">Ohio State</A>
|
||||||
|
and then Kevin S Braunsdorf (<A href=
|
||||||
|
"mailto:ksb+conserver@sa.fedex.com">ksb+conserver@sa.fedex.com</A>)
|
||||||
|
at <A href="http://www.purdue.edu/">Purdue
|
||||||
|
University</A>. Patches from Robert Olson (<A href=
|
||||||
|
"mailto:olson@mcs.anl.gov">olson@mcs.anl.gov</A>) at <A
|
||||||
|
href="http://www.anl.gov/">Argonne National
|
||||||
|
Laboratory</A> were then applied to get network console
|
||||||
|
support.</P>
|
||||||
|
|
||||||
|
<P>Arnold de Leon (<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, continued fixing things, and added
|
||||||
|
features we found useful.</P>
|
||||||
|
|
||||||
|
<P><A href="http://www.gnac.com/">GNAC</A> (Global
|
||||||
|
Networking and Computing - currently <A href=
|
||||||
|
"http://www.certaintysolutions.com/">Certainty
|
||||||
|
Solutions</A>) has been supporting my coding efforts (in
|
||||||
|
too many ways to list) since 1996.</P>
|
||||||
|
|
||||||
|
<H3>The conserver.com Distribution</H3>
|
||||||
|
|
||||||
|
<P>The result is a combination of many people's work.
|
||||||
|
This version is being released in hopes that it will help
|
||||||
|
others. There is no warranty or support implied by the
|
||||||
|
distribution of the software.</P>
|
||||||
|
|
||||||
|
<P>So, what the heck is up with all the different
|
||||||
|
conserver versions? Well, the original authors are
|
||||||
|
continuing to distribute their own threads of the
|
||||||
|
software so you have three main threads (as far as I
|
||||||
|
know). First, there's Tom Fine's thread at <A href=
|
||||||
|
"http://hea-www.harvard.edu/~fine/Tech/console-server.html">
|
||||||
|
http://hea-www.harvard.edu/~fine/Tech/console-server.html</A>.
|
||||||
|
He isn't actively developing it, however, according to
|
||||||
|
the website. Next, there's Kevin Braunsdorf's version at
|
||||||
|
<A href=
|
||||||
|
"ftp://ftp.physics.purdue.edu/pub/pundits/">ftp://ftp.physics.purdue.edu/pub/pundits/</A>.
|
||||||
|
It doesn't look like Kevin is working on his thread ony
|
||||||
|
more either. No new versions have been out since August
|
||||||
|
2000 (version 8.5), but maybe this info will be out of
|
||||||
|
date by the time you read this (I last checked Feb 10,
|
||||||
|
2004). Lastly, the conserver.com version is based on
|
||||||
|
Kevin's "5.21-Beta" distribution, but since
|
||||||
|
<B>HEAVILY</B> modified and enhanced (more details in the
|
||||||
|
"Origin" section above).</P>
|
||||||
|
|
||||||
|
<P>If I were looking for a conserver package I would
|
||||||
|
definitely use the conserver.com distribution. Why? It's
|
||||||
|
actively maintained, has many more features than the
|
||||||
|
other versions (see <A href="CHANGES">CHANGES</A> for a
|
||||||
|
semi-scary history), and has an active user community.
|
||||||
|
Kevin's version does have UPS support (basic serial port
|
||||||
|
line toggling bits) which is missing in the conserver.com
|
||||||
|
version, but no one has asked me for it, so does anyone
|
||||||
|
actually need it?</P>
|
||||||
|
|
||||||
|
<H3>Downloading</H3>
|
||||||
|
|
||||||
|
<P>The current version, released on May 28, 2004, is <A
|
||||||
|
href="8.1.7.tar.gz">8.1.7.tar.gz</A>. You can get it via
|
||||||
|
<A href=
|
||||||
|
"ftp://ftp.conserver.com/conserver/8.1.7.tar.gz">FTP</A>
|
||||||
|
or <A href="8.1.7.tar.gz">HTTP</A>. See the <A href=
|
||||||
|
"CHANGES">CHANGES</A> file for information on the latest
|
||||||
|
updates.</P>
|
||||||
|
|
||||||
|
<P>As of version 6.1.7, the packaging and numbering
|
||||||
|
scheme has changed. I used to package conserver as
|
||||||
|
conserver-GNAC-v.vv. Since <A href=
|
||||||
|
"http://www.gnac.com/">GNAC</A> (now <A href=
|
||||||
|
"http://www.certaintysolutions.com/">Certainty
|
||||||
|
Solutions</A>) has changed its name I've decided to drop
|
||||||
|
the GNAC portion and use a three-digit version number
|
||||||
|
(conserver-v.v.v). Why change the version numbering? I
|
||||||
|
need to differentiate this thread of the code from the
|
||||||
|
original authors' and I couldn't come up with a good
|
||||||
|
replacement for the GNAC name - sad, but true.</P>
|
||||||
|
|
||||||
|
<H3>Installation</H3>
|
||||||
|
|
||||||
|
<P>Check the <A href="INSTALL">INSTALL</A> file for
|
||||||
|
instructions.</P>
|
||||||
|
|
||||||
|
<H3>Online Documentation</H3>
|
||||||
|
|
||||||
|
<P>I've put a small set of documentation <A href=
|
||||||
|
"docs/">here</A>. I'm hoping to expand it over time.</P>
|
||||||
|
|
||||||
|
<H3>Systems Tested</H3>
|
||||||
|
|
||||||
|
<P>Here's a list of systems that I've been told can
|
||||||
|
successfully compile conserver. If anyone has more to add
|
||||||
|
to this list (or something on the list doesn't work any
|
||||||
|
more), please let me know.</P>
|
||||||
|
|
||||||
|
<UL>
|
||||||
|
<LI>AIX 4.3.3/5.1/5.2, native cc</LI>
|
||||||
|
|
||||||
|
<LI>BSDI BSD/OS 3.X, gcc</LI>
|
||||||
|
|
||||||
|
<LI>Cygwin (w2k),gcc 2.95.3</LI>
|
||||||
|
|
||||||
|
<LI>DEC Tru64 4.0, gcc</LI>
|
||||||
|
|
||||||
|
<LI>DEC Tru64 4.0/5.1, native cc</LI>
|
||||||
|
|
||||||
|
<LI>FreeBSD 4.2/4.8/5.1 (x86), gcc</LI>
|
||||||
|
|
||||||
|
<LI>HP-UX 10.20, gcc</LI>
|
||||||
|
|
||||||
|
<LI>HP-UX 11.10 parisc and ia64, native cc</LI>
|
||||||
|
|
||||||
|
<LI>Irix 6.15, native cc</LI>
|
||||||
|
|
||||||
|
<LI>Linux 2.2.18 (x86), gcc</LI>
|
||||||
|
|
||||||
|
<LI>Linux 2.4.2 (x86), gcc</LI>
|
||||||
|
|
||||||
|
<LI>Linux ia64, native gcc</LI>
|
||||||
|
|
||||||
|
<LI>Linux RedHat 6.2 and 7.2 (x86), native gcc</LI>
|
||||||
|
|
||||||
|
<LI>MacOS X, native gcc</LI>
|
||||||
|
|
||||||
|
<LI>Solaris 2.5.1 thru 9 (sparc/x86), gcc</LI>
|
||||||
|
|
||||||
|
<LI>Solaris 7/8, native cc</LI>
|
||||||
|
</UL>
|
||||||
|
|
||||||
|
<H3>Other Good Information</H3>
|
||||||
|
|
||||||
|
<P>Zonker Harris has fabulous documents regarding the
|
||||||
|
hookup of consoles to terminal servers and other such
|
||||||
|
devices. His <A href="consoles/">Greater Scroll of
|
||||||
|
Console Knowledge</A> is a great place to start.</P>
|
||||||
|
<HR noshade>
|
||||||
|
|
||||||
|
<ADDRESS>
|
||||||
|
Bryan Stansell (<A href=
|
||||||
|
"mailto:bryan@conserver.com">bryan@conserver.com</A>)<BR>
|
||||||
|
|
||||||
|
</ADDRESS>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TABLE>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
|
|
@ -1,7 +1,5 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
@ -9,8 +7,6 @@ sbindir = @sbindir@
|
|||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
libdir = @libdir@
|
|
||||||
pkglibdir = $(libdir)/conserver
|
|
||||||
exampledir = $(datadir)/examples/conserver
|
exampledir = $(datadir)/examples/conserver
|
||||||
|
|
||||||
### Installation programs and flags
|
### Installation programs and flags
|
||||||
@ -64,10 +60,8 @@ install: conserver
|
|||||||
$(MKDIR) $(DESTDIR)$(sbindir)
|
$(MKDIR) $(DESTDIR)$(sbindir)
|
||||||
$(INSTALL_PROGRAM) conserver $(DESTDIR)$(sbindir)
|
$(INSTALL_PROGRAM) conserver $(DESTDIR)$(sbindir)
|
||||||
$(MKDIR) $(DESTDIR)$(mandir)/man8
|
$(MKDIR) $(DESTDIR)$(mandir)/man8
|
||||||
$(INSTALL) -m 0644 conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
$(INSTALL) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
||||||
$(MKDIR) $(DESTDIR)$(exampledir)
|
$(MKDIR) $(DESTDIR)$(exampledir)
|
||||||
$(INSTALL) conserver.rc $(DESTDIR)$(exampledir)
|
$(INSTALL) conserver.rc $(DESTDIR)$(exampledir)
|
||||||
$(MKDIR) $(DESTDIR)$(pkglibdir)
|
|
||||||
$(INSTALL) convert $(DESTDIR)$(pkglibdir)/convert
|
|
||||||
|
|
||||||
.PHONY: clean distclean install
|
.PHONY: clean distclean install
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# $Id: Sun-serial,v 1.1 2003/11/04 02:36:25 bryan Exp $
|
||||||
|
|
||||||
If you are going to be hooking Sun consoles to your console server, you
|
If you are going to be hooking Sun consoles to your console server, you
|
||||||
will run into a problem: The sun will halt whenever the cable is unplugged.
|
will run into a problem: The sun will halt whenever the cable is unplugged.
|
||||||
It will also halt when the the console server is powered off and on. To
|
It will also halt when the the console server is powered off and on. To
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: access.c,v 5.73 2004/05/23 16:44:25 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -42,12 +44,6 @@
|
|||||||
#include <readcfg.h>
|
#include <readcfg.h>
|
||||||
#include <main.h>
|
#include <main.h>
|
||||||
|
|
||||||
#if USE_IPV6
|
|
||||||
# include <net/if.h>
|
|
||||||
# include <ifaddrs.h>
|
|
||||||
# include <sys/socket.h>
|
|
||||||
# include <netdb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Compare an Internet address (IPv4 expected), with an address pattern
|
/* Compare an Internet address (IPv4 expected), with an address pattern
|
||||||
* passed as a character string representing an address in the Internet
|
* passed as a character string representing an address in the Internet
|
||||||
@ -62,7 +58,13 @@
|
|||||||
* Returns 0 if the addresses match, else returns 1.
|
* Returns 0 if the addresses match, else returns 1.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
#if PROTOTYPES
|
||||||
AddrCmp(struct in_addr *addr, char *pattern)
|
AddrCmp(struct in_addr *addr, char *pattern)
|
||||||
|
#else
|
||||||
|
AddrCmp(addr, pattern)
|
||||||
|
struct in_addr *addr;
|
||||||
|
char *pattern;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
in_addr_t hostaddr, pattern_addr, netmask;
|
in_addr_t hostaddr, pattern_addr, netmask;
|
||||||
char *p, *slash_posn;
|
char *p, *slash_posn;
|
||||||
@ -123,83 +125,28 @@ AddrCmp(struct in_addr *addr, 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(INADDR_STYPE *addr, char **peername)
|
#if PROTOTYPES
|
||||||
|
AccType(struct in_addr *addr, char **peername)
|
||||||
|
#else
|
||||||
|
AccType(addr, peername)
|
||||||
|
struct in_addr *addr;
|
||||||
|
char **peername;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
ACCESS *pACtmp;
|
ACCESS *pACtmp;
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
char ret;
|
|
||||||
#if USE_IPV6
|
|
||||||
int error;
|
|
||||||
char host[NI_MAXHOST];
|
|
||||||
char ipaddr[NI_MAXHOST];
|
|
||||||
#else
|
|
||||||
struct hostent *he = (struct hostent *)0;
|
struct hostent *he = (struct hostent *)0;
|
||||||
int a;
|
int a;
|
||||||
|
char ret;
|
||||||
#if TRUST_REVERSE_DNS
|
#if TRUST_REVERSE_DNS
|
||||||
char **revNames = (char **)0;
|
char **revNames = (char **)0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CONDDEBUG((1, "AccType(): ip=%s", inet_ntoa(*addr)));
|
CONDDEBUG((1, "AccType(): ip=%s", inet_ntoa(*addr)));
|
||||||
#endif /* USE_IPV6 */
|
|
||||||
|
|
||||||
ret = config->defaultaccess;
|
ret = config->defaultaccess;
|
||||||
so = sizeof(*addr);
|
so = sizeof(*addr);
|
||||||
|
|
||||||
#if USE_IPV6
|
|
||||||
/*
|
|
||||||
* XXX where is the TRUST_REVERSE_DNS support for IPv6???
|
|
||||||
*
|
|
||||||
* XXX IPv4 should use getnameinfo() et al as well
|
|
||||||
* (if available, they are in IEEE Std 1003.1g-2000)
|
|
||||||
*/
|
|
||||||
error =
|
|
||||||
getnameinfo((struct sockaddr *)addr, so, ipaddr, sizeof(ipaddr),
|
|
||||||
NULL, 0, NI_NUMERICHOST);
|
|
||||||
if (error) {
|
|
||||||
Error("AccType(): getnameinfo failed: %s", gai_strerror(error));
|
|
||||||
goto common_ret;
|
|
||||||
}
|
|
||||||
CONDDEBUG((1, "AccType(): ip=%s (%s)", ipaddr,
|
|
||||||
addr->ss_family == AF_UNSPEC ? "AF_UNSPEC" :
|
|
||||||
addr->ss_family == AF_LOCAL ? "AF_LOCAL" :
|
|
||||||
addr->ss_family == AF_INET ? "AF_INET" :
|
|
||||||
addr->ss_family == AF_INET6 ? "AF_INET6" : "IF_???"));
|
|
||||||
|
|
||||||
error =
|
|
||||||
getnameinfo((struct sockaddr *)addr, so, host, sizeof(host), NULL,
|
|
||||||
0, 0);
|
|
||||||
if (!error)
|
|
||||||
CONDDEBUG((1, "AccType(): host=%s", host));
|
|
||||||
|
|
||||||
for (pACtmp = pACList; pACtmp != (ACCESS *)0; pACtmp = pACtmp->pACnext) {
|
|
||||||
CONDDEBUG((1, "AccType(): who=%s, trust=%c", pACtmp->pcwho,
|
|
||||||
pACtmp->ctrust));
|
|
||||||
if (addr->ss_family == AF_INET && pACtmp->isCIDR != 0) {
|
|
||||||
if (AddrCmp
|
|
||||||
(&(((struct sockaddr_in *)addr)->sin_addr),
|
|
||||||
pACtmp->pcwho) == 0) {
|
|
||||||
ret = pACtmp->ctrust;
|
|
||||||
goto common_ret;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr(ipaddr, pACtmp->pcwho) != NULL) {
|
|
||||||
CONDDEBUG((1, "AccType(): match for ip=%s", ipaddr));
|
|
||||||
ret = pACtmp->ctrust;
|
|
||||||
goto common_ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!error && strstr(host, pACtmp->pcwho) != NULL) {
|
|
||||||
CONDDEBUG((1, "AccType(): match for host=%s", host));
|
|
||||||
ret = pACtmp->ctrust;
|
|
||||||
goto common_ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
common_ret:
|
|
||||||
if (config->loghostnames == FLAGTRUE && !error)
|
|
||||||
*peername = StrDup(host);
|
|
||||||
#else /* !USE_IPV6 */
|
|
||||||
#if TRUST_REVERSE_DNS
|
#if TRUST_REVERSE_DNS
|
||||||
/* if we trust reverse dns, we get the names associated with
|
/* if we trust reverse dns, we get the names associated with
|
||||||
* the address we're checking and then check each of those
|
* the address we're checking and then check each of those
|
||||||
@ -322,25 +269,19 @@ AccType(INADDR_STYPE *addr, char **peername)
|
|||||||
free(revNames);
|
free(revNames);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* USE_IPV6 */
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SetDefAccess(
|
#if PROTOTYPES
|
||||||
#if USE_IPV6
|
SetDefAccess(struct in_addr *pAddr, char *pHost)
|
||||||
void
|
|
||||||
#else
|
#else
|
||||||
struct in_addr *pAddr, char *pHost
|
SetDefAccess(pAddr, pHost)
|
||||||
|
struct in_addr *pAddr;
|
||||||
|
char *pHost;
|
||||||
#endif
|
#endif
|
||||||
)
|
|
||||||
{
|
{
|
||||||
ACCESS *a;
|
ACCESS *a;
|
||||||
#if USE_IPV6
|
|
||||||
int error;
|
|
||||||
char addr[NI_MAXHOST];
|
|
||||||
struct ifaddrs *myAddrs, *ifa;
|
|
||||||
#endif /* USE_IPV6 */
|
|
||||||
|
|
||||||
while (pACList != (ACCESS *)0) {
|
while (pACList != (ACCESS *)0) {
|
||||||
a = pACList->pACnext;
|
a = pACList->pACnext;
|
||||||
@ -348,44 +289,12 @@ SetDefAccess(
|
|||||||
pACList = a;
|
pACList = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_IPV6
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
/* get list of all addresses on system */
|
|
||||||
error = getifaddrs(&myAddrs);
|
|
||||||
if (error) {
|
|
||||||
Error("SetDefAccess(): getifaddrs: %s", strerror(errno));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ifa = myAddrs; ifa != NULL; ifa = ifa->ifa_next) {
|
|
||||||
/* skip interfaces without address or in down state */
|
|
||||||
if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
error =
|
|
||||||
getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_storage),
|
|
||||||
addr, sizeof(addr), NULL, 0, NI_NUMERICHOST);
|
|
||||||
if (error)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ((a = (ACCESS *)calloc(1, sizeof(ACCESS))) == (ACCESS *)0)
|
|
||||||
OutOfMem();
|
|
||||||
if ((a->pcwho = StrDup(addr)) == (char *)0)
|
|
||||||
OutOfMem();
|
|
||||||
|
|
||||||
a->ctrust = config->defaultaccess;
|
|
||||||
a->pACnext = pACList;
|
|
||||||
pACList = a;
|
|
||||||
|
|
||||||
CONDDEBUG((1, "SetDefAccess(): trust=%c, who=%s", pACList->ctrust,
|
|
||||||
pACList->pcwho));
|
|
||||||
}
|
|
||||||
freeifaddrs(myAddrs);
|
|
||||||
#elif USE_UNIX_DOMAIN_SOCKETS
|
|
||||||
if ((pACList = (ACCESS *)calloc(1, sizeof(ACCESS))) == (ACCESS *)0)
|
if ((pACList = (ACCESS *)calloc(1, sizeof(ACCESS))) == (ACCESS *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
if ((pACList->pcwho = StrDup("127.0.0.1")) == (char *)0)
|
if ((pACList->pcwho = StrDup("127.0.0.1")) == (char *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
pACList->ctrust = config->defaultaccess;
|
pACList->ctrust = 'a';
|
||||||
CONDDEBUG((1, "SetDefAccess(): trust=%c, who=%s", pACList->ctrust,
|
CONDDEBUG((1, "SetDefAccess(): trust=%c, who=%s", pACList->ctrust,
|
||||||
pACList->pcwho));
|
pACList->pcwho));
|
||||||
#else
|
#else
|
||||||
@ -397,7 +306,7 @@ SetDefAccess(
|
|||||||
OutOfMem();
|
OutOfMem();
|
||||||
if ((a->pcwho = StrDup(addr)) == (char *)0)
|
if ((a->pcwho = StrDup(addr)) == (char *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
a->ctrust = config->defaultaccess;
|
a->ctrust = 'a';
|
||||||
a->pACnext = pACList;
|
a->pACnext = pACList;
|
||||||
pACList = a;
|
pACList = a;
|
||||||
|
|
||||||
@ -409,7 +318,12 @@ SetDefAccess(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
DestroyAccessList(ACCESS *pACList)
|
DestroyAccessList(ACCESS *pACList)
|
||||||
|
#else
|
||||||
|
DestroyAccessList(pACList)
|
||||||
|
ACCESS *pACList;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (pACList == (ACCESS *)0)
|
if (pACList == (ACCESS *)0)
|
||||||
return;
|
return;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: access.h,v 5.26 2003/08/10 18:11:20 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -42,12 +44,6 @@ typedef struct access {
|
|||||||
struct access *pACnext; /* next access list */
|
struct access *pACnext; /* next access list */
|
||||||
} ACCESS;
|
} ACCESS;
|
||||||
|
|
||||||
extern char AccType(INADDR_STYPE *, char **);
|
extern char AccType PARAMS((struct in_addr *, char **));
|
||||||
extern void SetDefAccess(
|
extern void SetDefAccess PARAMS((struct in_addr *, char *));
|
||||||
#if USE_IPV6
|
extern void DestroyAccessList PARAMS((ACCESS *));
|
||||||
void
|
|
||||||
#else
|
|
||||||
struct in_addr *, char *
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
extern void DestroyAccessList(ACCESS *);
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: client.c,v 5.84 2004/05/28 16:39:51 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -39,12 +41,6 @@
|
|||||||
#include <access.h>
|
#include <access.h>
|
||||||
#include <client.h>
|
#include <client.h>
|
||||||
#include <group.h>
|
#include <group.h>
|
||||||
#include <readcfg.h>
|
|
||||||
|
|
||||||
#if USE_IPV6
|
|
||||||
# include <sys/socket.h>
|
|
||||||
# include <netdb.h>
|
|
||||||
#endif /* USE_IPV6 */
|
|
||||||
|
|
||||||
#if defined(USE_LIBWRAP)
|
#if defined(USE_LIBWRAP)
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
@ -57,171 +53,214 @@ int deny_severity = LOG_WARNING;
|
|||||||
/* find the next guy who wants to write on the console (ksb)
|
/* find the next guy who wants to write on the console (ksb)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
FindWrite(CONSENT *pCE)
|
FindWrite(CONSENT *pCE)
|
||||||
|
#else
|
||||||
|
FindWrite(pCE)
|
||||||
|
CONSENT *pCE;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONSCLIENT *pCLfound = (CONSCLIENT *)0;
|
|
||||||
CONSCLIENT *pCL;
|
CONSCLIENT *pCL;
|
||||||
|
|
||||||
/* make the first guy (last on the list) to have the `want write' bit set
|
/* make the first guy to have the `want write' bit set the writer
|
||||||
* the writer (tell him of the promotion, too) we could look for the most
|
* (tell him of the promotion, too) we could look for the
|
||||||
* recent or some such... I guess it doesn't matter that much.
|
* most recent or some such... I guess it doesn't matter that
|
||||||
|
* much.
|
||||||
*/
|
*/
|
||||||
if (pCE->pCLwr != (CONSCLIENT *)0 || pCE->fronly)
|
if (pCE->pCLwr != (CONSCLIENT *)0 || pCE->fronly ||
|
||||||
|
!(pCE->fup && pCE->ioState == ISNORMAL &&
|
||||||
|
pCE->initfile == (CONSFILE *)0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (pCL = pCE->pCLon; (CONSCLIENT *)0 != pCL; pCL = pCL->pCLnext) {
|
for (pCL = pCE->pCLon; (CONSCLIENT *)0 != pCL; pCL = pCL->pCLnext) {
|
||||||
if (pCL->fwantwr && !pCL->fro)
|
if (!pCL->fwantwr || pCL->fro)
|
||||||
pCLfound = pCL;
|
continue;
|
||||||
}
|
pCL->fwantwr = 0;
|
||||||
|
pCL->fwr = 1;
|
||||||
if (pCLfound != (CONSCLIENT *)0) {
|
|
||||||
pCLfound->fwantwr = 0;
|
|
||||||
pCLfound->fwr = 1;
|
|
||||||
if (pCE->nolog) {
|
if (pCE->nolog) {
|
||||||
FileWrite(pCLfound->fd, FLAGFALSE,
|
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached (nologging)]\r\n",
|
||||||
"\r\n[attached (nologging)]\r\n", -1);
|
-1);
|
||||||
} else {
|
} else {
|
||||||
FileWrite(pCLfound->fd, FLAGFALSE, "\r\n[attached]\r\n", -1);
|
FileWrite(pCL->fd, FLAGFALSE, "\r\n[attached]\r\n", -1);
|
||||||
}
|
}
|
||||||
TagLogfileAct(pCE, "%s attached", pCLfound->acid->string);
|
TagLogfileAct(pCE, "%s attached", pCL->acid->string);
|
||||||
pCE->pCLwr = pCLfound;
|
pCE->pCLwr = pCL;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
BumpClient(CONSENT *pCE, char *message)
|
|
||||||
{
|
|
||||||
if ((CONSCLIENT *)0 == pCE->pCLwr)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if ((char *)0 != message)
|
|
||||||
FileWrite(pCE->pCLwr->fd, FLAGFALSE, message, -1);
|
|
||||||
pCE->pCLwr->fwantwr = 0;
|
|
||||||
pCE->pCLwr->fwr = 0;
|
|
||||||
pCE->pCLwr = (CONSCLIENT *)0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* replay last 'back' lines of the log file upon connect to console (ksb)
|
/* replay last iBack lines of the log file upon connect to console (ksb)
|
||||||
*
|
*
|
||||||
* NB: we know the console might be spewing when the replay happens,
|
* NB: we know the console might be spewing when the replay happens,
|
||||||
* we want to just output what is in the log file and get out,
|
* we want to just output what is in the log file and get out,
|
||||||
* so we don't drop chars...
|
* so we don't drop chars...
|
||||||
*/
|
*/
|
||||||
#define REPLAYBUFFER 4096
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Replay(CONSENT *pCE, CONSFILE *fdOut, unsigned short back)
|
#if PROTOTYPES
|
||||||
|
Replay(CONSENT *pCE, CONSFILE *fdOut, int iBack)
|
||||||
|
#else
|
||||||
|
Replay(pCE, fdOut, iBack)
|
||||||
|
CONSENT *pCE;
|
||||||
|
CONSFILE *fdOut;
|
||||||
|
int iBack;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONSFILE *fdLog = (CONSFILE *)0;
|
CONSFILE *fdLog = (CONSFILE *)0;
|
||||||
STRING *line = (STRING *)0;
|
|
||||||
off_t file_pos;
|
off_t file_pos;
|
||||||
off_t buf_pos;
|
off_t buf_pos;
|
||||||
char *buf = (char *)0;
|
char *buf;
|
||||||
char *bp = (char *)0;
|
char *bp = (char *)0;
|
||||||
|
char *s;
|
||||||
|
int r;
|
||||||
int ch;
|
int ch;
|
||||||
struct stat stLog;
|
struct stat stLog;
|
||||||
|
struct lines {
|
||||||
|
int is_mark;
|
||||||
|
STRING *line;
|
||||||
|
STRING *mark_end;
|
||||||
|
} *lines;
|
||||||
|
int n_lines;
|
||||||
int ln;
|
int ln;
|
||||||
int was_mark = 0;
|
int i;
|
||||||
|
int j;
|
||||||
|
int u;
|
||||||
|
int is_mark;
|
||||||
|
char dummy[4];
|
||||||
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
||||||
unsigned long dmallocMarkReplay = 0;
|
unsigned long dmallocMarkReplay = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pCE != (CONSENT *)0 && pCE->logfile != (char *)0)
|
if (pCE != (CONSENT *)0) {
|
||||||
|
fdLog = pCE->fdlog;
|
||||||
|
|
||||||
|
/* no logfile and down and logfile defined? try and open it */
|
||||||
|
if (fdLog == (CONSFILE *)0 && !pCE->fup &&
|
||||||
|
pCE->logfile != (char *)0)
|
||||||
fdLog = FileOpen(pCE->logfile, O_RDONLY, 0644);
|
fdLog = FileOpen(pCE->logfile, O_RDONLY, 0644);
|
||||||
|
}
|
||||||
|
|
||||||
if (fdLog == (CONSFILE *)0) {
|
if (fdLog == (CONSFILE *)0) {
|
||||||
FileWrite(fdOut, FLAGFALSE, "[no log file on this console]\r\n",
|
FileWrite(fdOut, FLAGFALSE, "[no log file on this console]\r\n",
|
||||||
-1);
|
-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* find the size of the file
|
||||||
|
*/
|
||||||
|
if (0 != FileStat(fdLog, &stLog)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
||||||
dmallocMarkReplay = dmalloc_mark();
|
dmallocMarkReplay = dmalloc_mark();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* find the size of the file
|
file_pos = stLog.st_size - 1;
|
||||||
*/
|
|
||||||
if (0 != FileStat(fdLog, &stLog))
|
|
||||||
goto common_exit;
|
|
||||||
|
|
||||||
file_pos = stLog.st_size - 1; /* point at last byte */
|
|
||||||
buf_pos = file_pos + 1;
|
buf_pos = file_pos + 1;
|
||||||
|
|
||||||
if ((char *)0 == (buf = malloc(REPLAYBUFFER)))
|
/* get space for the line information and initialize it
|
||||||
|
*
|
||||||
|
* we allocate room for one more line than requested to be able to
|
||||||
|
* do the mark ranges
|
||||||
|
*/
|
||||||
|
if ((char *)0 == (buf = malloc(BUFSIZ))) {
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
bp = buf + 1; /* just give it something - it resets below */
|
}
|
||||||
|
n_lines = iBack + 1;
|
||||||
line = AllocString();
|
lines = (struct lines *)calloc(n_lines, sizeof(*lines));
|
||||||
|
if ((struct lines *)0 == lines) {
|
||||||
|
OutOfMem();
|
||||||
|
}
|
||||||
|
for (i = 0; i < n_lines; i++) {
|
||||||
|
lines[i].mark_end = AllocString();
|
||||||
|
lines[i].line = AllocString();
|
||||||
|
}
|
||||||
|
ln = -1;
|
||||||
|
|
||||||
/* loop as long as there is data in the file or we have not found
|
/* loop as long as there is data in the file or we have not found
|
||||||
* the requested number of lines
|
* the requested number of lines
|
||||||
*/
|
*/
|
||||||
ln = -1;
|
while (file_pos >= 0) {
|
||||||
for (; file_pos >= 0; file_pos--, bp--) {
|
|
||||||
if (file_pos < buf_pos) {
|
if (file_pos < buf_pos) {
|
||||||
int r;
|
|
||||||
|
|
||||||
/* read one buffer worth of data a buffer boundary
|
/* read one buffer worth of data a buffer boundary
|
||||||
*
|
*
|
||||||
* the first read will probably not get a full buffer but
|
* the first read will probably not get a full buffer but
|
||||||
* the rest (as we work our way back in the file) should be
|
* the rest (as we work our way back in the file) should be
|
||||||
*/
|
*/
|
||||||
buf_pos = (file_pos / REPLAYBUFFER) * REPLAYBUFFER;
|
buf_pos = (file_pos / BUFSIZ) * BUFSIZ;
|
||||||
if (FileSeek(fdLog, buf_pos, SEEK_SET) < 0) {
|
if (FileSeek(fdLog, buf_pos, SEEK_SET) < 0) {
|
||||||
goto common_exit;
|
goto common_exit;
|
||||||
}
|
}
|
||||||
if ((r = FileRead(fdLog, buf, REPLAYBUFFER)) < 0) {
|
if ((r = FileRead(fdLog, buf, BUFSIZ)) < 0) {
|
||||||
goto common_exit;
|
goto common_exit;
|
||||||
}
|
}
|
||||||
bp = buf + r - 1;
|
bp = buf + r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process the next character
|
/* process the next character
|
||||||
*/
|
*/
|
||||||
if ((ch = *bp) == '\n') {
|
--file_pos;
|
||||||
|
if ((ch = *--bp) == '\n') {
|
||||||
if (ln >= 0) {
|
if (ln >= 0) {
|
||||||
int i;
|
|
||||||
int u;
|
|
||||||
int is_mark = 0;
|
|
||||||
|
|
||||||
/* reverse the text to put it in forward order
|
/* reverse the text to put it in forward order
|
||||||
*/
|
*/
|
||||||
u = line->used - 1;
|
u = lines[ln].line->used - 1;
|
||||||
for (i = 0; i < u / 2; i++) {
|
for (i = 0; i < u / 2; i++) {
|
||||||
int temp;
|
int temp;
|
||||||
|
|
||||||
temp = line->string[i];
|
temp = lines[ln].line->string[i];
|
||||||
line->string[i] = line->string[u - i - 1];
|
lines[ln].line->string[i]
|
||||||
line->string[u - i - 1] = temp;
|
= lines[ln].line->string[u - i - 1];
|
||||||
|
lines[ln].line->string[u - i - 1] = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* see if this line is a MARK
|
/* see if this line is a MARK
|
||||||
*/
|
*/
|
||||||
if (line->used > 0 && line->string[0] == '[') {
|
if (lines[ln].line->used > 0 &&
|
||||||
char dummy[4];
|
lines[ln].line->string[0] == '[') {
|
||||||
int j;
|
i = sscanf(lines[ln].line->string + 1,
|
||||||
i = sscanf(line->string + 1,
|
|
||||||
"-- MARK -- %3c %3c %d %d:%d:%d %d]\r\n",
|
"-- MARK -- %3c %3c %d %d:%d:%d %d]\r\n",
|
||||||
dummy, dummy, &j, &j, &j, &j, &j);
|
dummy, dummy, &j, &j, &j, &j, &j);
|
||||||
is_mark = (i == 7);
|
is_mark = (i == 7);
|
||||||
|
} else {
|
||||||
|
is_mark = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process this line
|
/* process this line
|
||||||
*/
|
*/
|
||||||
if (is_mark && was_mark) {
|
if (is_mark && ln > 0 && lines[ln - 1].is_mark) {
|
||||||
/* this is a mark and the previous line is also
|
/* this is a mark and the previous line is also
|
||||||
* a mark, so reduce the line count 'cause it'll
|
* a mark, so make (or continue) that range
|
||||||
* go up by one and we're joining them on output.
|
|
||||||
*/
|
*/
|
||||||
|
if (0 == lines[ln - 1].mark_end->allocated) {
|
||||||
|
/* this is a new range - shuffle pointers
|
||||||
|
*
|
||||||
|
* remember that we are moving backward
|
||||||
|
*/
|
||||||
|
*(lines[ln - 1].mark_end) = *(lines[ln - 1].line);
|
||||||
|
InitString(lines[ln - 1].line);
|
||||||
|
}
|
||||||
|
/* if unallocated, cheat and shuffle pointers */
|
||||||
|
if (0 == lines[ln - 1].line->allocated) {
|
||||||
|
*(lines[ln - 1].line) = *(lines[ln].line);
|
||||||
|
InitString(lines[ln].line);
|
||||||
|
} else {
|
||||||
|
BuildString((char *)0, lines[ln - 1].line);
|
||||||
|
BuildStringN(lines[ln].line->string,
|
||||||
|
lines[ln].line->used - 1,
|
||||||
|
lines[ln - 1].line);
|
||||||
|
BuildString((char *)0, lines[ln].line);
|
||||||
|
}
|
||||||
ln--;
|
ln--;
|
||||||
}
|
}
|
||||||
was_mark = is_mark;
|
lines[ln].is_mark = is_mark;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* advance to the next line and break if we have enough
|
/* advance to the next line and break if we have enough
|
||||||
*/
|
*/
|
||||||
ln++;
|
ln++;
|
||||||
BuildString((char *)0, line);
|
if (ln >= n_lines - 1) {
|
||||||
if (ln >= back) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,122 +271,90 @@ Replay(CONSENT *pCE, CONSFILE *fdOut, unsigned short back)
|
|||||||
if (ln < 0) {
|
if (ln < 0) {
|
||||||
ln = 0;
|
ln = 0;
|
||||||
}
|
}
|
||||||
BuildStringChar(ch, line);
|
BuildStringChar(ch, lines[ln].line);
|
||||||
|
|
||||||
/* if we've processed "a lot" of data for a line, then bail
|
/* if we've processed "a lot" of data for a line, then bail
|
||||||
* why? there must be some very long non-newline terminated
|
* why? there must be some very long non-newline terminated
|
||||||
* strings and if we just keep going back, we could spew lots
|
* strings and if we just keep going back, we could spew lots
|
||||||
* of data and chew up lots of memory
|
* of data and chew up lots of memory
|
||||||
*/
|
*/
|
||||||
if (line->used > MAXREPLAYLINELEN) {
|
if (lines[ln].line->used > MAXREPLAYLINELEN) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(buf);
|
||||||
|
buf = (char *)0;
|
||||||
|
|
||||||
/* move forward. either we hit the beginning of the file and we
|
/* if we got back to beginning of file but saw some data, include it
|
||||||
* move to the first byte, or we hit a \n and we move past it
|
|
||||||
*/
|
*/
|
||||||
file_pos++;
|
if (ln >= 0 && lines[ln].line->used > 0) {
|
||||||
|
|
||||||
/* Now output the lines, starting from where we stopped */
|
/* reverse the text to put it in forward order
|
||||||
if (FileSeek(fdLog, file_pos, SEEK_SET) >= 0) {
|
*/
|
||||||
int eof = 0;
|
u = lines[ln].line->used - 1;
|
||||||
int i = 0;
|
for (i = 0; i < u / 2; i++) {
|
||||||
int r = 0;
|
int temp;
|
||||||
STRING *mark_beg = (STRING *)0;
|
|
||||||
STRING *mark_end = (STRING *)0;
|
|
||||||
|
|
||||||
mark_beg = AllocString();
|
temp = lines[ln].line->string[i];
|
||||||
mark_end = AllocString();
|
lines[ln].line->string[i]
|
||||||
|
= lines[ln].line->string[u - i - 1];
|
||||||
ln = 0; /* number of lines output */
|
lines[ln].line->string[u - i - 1] = temp;
|
||||||
BuildString((char *)0, line);
|
}
|
||||||
|
ln++;
|
||||||
while (ln < back && !eof) {
|
|
||||||
if (r <= 0) {
|
|
||||||
if ((r = FileRead(fdLog, buf, REPLAYBUFFER)) < 0)
|
|
||||||
eof = 1;
|
|
||||||
i = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eof)
|
/* copy the lines into the buffer and put them in order
|
||||||
BuildStringChar(buf[i], line);
|
*/
|
||||||
|
for (i = ln - 1; i >= 0; i--) {
|
||||||
|
if (lines[i].is_mark && 0 != lines[i].mark_end->used) {
|
||||||
|
int mark_len;
|
||||||
|
|
||||||
if (buf[i] == '\n' || eof) {
|
/* output the start of the range, stopping at the ']'
|
||||||
int is_mark = 0;
|
*/
|
||||||
if (line->used > 0 && line->string[0] == '[') {
|
s = strrchr(lines[i].line->string, ']');
|
||||||
char dummy[4];
|
if ((char *)0 != s) {
|
||||||
int j;
|
|
||||||
int i;
|
|
||||||
i = sscanf(line->string + 1,
|
|
||||||
"-- MARK -- %3c %3c %d %d:%d:%d %d]\r\n",
|
|
||||||
dummy, dummy, &j, &j, &j, &j, &j);
|
|
||||||
is_mark = (i == 7);
|
|
||||||
}
|
|
||||||
if (is_mark) {
|
|
||||||
if (mark_beg->used > 1) {
|
|
||||||
BuildString((char *)0, mark_end);
|
|
||||||
BuildString(line->string, mark_end);
|
|
||||||
} else
|
|
||||||
BuildString(line->string, mark_beg);
|
|
||||||
} else {
|
|
||||||
if (mark_beg->used > 1) {
|
|
||||||
if (mark_end->used > 1) {
|
|
||||||
char *s;
|
|
||||||
|
|
||||||
/* output the start of the range, stopping at the ']' */
|
|
||||||
s = strrchr(mark_beg->string, ']');
|
|
||||||
if ((char *)0 != s)
|
|
||||||
*s = '\000';
|
*s = '\000';
|
||||||
FileWrite(fdOut, FLAGTRUE, mark_beg->string,
|
}
|
||||||
-1);
|
FileWrite(fdOut, FLAGTRUE, lines[i].line->string, -1);
|
||||||
FileWrite(fdOut, FLAGTRUE, " .. ", 4);
|
FileWrite(fdOut, FLAGTRUE, " .. ", 4);
|
||||||
|
|
||||||
/* build the end string by removing the leading "[-- MARK -- "
|
/* build the end string by removing the leading "[-- MARK -- "
|
||||||
* and replacing "]\r\n" on the end with " -- MARK --]\r\n"
|
* and replacing "]\r\n" on the end with " -- MARK --]\r\n"
|
||||||
*/
|
*/
|
||||||
s = strrchr(mark_end->string, ']');
|
mark_len = sizeof("[-- MARK -- ") - 1;
|
||||||
if ((char *)0 != s)
|
|
||||||
*s = '\000';
|
|
||||||
FileWrite(fdOut, FLAGTRUE,
|
|
||||||
mark_end->string +
|
|
||||||
sizeof("[-- MARK -- ") - 1, -1);
|
|
||||||
FileWrite(fdOut, FLAGFALSE, " -- MARK --]\r\n",
|
|
||||||
-1);
|
|
||||||
} else {
|
|
||||||
FileWrite(fdOut, FLAGFALSE, mark_beg->string,
|
|
||||||
mark_beg->used - 1);
|
|
||||||
}
|
|
||||||
BuildString((char *)0, mark_beg);
|
|
||||||
BuildString((char *)0, mark_end);
|
|
||||||
ln++;
|
|
||||||
if (ln >= back)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
FileWrite(fdOut, FLAGFALSE, line->string,
|
|
||||||
line->used - 1);
|
|
||||||
ln++;
|
|
||||||
}
|
|
||||||
BuildString((char *)0, line);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* move the counters */
|
s = strrchr(lines[i].mark_end->string + mark_len, ']');
|
||||||
i++;
|
if ((char *)0 != s) {
|
||||||
r--;
|
*s = '\000';
|
||||||
}
|
}
|
||||||
DestroyString(mark_end);
|
FileWrite(fdOut, FLAGTRUE,
|
||||||
DestroyString(mark_beg);
|
lines[i].mark_end->string + mark_len, -1);
|
||||||
|
FileWrite(fdOut, FLAGFALSE, " -- MARK --]\r\n", -1);
|
||||||
|
u = lines[i].mark_end->used;
|
||||||
|
s = lines[i].mark_end->string;
|
||||||
|
} else
|
||||||
|
FileWrite(fdOut, FLAGFALSE, lines[i].line->string,
|
||||||
|
lines[i].line->used - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
common_exit:
|
common_exit:
|
||||||
|
|
||||||
if (line != (STRING *)0)
|
/* if we opened the logfile, close it */
|
||||||
DestroyString(line);
|
if (fdLog != pCE->fdlog)
|
||||||
if (buf != (char *)0)
|
|
||||||
free(buf);
|
|
||||||
if (fdLog != (CONSFILE *)0)
|
|
||||||
FileClose(&fdLog);
|
FileClose(&fdLog);
|
||||||
|
|
||||||
|
if ((struct lines *)0 != lines) {
|
||||||
|
for (i = 0; i < n_lines; i++) {
|
||||||
|
DestroyString(lines[i].mark_end);
|
||||||
|
DestroyString(lines[i].line);
|
||||||
|
}
|
||||||
|
free(lines);
|
||||||
|
lines = (struct lines *)0;
|
||||||
|
}
|
||||||
|
if ((char *)0 != buf) {
|
||||||
|
free(buf);
|
||||||
|
buf = (char *)0;
|
||||||
|
}
|
||||||
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
#if HAVE_DMALLOC && DMALLOC_MARK_REPLAY
|
||||||
CONDDEBUG((1, "Replay(): dmalloc / MarkReplay"));
|
CONDDEBUG((1, "Replay(): dmalloc / MarkReplay"));
|
||||||
dmalloc_log_changed(dmallocMarkReplay, 1, 0, 1);
|
dmalloc_log_changed(dmallocMarkReplay, 1, 0, 1);
|
||||||
@ -361,7 +368,6 @@ Replay(CONSENT *pCE, CONSFILE *fdOut, unsigned short back)
|
|||||||
#define WHEN_ATTACH 0x02
|
#define WHEN_ATTACH 0x02
|
||||||
#define WHEN_EXPERT 0x04 /* ZZZ no way to set his yet */
|
#define WHEN_EXPERT 0x04 /* ZZZ no way to set his yet */
|
||||||
#define WHEN_ALWAYS 0x40
|
#define WHEN_ALWAYS 0x40
|
||||||
#define IS_LIMITED 0x100
|
|
||||||
|
|
||||||
#define HALFLINE 40
|
#define HALFLINE 40
|
||||||
|
|
||||||
@ -372,7 +378,7 @@ typedef struct HLnode {
|
|||||||
|
|
||||||
static HELP aHLTable[] = {
|
static HELP aHLTable[] = {
|
||||||
{WHEN_ALWAYS, ". disconnect"},
|
{WHEN_ALWAYS, ". disconnect"},
|
||||||
{WHEN_ALWAYS | IS_LIMITED, "; move to another console"},
|
{WHEN_ALWAYS, "; move to another console"},
|
||||||
{WHEN_ALWAYS, "a attach read/write"},
|
{WHEN_ALWAYS, "a attach read/write"},
|
||||||
{WHEN_ALWAYS, "b send broadcast message"},
|
{WHEN_ALWAYS, "b send broadcast message"},
|
||||||
{WHEN_ATTACH, "c toggle flow control"},
|
{WHEN_ATTACH, "c toggle flow control"},
|
||||||
@ -384,32 +390,35 @@ static HELP aHLTable[] = {
|
|||||||
{WHEN_ATTACH, "L toggle logging on/off"},
|
{WHEN_ATTACH, "L toggle logging on/off"},
|
||||||
{WHEN_ATTACH, "l? break sequence list"},
|
{WHEN_ATTACH, "l? break sequence list"},
|
||||||
{WHEN_ATTACH, "l0 send break per config file"},
|
{WHEN_ATTACH, "l0 send break per config file"},
|
||||||
{WHEN_ATTACH, "l1-9a-z send specific break sequence"},
|
{WHEN_ATTACH, "l1-9 send specific break sequence"},
|
||||||
{WHEN_ALWAYS, "m display message of the day"},
|
{WHEN_ALWAYS, "m display the message of the day"},
|
||||||
{WHEN_ALWAYS, "n write a note to the logfile"},
|
|
||||||
{WHEN_ALWAYS, "o (re)open the tty and log file"},
|
{WHEN_ALWAYS, "o (re)open the tty and log file"},
|
||||||
{WHEN_ALWAYS, "p playback the last %hu lines"},
|
{WHEN_ALWAYS, "p replay the last 60 lines"},
|
||||||
{WHEN_ALWAYS, "P set number of playback lines"},
|
{WHEN_ALWAYS, "r replay the last 20 lines"},
|
||||||
{WHEN_ALWAYS, "r replay the last %hu lines"},
|
{WHEN_ATTACH, "s spy read only"},
|
||||||
{WHEN_ALWAYS, "R set number of replay lines"},
|
|
||||||
{WHEN_ATTACH, "s spy mode (read only)"},
|
|
||||||
{WHEN_ALWAYS, "u show host status"},
|
{WHEN_ALWAYS, "u show host status"},
|
||||||
{WHEN_ALWAYS, "v show version info"},
|
{WHEN_ALWAYS, "v show version info"},
|
||||||
{WHEN_ALWAYS, "w who is on this console"},
|
{WHEN_ALWAYS, "w who is on this console"},
|
||||||
{WHEN_ALWAYS, "x show console baud info"},
|
{WHEN_ALWAYS, "x show console baud info"},
|
||||||
{WHEN_ALWAYS | IS_LIMITED, "z suspend the connection"},
|
{WHEN_ALWAYS, "z suspend the connection"},
|
||||||
{WHEN_ATTACH, "! invoke task"},
|
{WHEN_ATTACH, "| attach local command"},
|
||||||
{WHEN_ATTACH | IS_LIMITED, "| attach local command"},
|
|
||||||
{WHEN_ALWAYS, "? print this message"},
|
{WHEN_ALWAYS, "? print this message"},
|
||||||
{WHEN_ALWAYS, "<cr> ignore/abort command"},
|
{WHEN_ALWAYS, "<cr> ignore/abort command"},
|
||||||
{WHEN_ALWAYS, "^R replay the last line"},
|
{WHEN_ALWAYS, "^R replay the last line"},
|
||||||
{WHEN_ATTACH, "\\ooo send character by octal code"},
|
{WHEN_ATTACH, "\\ooo send character by octal code"},
|
||||||
|
{WHEN_EXPERT, "^I toggle tab expansion"},
|
||||||
|
{WHEN_EXPERT, "+(-) do (not) drop line"},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* list the commands we know for the user (ksb)
|
/* list the commands we know for the user (ksb)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
HelpUser(CONSCLIENT *pCL)
|
HelpUser(CONSCLIENT *pCL)
|
||||||
|
#else
|
||||||
|
HelpUser(pCL)
|
||||||
|
CONSCLIENT *pCL;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int i, j, iCmp;
|
int i, j, iCmp;
|
||||||
static char
|
static char
|
||||||
@ -430,30 +439,15 @@ HelpUser(CONSCLIENT *pCL)
|
|||||||
|
|
||||||
BuildString((char *)0, acLine);
|
BuildString((char *)0, acLine);
|
||||||
for (i = 0; i < sizeof(aHLTable) / sizeof(HELP); ++i) {
|
for (i = 0; i < sizeof(aHLTable) / sizeof(HELP); ++i) {
|
||||||
char *text;
|
if (0 == (aHLTable[i].iwhen & iCmp)) {
|
||||||
|
|
||||||
if (aHLTable[i].iwhen & IS_LIMITED &&
|
|
||||||
ConsentUserOk(pLUList, pCL->username->string) == 1)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (0 == (aHLTable[i].iwhen & iCmp))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
text = aHLTable[i].actext;
|
|
||||||
if (text[0] == 'p') {
|
|
||||||
BuildTmpString((char *)0);
|
|
||||||
text = BuildTmpStringPrint(text, pCL->playback);
|
|
||||||
} else if (text[0] == 'r') {
|
|
||||||
BuildTmpString((char *)0);
|
|
||||||
text = BuildTmpStringPrint(text, pCL->replay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (acLine->used != 0) { /* second part of line */
|
if (acLine->used != 0) { /* second part of line */
|
||||||
if (strlen(text) < HALFLINE) {
|
if (strlen(aHLTable[i].actext) < HALFLINE) {
|
||||||
for (j = acLine->used; j <= HALFLINE; ++j) {
|
for (j = acLine->used; j <= HALFLINE; ++j) {
|
||||||
BuildStringChar(' ', acLine);
|
BuildStringChar(' ', acLine);
|
||||||
}
|
}
|
||||||
BuildString(text, acLine);
|
BuildString(aHLTable[i].actext, acLine);
|
||||||
BuildString(acEoln, acLine);
|
BuildString(acEoln, acLine);
|
||||||
FileWrite(pCL->fd, FLAGTRUE, acLine->string,
|
FileWrite(pCL->fd, FLAGTRUE, acLine->string,
|
||||||
acLine->used - 1);
|
acLine->used - 1);
|
||||||
@ -468,7 +462,7 @@ HelpUser(CONSCLIENT *pCL)
|
|||||||
}
|
}
|
||||||
if (acLine->used == 0) { /* at new line */
|
if (acLine->used == 0) { /* at new line */
|
||||||
BuildStringChar(' ', acLine);
|
BuildStringChar(' ', acLine);
|
||||||
BuildString(text, acLine);
|
BuildString(aHLTable[i].actext, acLine);
|
||||||
if (acLine->used > HALFLINE) {
|
if (acLine->used > HALFLINE) {
|
||||||
BuildString(acEoln, acLine);
|
BuildString(acEoln, acLine);
|
||||||
FileWrite(pCL->fd, FLAGTRUE, acLine->string,
|
FileWrite(pCL->fd, FLAGTRUE, acLine->string,
|
||||||
@ -485,19 +479,34 @@ HelpUser(CONSCLIENT *pCL)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
#if PROTOTYPES
|
||||||
ClientAccessOk(CONSCLIENT *pCL)
|
ClientAccessOk(CONSCLIENT *pCL)
|
||||||
|
#else
|
||||||
|
ClientAccessOk(pCL)
|
||||||
|
CONSCLIENT *pCL;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
char *peername = (char *)0;
|
char *peername = (char *)0;
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
|
|
||||||
#if USE_IPV6 || !USE_UNIX_DOMAIN_SOCKETS
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
|
struct in_addr addr;
|
||||||
|
|
||||||
|
# if HAVE_INET_ATON
|
||||||
|
inet_aton("127.0.0.1", &addr);
|
||||||
|
# else
|
||||||
|
addr.s_addr = inet_addr("127.0.0.1");
|
||||||
|
# endif
|
||||||
|
pCL->caccess = AccType(&addr, &peername);
|
||||||
|
if (pCL->caccess == 'r') {
|
||||||
|
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
|
||||||
|
-1);
|
||||||
|
retval = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
int cfd;
|
int cfd;
|
||||||
# if USE_IPV6
|
struct sockaddr_in in_port;
|
||||||
int error;
|
|
||||||
char addr[NI_MAXHOST];
|
|
||||||
# endif
|
|
||||||
SOCKADDR_STYPE in_port;
|
|
||||||
int getpeer = -1;
|
int getpeer = -1;
|
||||||
|
|
||||||
cfd = FileFDNum(pCL->fd);
|
cfd = FileFDNum(pCL->fd);
|
||||||
@ -524,56 +533,20 @@ ClientAccessOk(CONSCLIENT *pCL)
|
|||||||
retval = 0;
|
retval = 0;
|
||||||
goto setpeer;
|
goto setpeer;
|
||||||
}
|
}
|
||||||
pCL->caccess = AccType(
|
pCL->caccess = AccType(&in_port.sin_addr, &peername);
|
||||||
# if USE_IPV6
|
|
||||||
&in_port,
|
|
||||||
# else
|
|
||||||
&in_port.sin_addr,
|
|
||||||
# endif
|
|
||||||
&peername);
|
|
||||||
if (pCL->caccess == 'r') {
|
if (pCL->caccess == 'r') {
|
||||||
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
|
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
|
||||||
-1);
|
-1);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
setpeer:
|
setpeer:
|
||||||
#else
|
|
||||||
struct in_addr addr;
|
|
||||||
|
|
||||||
# if HAVE_INET_ATON
|
|
||||||
inet_aton("127.0.0.1", &addr);
|
|
||||||
# else
|
|
||||||
addr.s_addr = inet_addr("127.0.0.1");
|
|
||||||
# endif
|
|
||||||
pCL->caccess = AccType(&addr, &peername);
|
|
||||||
if (pCL->caccess == 'r') {
|
|
||||||
FileWrite(pCL->fd, FLAGFALSE, "access from your host refused\r\n",
|
|
||||||
-1);
|
|
||||||
retval = 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pCL->peername != (STRING *)0) {
|
if (pCL->peername != (STRING *)0) {
|
||||||
BuildString((char *)0, pCL->peername);
|
BuildString((char *)0, pCL->peername);
|
||||||
if (peername != (char *)0)
|
if (peername != (char *)0)
|
||||||
BuildString(peername, pCL->peername);
|
BuildString(peername, pCL->peername);
|
||||||
#if USE_IPV6
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
else if (getpeer != -1) {
|
|
||||||
error =
|
|
||||||
getnameinfo((struct sockaddr *)&in_port, so, addr,
|
|
||||||
sizeof(addr), NULL, 0, NI_NUMERICHOST);
|
|
||||||
if (error) {
|
|
||||||
FileWrite(pCL->fd, FLAGFALSE, "getnameinfo failed\r\n",
|
|
||||||
-1);
|
|
||||||
Error("ClientAccessOk(): gatenameinfo: %s",
|
|
||||||
gai_strerror(error));
|
|
||||||
retval = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
BuildString(addr, pCL->peername);
|
|
||||||
} else
|
|
||||||
BuildString("<unknown>", pCL->peername);
|
|
||||||
#elif USE_UNIX_DOMAIN_SOCKETS
|
|
||||||
else
|
else
|
||||||
BuildString("127.0.0.1", pCL->peername);
|
BuildString("127.0.0.1", pCL->peername);
|
||||||
#else
|
#else
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: client.h,v 5.36 2003/12/25 19:22:00 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -46,12 +48,7 @@ typedef enum clientState {
|
|||||||
S_QUOTE, /* send any character we can spell */
|
S_QUOTE, /* send any character we can spell */
|
||||||
S_BCAST, /* send a broadcast message to all clients */
|
S_BCAST, /* send a broadcast message to all clients */
|
||||||
S_CWAIT, /* wait for client */
|
S_CWAIT, /* wait for client */
|
||||||
S_CEXEC, /* client execing a program */
|
S_CEXEC /* client execing a program */
|
||||||
S_REPLAY, /* set replay length for 'r' */
|
|
||||||
S_PLAYBACK, /* set replay length for 'p' */
|
|
||||||
S_NOTE, /* send a note to the logfile */
|
|
||||||
S_TASK, /* invoke a task on the server side */
|
|
||||||
S_CONFIRM /* confirm input */
|
|
||||||
} CLIENTSTATE;
|
} CLIENTSTATE;
|
||||||
|
|
||||||
typedef struct client { /* Connection Information: */
|
typedef struct client { /* Connection Information: */
|
||||||
@ -61,7 +58,6 @@ typedef struct client { /* Connection Information: */
|
|||||||
short fwantwr; /* (client) wants to write */
|
short fwantwr; /* (client) wants to write */
|
||||||
short fro; /* read-only permission */
|
short fro; /* read-only permission */
|
||||||
short fecho; /* echo commands (not set by machines) */
|
short fecho; /* echo commands (not set by machines) */
|
||||||
short fiwait; /* client wanting for console init */
|
|
||||||
STRING *acid; /* login and location of client */
|
STRING *acid; /* login and location of client */
|
||||||
STRING *peername; /* location of client */
|
STRING *peername; /* location of client */
|
||||||
STRING *username; /* login of client */
|
STRING *username; /* login of client */
|
||||||
@ -78,22 +74,17 @@ typedef struct client { /* Connection Information: */
|
|||||||
*pCLnext; /* next person on this list */
|
*pCLnext; /* next person on this list */
|
||||||
/* next lists link clients on a console */
|
/* next lists link clients on a console */
|
||||||
char ic[2]; /* two character escape sequence */
|
char ic[2]; /* two character escape sequence */
|
||||||
unsigned short replay; /* lines to replay for 'r' */
|
|
||||||
unsigned short playback; /* lines to replay for 'p' */
|
|
||||||
CLIENTSTATE iState; /* state for fsm in server */
|
CLIENTSTATE iState; /* state for fsm in server */
|
||||||
char caccess; /* did we trust the remote machine */
|
char caccess; /* did we trust the remote machine */
|
||||||
IOSTATE ioState; /* state of the socket */
|
IOSTATE ioState; /* state of the socket */
|
||||||
time_t stateTimer; /* timer for various ioState states */
|
time_t stateTimer; /* timer for various ioState states */
|
||||||
STRING *accmd; /* the command the user issued */
|
STRING *accmd; /* the command the user issued */
|
||||||
INADDR_STYPE cnct_port; /* where from */
|
STRING *msg; /* the broadcast message */
|
||||||
FLAG confirmed; /* confirm state */
|
struct sockaddr_in
|
||||||
CLIENTSTATE cState; /* state needing confirmation */
|
cnct_port; /* where from */
|
||||||
char cOption; /* option initiating the confirmation */
|
|
||||||
size_t tokenSize; /* buffer size for GSSAPI token */
|
|
||||||
} CONSCLIENT;
|
} CONSCLIENT;
|
||||||
|
|
||||||
extern void Replay(CONSENT *, CONSFILE *, unsigned short);
|
extern void Replay PARAMS((CONSENT *, CONSFILE *, int));
|
||||||
extern void HelpUser(CONSCLIENT *);
|
extern void HelpUser PARAMS((CONSCLIENT *));
|
||||||
extern void FindWrite(CONSENT *);
|
extern void FindWrite PARAMS((CONSENT *));
|
||||||
extern int ClientAccessOk(CONSCLIENT *);
|
extern int ClientAccessOk PARAMS((CONSCLIENT *));
|
||||||
extern void BumpClient(CONSENT *, char *);
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: consent.h,v 5.57 2004/05/21 04:38:02 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -53,21 +55,9 @@ typedef enum consType {
|
|||||||
UNKNOWNTYPE = 0,
|
UNKNOWNTYPE = 0,
|
||||||
DEVICE,
|
DEVICE,
|
||||||
EXEC,
|
EXEC,
|
||||||
HOST,
|
HOST
|
||||||
NOOP,
|
|
||||||
UDS,
|
|
||||||
#if HAVE_FREEIPMI
|
|
||||||
IPMI,
|
|
||||||
#endif
|
|
||||||
} CONSTYPE;
|
} CONSTYPE;
|
||||||
|
|
||||||
#if HAVE_FREEIPMI
|
|
||||||
# define IPMIL_UNKNOWN (0)
|
|
||||||
# define IPMIL_USER (IPMICONSOLE_PRIVILEGE_USER+1)
|
|
||||||
# define IPMIL_OPERATOR (IPMICONSOLE_PRIVILEGE_OPERATOR+1)
|
|
||||||
# define IPMIL_ADMIN (IPMICONSOLE_PRIVILEGE_ADMIN+1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct names {
|
typedef struct names {
|
||||||
char *name;
|
char *name;
|
||||||
struct names *next;
|
struct names *next;
|
||||||
@ -99,17 +89,6 @@ typedef struct consent { /* console information */
|
|||||||
FLAG ixoff; /* XON/XOFF flow control on input */
|
FLAG ixoff; /* XON/XOFF flow control on input */
|
||||||
#if defined(CRTSCTS)
|
#if defined(CRTSCTS)
|
||||||
FLAG crtscts; /* use hardware flow control */
|
FLAG crtscts; /* use hardware flow control */
|
||||||
#endif
|
|
||||||
#if HAVE_FREEIPMI
|
|
||||||
/* type == IPMI */
|
|
||||||
int ipmiprivlevel; /* IPMI authentication level */
|
|
||||||
ipmiconsole_ctx_t ipmictx; /* IPMI ctx */
|
|
||||||
unsigned int ipmiworkaround; /* IPMI workaround flags */
|
|
||||||
short ipmiwrkset; /* workaround flags set in config */
|
|
||||||
int ipmiciphersuite; /* IPMI cipher suite */
|
|
||||||
char *username; /* Username to log as */
|
|
||||||
char *password; /* Login Password */
|
|
||||||
STRING *ipmikg; /* IPMI k_g auth key */
|
|
||||||
#endif
|
#endif
|
||||||
/* type == HOST */
|
/* type == HOST */
|
||||||
char *host; /* hostname */
|
char *host; /* hostname */
|
||||||
@ -121,41 +100,27 @@ typedef struct consent { /* console information */
|
|||||||
/* type == EXEC */
|
/* type == EXEC */
|
||||||
char *exec; /* exec command */
|
char *exec; /* exec command */
|
||||||
char *execsubst; /* exec substitution pattern */
|
char *execsubst; /* exec substitution pattern */
|
||||||
uid_t execuid; /* user to run exec as */
|
|
||||||
gid_t execgid; /* group to run exec as */
|
|
||||||
/* type == UDS */
|
|
||||||
char *uds; /* socket file */
|
|
||||||
char *udssubst; /* socket file substitution pattern */
|
|
||||||
/* global stuff */
|
/* global stuff */
|
||||||
char *master; /* master hostname */
|
char *master; /* master hostname */
|
||||||
unsigned short breakNum; /* break type [1-35] */
|
unsigned short breakNum; /* break type [1-9] */
|
||||||
char *logfile; /* logfile */
|
char *logfile; /* logfile */
|
||||||
off_t logfilemax; /* size limit for rolling logfile */
|
off_t logfilemax; /* size limit for rolling logfile */
|
||||||
char *initcmd; /* initcmd command */
|
char *initcmd; /* initcmd command */
|
||||||
char *initsubst; /* initcmd substitution pattern */
|
char *initsubst; /* initcmd substitution pattern */
|
||||||
uid_t inituid; /* user to run initcmd as */
|
|
||||||
gid_t initgid; /* group to run initcmd as */
|
|
||||||
char *motd; /* motd */
|
char *motd; /* motd */
|
||||||
time_t idletimeout; /* idle timeout */
|
time_t idletimeout; /* idle timeout */
|
||||||
char *idlestring; /* string to print when idle */
|
char *idlestring; /* string to print when idle */
|
||||||
unsigned short spinmax; /* initialization spin maximum */
|
|
||||||
unsigned short spintimer; /* initialization spin timer */
|
|
||||||
char *replstring; /* generic string for replacements */
|
|
||||||
char *tasklist; /* list of valid tasks */
|
|
||||||
char *breaklist; /* list of valid break sequences */
|
|
||||||
/* timestamp stuff */
|
/* timestamp stuff */
|
||||||
int mark; /* Mark (chime) interval */
|
int mark; /* Mark (chime) interval */
|
||||||
long nextMark; /* Next mark (chime) time */
|
long nextMark; /* Next mark (chime) time */
|
||||||
FLAG activitylog; /* log attach/detach/bump */
|
FLAG activitylog; /* log attach/detach/bump */
|
||||||
FLAG breaklog; /* log breaks sent */
|
FLAG breaklog; /* log breaks sent */
|
||||||
FLAG tasklog; /* log tasks invoked */
|
|
||||||
/* options */
|
/* options */
|
||||||
FLAG ondemand; /* bring up on-demand */
|
FLAG ondemand; /* bring up on-demand */
|
||||||
FLAG reinitoncc; /* open if down on client connect */
|
FLAG reinitoncc; /* open if down on client connect */
|
||||||
FLAG striphigh; /* strip high-bit of console data */
|
FLAG striphigh; /* strip high-bit of console data */
|
||||||
FLAG autoreinit; /* auto-reinitialize if failed */
|
FLAG autoreinit; /* auto-reinitialize if failed */
|
||||||
FLAG unloved; /* copy "unloved" data to stdout */
|
FLAG unloved; /* copy "unloved" data to stdout */
|
||||||
FLAG login; /* allow logins to the console */
|
|
||||||
|
|
||||||
/*** runtime settings ***/
|
/*** runtime settings ***/
|
||||||
CONSFILE *fdlog; /* the local log file */
|
CONSFILE *fdlog; /* the local log file */
|
||||||
@ -165,26 +130,16 @@ typedef struct consent { /* console information */
|
|||||||
pid_t ipid; /* pid of virtual command */
|
pid_t ipid; /* pid of virtual command */
|
||||||
pid_t initpid; /* pid of initcmd command */
|
pid_t initpid; /* pid of initcmd command */
|
||||||
CONSFILE *initfile; /* the command run on init */
|
CONSFILE *initfile; /* the command run on init */
|
||||||
pid_t taskpid; /* pid of task running */
|
|
||||||
CONSFILE *taskfile; /* the output from the task (read-only) */
|
|
||||||
STRING *wbuf; /* write() buffer */
|
STRING *wbuf; /* write() buffer */
|
||||||
int wbufIAC; /* next IAC location in wbuf */
|
int wbufIAC; /* next IAC location in wbuf */
|
||||||
IOSTATE ioState; /* state of the socket */
|
IOSTATE ioState; /* state of the socket */
|
||||||
time_t stateTimer; /* timer for ioState states */
|
time_t stateTimer; /* timer for ioState states */
|
||||||
time_t lastWrite; /* time of last data sent to console */
|
time_t lastWrite; /* time of last data sent to console */
|
||||||
#if HAVE_GETTIMEOFDAY
|
|
||||||
struct timeval lastInit; /* time of last initialization */
|
|
||||||
#else
|
|
||||||
time_t lastInit; /* time of last initialization */
|
|
||||||
#endif
|
|
||||||
unsigned short spincount; /* initialization spin counter */
|
|
||||||
|
|
||||||
/*** state information ***/
|
/*** state information ***/
|
||||||
char acline[132 * 2 + 2]; /* max chars we will call a line */
|
char acline[132 * 2 + 2]; /* max chars we will call a line */
|
||||||
int iend; /* length of data stored in acline */
|
int iend; /* length of data stored in acline */
|
||||||
int telnetState; /* state for telnet negotiations */
|
int telnetState; /* state for telnet negotiations */
|
||||||
FLAG sentDoEcho; /* have we sent telnet DO ECHO cmd? */
|
|
||||||
FLAG sentDoSGA; /* have we sent telnet DO SGA cmd? */
|
|
||||||
unsigned short autoReUp; /* is it coming back up automatically? */
|
unsigned short autoReUp; /* is it coming back up automatically? */
|
||||||
FLAG downHard; /* did it go down unexpectedly? */
|
FLAG downHard; /* did it go down unexpectedly? */
|
||||||
unsigned short nolog; /* don't log output */
|
unsigned short nolog; /* don't log output */
|
||||||
@ -207,13 +162,11 @@ typedef struct remote { /* console at another host */
|
|||||||
NAMES *aliases; /* aliases for remote server name */
|
NAMES *aliases; /* aliases for remote server name */
|
||||||
} REMOTE;
|
} REMOTE;
|
||||||
|
|
||||||
extern PARITY *FindParity(char *);
|
extern PARITY *FindParity PARAMS((char *));
|
||||||
extern BAUD *FindBaud(char *);
|
extern BAUD *FindBaud PARAMS((char *));
|
||||||
extern void ConsInit(CONSENT *);
|
extern void ConsInit PARAMS((CONSENT *));
|
||||||
extern void ConsDown(CONSENT *, FLAG, FLAG);
|
extern void ConsDown PARAMS((CONSENT *, FLAG, FLAG));
|
||||||
extern REMOTE *FindUniq(REMOTE *);
|
extern REMOTE *FindUniq PARAMS((REMOTE *));
|
||||||
extern void DestroyRemoteConsole(REMOTE *);
|
extern void DestroyRemoteConsole PARAMS((REMOTE *));
|
||||||
extern void StartInit(CONSENT *);
|
extern void StartInit PARAMS((CONSENT *));
|
||||||
extern void StopInit(CONSENT *);
|
extern void StopInit PARAMS((CONSENT *));
|
||||||
extern char *ConsState(CONSENT *);
|
|
||||||
extern void SetupTty(CONSENT *, int);
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
.TH CONSERVER 8 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
|
||||||
|
.\" $Id: conserver.man,v 1.48 2004/05/28 02:02:36 bryan Exp $
|
||||||
|
.TH CONSERVER 8 "2004/05/28" "conserver-8.1.7" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
conserver \- console server daemon
|
conserver \- console server daemon
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -31,32 +33,20 @@ conserver \- console server daemon
|
|||||||
is the daemon that manages
|
is the daemon that manages
|
||||||
remote access to system consoles by multiple users via the
|
remote access to system consoles by multiple users via the
|
||||||
.BR console (1)
|
.BR console (1)
|
||||||
client program and (optionally) log the console output.
|
client program and logs all console output.
|
||||||
It can connect to consoles via local serial ports, Unix domain sockets, TCP
|
It can connect to consoles via local serial ports, terminal
|
||||||
sockets (for terminal servers and the like), or any external program.
|
servers that allow network access, or to any external program.
|
||||||
.PP
|
.PP
|
||||||
When started,
|
When started,
|
||||||
.B conserver
|
.B conserver
|
||||||
reads the
|
reads its
|
||||||
.BR conserver.cf (5)
|
.BR conserver.cf (5)
|
||||||
file for details of each console.
|
file for details of each console it should manage,
|
||||||
The console type, logging options, serial or network parameters, and user access
|
including serial port or network parameters and logging options.
|
||||||
levels are just a few of the things that can be specified.
|
(Also, in environments where multiple servers share a cf file,
|
||||||
Command-line options are then applied, possibly overriding
|
any server is able to refer clients to the particular server
|
||||||
.BR conserver.cf (5)
|
managing a requested console, so that the client need not have
|
||||||
settings.
|
knowledge of the distribution of consoles among servers.)
|
||||||
.B Conserver
|
|
||||||
categorizes consoles into two types: those it should actively manage, and
|
|
||||||
those it should just know about, so it can refer clients to other
|
|
||||||
.B conserver
|
|
||||||
instances.
|
|
||||||
If the
|
|
||||||
.B master
|
|
||||||
value of a console matches the hostname or ip address of the local machine,
|
|
||||||
.B conserver
|
|
||||||
will actively manage the console.
|
|
||||||
Otherwise, it's considered a ``remote'' console and managed by a different
|
|
||||||
server.
|
|
||||||
.B Conserver
|
.B Conserver
|
||||||
forks a child for each group of consoles it must manage
|
forks a child for each group of consoles it must manage
|
||||||
and assigns each process a port number to listen on.
|
and assigns each process a port number to listen on.
|
||||||
@ -99,10 +89,10 @@ The server will
|
|||||||
.B not
|
.B not
|
||||||
remove any files in the directory itself, just in case the directory is
|
remove any files in the directory itself, just in case the directory is
|
||||||
accidentally specified as ``/etc'' or some other critical location.
|
accidentally specified as ``/etc'' or some other critical location.
|
||||||
The server will do its best to remove all the sockets when it shuts down,
|
The server will do it's best to remove all the sockets when it shuts down,
|
||||||
but it could stop ungracefully (crash, ``kill -9'', etc)
|
but it could stop ungracefully (crash, ``kill -9'', etc)
|
||||||
and leave files behind.
|
and leave files behind.
|
||||||
It would then be up to the admin (or a creative startup script) to clean
|
It's would then be up to the admin (or a creative startup script) to clean
|
||||||
up the directory before the server will start again.
|
up the directory before the server will start again.
|
||||||
.PP
|
.PP
|
||||||
.B Conserver
|
.B Conserver
|
||||||
@ -328,9 +318,6 @@ Enable periodic attempts (every
|
|||||||
.I min
|
.I min
|
||||||
minutes) to open (``bring up'') all downed
|
minutes) to open (``bring up'') all downed
|
||||||
consoles (similar to sending a SIGUSR1).
|
consoles (similar to sending a SIGUSR1).
|
||||||
Without this option, or if
|
|
||||||
.I min
|
|
||||||
is zero, no periodic attempts occur.
|
|
||||||
.TP
|
.TP
|
||||||
.BI \-p port
|
.BI \-p port
|
||||||
Set the TCP port for the master process to listen on.
|
Set the TCP port for the master process to listen on.
|
||||||
@ -390,16 +377,13 @@ The console aliases in a comma-separated list.
|
|||||||
.I type
|
.I type
|
||||||
The type of console.
|
The type of console.
|
||||||
Values will be a `/' for a local device, `|' for
|
Values will be a `/' for a local device, `|' for
|
||||||
a command, `!' for a remote port, `%' for a Unix domain socket,
|
a command, or `!' for a remote port.
|
||||||
and `#' for a noop console.
|
|
||||||
.TP
|
.TP
|
||||||
.I details
|
.I details
|
||||||
Multiple values are comma-separated and depend on the type of the console.
|
Multiple values are comma-separated and depend on the type of the console.
|
||||||
Local devices will have the values of the device file and baud rate/parity.
|
Local devices will have the values of the device file and baud rate/parity.
|
||||||
Commands will have string to invoke.
|
Commands will have string to invoke.
|
||||||
Remote ports will have the values of the remote hostname and port number.
|
Remote ports will have the values of the remote hostname and port number.
|
||||||
Unix domain sockets will have the path to the socket.
|
|
||||||
Noop consoles will have nothing.
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B \-u
|
.B \-u
|
||||||
@ -420,7 +404,7 @@ output, but all consoles, not
|
|||||||
just those without a user, are logged.
|
just those without a user, are logged.
|
||||||
Each line of output is prefixed with the console name.
|
Each line of output is prefixed with the console name.
|
||||||
If a user is attached read/write, a `*' is appended to the console name,
|
If a user is attached read/write, a `*' is appended to the console name,
|
||||||
to allow log watching utilities to ignore potential user-introduced alarms.
|
to allow log watching utilites to ignore potential user-introduced alarms.
|
||||||
.TP
|
.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).
|
||||||
@ -440,7 +424,7 @@ The second style is the character-based, escape-sequence mode, while
|
|||||||
connected to a console.
|
connected to a console.
|
||||||
.PP
|
.PP
|
||||||
The initial line-based mode begins the same for both the master process
|
The initial line-based mode begins the same for both the master process
|
||||||
and its children.
|
and it's children.
|
||||||
Upon a successful (non-rejected) client connection, an ``ok'' is sent.
|
Upon a successful (non-rejected) client connection, an ``ok'' is sent.
|
||||||
The client then issues a command and the server responds to it with a
|
The client then issues a command and the server responds to it with a
|
||||||
result string (``ok'' being the sign of success for most commands).
|
result string (``ok'' being the sign of success for most commands).
|
||||||
@ -448,7 +432,7 @@ The commands available are ``help'', ``ssl'' (if
|
|||||||
SSL was built into the code), ``login'', and ``exit''.
|
SSL was built into the code), ``login'', and ``exit''.
|
||||||
Using the ``login'' command, the client authenticates and gains access to
|
Using the ``login'' command, the client authenticates and gains access to
|
||||||
the extended command set.
|
the extended command set.
|
||||||
This is where the master process and its children differ.
|
This is where the master process and it's children differ.
|
||||||
The master process gives the client access to global commands, and the
|
The master process gives the client access to global commands, and the
|
||||||
child provides commands for interacting with the consoles it manages.
|
child provides commands for interacting with the consoles it manages.
|
||||||
The ``help'' command, in both cases, will provide a complete
|
The ``help'' command, in both cases, will provide a complete
|
||||||
@ -465,7 +449,7 @@ This is, by no means, a complete description of the entire client/server
|
|||||||
interaction.
|
interaction.
|
||||||
It is, however, a brief explanation in order to give a idea of
|
It is, however, a brief explanation in order to give a idea of
|
||||||
what the program does. See the
|
what the program does. See the
|
||||||
.B \s-1PROTOCOL\s0
|
.B \s-1PROTOCOLS\s0
|
||||||
file in the distribution for further details.
|
file in the distribution for further details.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.PP
|
.PP
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: convert.c,v 1.10 2004/05/28 01:08:28 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -56,12 +58,19 @@ DestroyDataStructures()
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
#if PROTOTYPES
|
||||||
ReadLine2(FILE *fp, STRING *save, int *iLine)
|
ReadLine2(FILE *fp, STRING *save, int *iLine)
|
||||||
|
#else
|
||||||
|
ReadLine2(fp, save, iLine)
|
||||||
|
FILE *fp;
|
||||||
|
STRING *save;
|
||||||
|
int *iLine;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
char *wholeline = (char *)0;
|
char *wholeline = (char *)0;
|
||||||
char *ret = (char *)0;
|
char *ret = (char *)0;
|
||||||
int i, buflen, peek, commentCheck = 1;
|
int i, buflen, peek, commentCheck = 1, comment = 0;
|
||||||
static STRING *bufstr = (STRING *)0;
|
static STRING *bufstr = (STRING *)0;
|
||||||
static STRING *wholestr = (STRING *)0;
|
static STRING *wholestr = (STRING *)0;
|
||||||
|
|
||||||
@ -77,7 +86,7 @@ ReadLine2(FILE *fp, STRING *save, int *iLine)
|
|||||||
|| peek) {
|
|| peek) {
|
||||||
/* If we have a previously saved line, use it instead */
|
/* If we have a previously saved line, use it instead */
|
||||||
if (save->used) {
|
if (save->used) {
|
||||||
StrCpy(buf, save->string, sizeof(buf));
|
strcpy(buf, save->string);
|
||||||
BuildString((char *)0, save);
|
BuildString((char *)0, save);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +112,7 @@ ReadLine2(FILE *fp, STRING *save, int *iLine)
|
|||||||
if (!isspace((int)buf[i]))
|
if (!isspace((int)buf[i]))
|
||||||
break;
|
break;
|
||||||
if (buf[i] == '#') {
|
if (buf[i] == '#') {
|
||||||
|
comment = 1;
|
||||||
commentCheck = 0;
|
commentCheck = 0;
|
||||||
} else if (buf[i] != '\000') {
|
} else if (buf[i] != '\000') {
|
||||||
commentCheck = 0;
|
commentCheck = 0;
|
||||||
@ -113,11 +123,14 @@ ReadLine2(FILE *fp, STRING *save, int *iLine)
|
|||||||
buflen = strlen(buf);
|
buflen = strlen(buf);
|
||||||
if ((buflen >= 1) && (buf[buflen - 1] == '\n')) {
|
if ((buflen >= 1) && (buf[buflen - 1] == '\n')) {
|
||||||
(*iLine)++; /* Finally have a whole line */
|
(*iLine)++; /* Finally have a whole line */
|
||||||
|
/* if (comment == 0 && commentCheck == 0) { */
|
||||||
/* Finish off the chunk without the \n */
|
/* Finish off the chunk without the \n */
|
||||||
buf[buflen - 1] = '\000';
|
buf[buflen - 1] = '\000';
|
||||||
BuildString(buf, bufstr);
|
BuildString(buf, bufstr);
|
||||||
wholeline = BuildString(bufstr->string, wholestr);
|
wholeline = BuildString(bufstr->string, wholestr);
|
||||||
|
/* }*/
|
||||||
peek = 1;
|
peek = 1;
|
||||||
|
comment = 0;
|
||||||
commentCheck = 1;
|
commentCheck = 1;
|
||||||
BuildString((char *)0, bufstr);
|
BuildString((char *)0, bufstr);
|
||||||
} else {
|
} else {
|
||||||
@ -129,6 +142,10 @@ ReadLine2(FILE *fp, STRING *save, int *iLine)
|
|||||||
/* If we hit the EOF and weren't peeking ahead
|
/* If we hit the EOF and weren't peeking ahead
|
||||||
* and it's not a comment
|
* and it's not a comment
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
if (!peek && (ret == (char *)0) && (comment == 0) &&
|
||||||
|
(commentCheck == 0)) {
|
||||||
|
*/
|
||||||
if (!peek && (ret == (char *)0)) {
|
if (!peek && (ret == (char *)0)) {
|
||||||
(*iLine)++;
|
(*iLine)++;
|
||||||
wholeline = BuildString(bufstr->string, wholestr);
|
wholeline = BuildString(bufstr->string, wholestr);
|
||||||
@ -145,7 +162,13 @@ ReadLine2(FILE *fp, STRING *save, int *iLine)
|
|||||||
* to manage the consoles
|
* to manage the consoles
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ReadCfg(char *pcFile, FILE *fp)
|
ReadCfg(char *pcFile, FILE *fp)
|
||||||
|
#else
|
||||||
|
ReadCfg(pcFile, fp)
|
||||||
|
char *pcFile;
|
||||||
|
FILE *fp;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int iLine;
|
int iLine;
|
||||||
unsigned char *acIn;
|
unsigned char *acIn;
|
||||||
@ -409,6 +432,7 @@ ReadCfg(char *pcFile, FILE *fp)
|
|||||||
(unsigned char *)ReadLine2(fp, acInSave,
|
(unsigned char *)ReadLine2(fp, acInSave,
|
||||||
&iLine)) != (unsigned char *)0) {
|
&iLine)) != (unsigned char *)0) {
|
||||||
char *pcNext;
|
char *pcNext;
|
||||||
|
char cType;
|
||||||
|
|
||||||
acStart = PruneSpace((char *)acIn);
|
acStart = PruneSpace((char *)acIn);
|
||||||
if (acStart[0] == '#') {
|
if (acStart[0] == '#') {
|
||||||
@ -454,6 +478,7 @@ ReadCfg(char *pcFile, FILE *fp)
|
|||||||
printf("\ttrusted %s;\n", pcNext);
|
printf("\ttrusted %s;\n", pcNext);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cType = ' ';
|
||||||
Error("%s(%d) unknown access key `%s'", pcFile, iLine,
|
Error("%s(%d) unknown access key `%s'", pcFile, iLine,
|
||||||
acStart);
|
acStart);
|
||||||
break;
|
break;
|
||||||
@ -465,7 +490,13 @@ ReadCfg(char *pcFile, FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
#if PROTOTYPES
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
|
#else
|
||||||
|
main(argc, argv)
|
||||||
|
int argc;
|
||||||
|
char **argv;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
char *pcFile;
|
char *pcFile;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: cutil.h,v 1.63 2004/05/25 00:38:15 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if PROTOTYPES
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
# include <openssl/bn.h>
|
|
||||||
# include <openssl/dh.h>
|
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
# if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
# define TLS_method SSLv23_method
|
|
||||||
# endif/* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
|
||||||
# if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
# define CIPHER_SEC0
|
|
||||||
# else
|
|
||||||
# define CIPHER_SEC0 ":@SECLEVEL=0"
|
|
||||||
# endif/* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
|
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
# include <gssapi/gssapi.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* communication constants
|
/* communication constants
|
||||||
@ -52,9 +45,6 @@ typedef enum IOState {
|
|||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
INSSLACCEPT,
|
INSSLACCEPT,
|
||||||
INSSLSHUTDOWN,
|
INSSLSHUTDOWN,
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
INGSSACCEPT,
|
|
||||||
#endif
|
#endif
|
||||||
ISFLUSHING
|
ISFLUSHING
|
||||||
} IOSTATE;
|
} IOSTATE;
|
||||||
@ -80,7 +70,6 @@ typedef struct consFile {
|
|||||||
int fd;
|
int fd;
|
||||||
int fdout; /* only used when a simplePipe */
|
int fdout; /* only used when a simplePipe */
|
||||||
STRING *wbuf;
|
STRING *wbuf;
|
||||||
FLAG errored;
|
|
||||||
FLAG quoteiac;
|
FLAG quoteiac;
|
||||||
FLAG sawiac;
|
FLAG sawiac;
|
||||||
FLAG sawiacsusp;
|
FLAG sawiacsusp;
|
||||||
@ -102,15 +91,15 @@ typedef struct consFile {
|
|||||||
|
|
||||||
typedef struct item {
|
typedef struct item {
|
||||||
char *id;
|
char *id;
|
||||||
void (*reg)(char *);
|
void (*reg) PARAMS((char *));
|
||||||
} ITEM;
|
} ITEM;
|
||||||
|
|
||||||
typedef struct section {
|
typedef struct section {
|
||||||
char *id;
|
char *id;
|
||||||
void (*begin)(char *);
|
void (*begin) PARAMS((char *));
|
||||||
void (*end)(void);
|
void (*end) PARAMS((void));
|
||||||
void (*abort)(void);
|
void (*abort) PARAMS((void));
|
||||||
void (*destroy)(void);
|
void (*destroy) PARAMS((void));
|
||||||
ITEM *items;
|
ITEM *items;
|
||||||
} SECTION;
|
} SECTION;
|
||||||
|
|
||||||
@ -121,16 +110,14 @@ typedef enum substToken {
|
|||||||
} SUBSTTOKEN;
|
} SUBSTTOKEN;
|
||||||
|
|
||||||
typedef struct subst {
|
typedef struct subst {
|
||||||
/* function to retrieve a token type based on a character
|
SUBSTTOKEN tokens[255];
|
||||||
*/
|
|
||||||
SUBSTTOKEN (*token)(char);
|
|
||||||
/* data for callback function
|
/* data for callback function
|
||||||
*/
|
*/
|
||||||
void *data;
|
void *data;
|
||||||
/* function to retrieve a value (as a char* or int or both) for
|
/* function to retrieve a value (as a char* or int or both) for
|
||||||
* a substitution
|
* a substitution
|
||||||
*/
|
*/
|
||||||
int (*value)(char, char **, int *);
|
int (*callback) PARAMS((char, char **, int *));
|
||||||
} SUBST;
|
} SUBST;
|
||||||
|
|
||||||
extern int isMultiProc, fDebug, fVerbose, fErrorPrinted;
|
extern int isMultiProc, fDebug, fVerbose, fErrorPrinted;
|
||||||
@ -138,9 +125,7 @@ extern char *progname;
|
|||||||
extern pid_t thepid;
|
extern pid_t thepid;
|
||||||
#define MAXHOSTNAME 1024
|
#define MAXHOSTNAME 1024
|
||||||
extern char myHostname[];
|
extern char myHostname[];
|
||||||
#if !USE_IPV6
|
|
||||||
extern struct in_addr *myAddrs;
|
extern struct in_addr *myAddrs;
|
||||||
#endif
|
|
||||||
extern fd_set rinit;
|
extern fd_set rinit;
|
||||||
extern fd_set winit;
|
extern fd_set winit;
|
||||||
extern int maxfd;
|
extern int maxfd;
|
||||||
@ -151,75 +136,70 @@ extern char *file; /* used by ParseFile */
|
|||||||
extern SECTION sections[]; /* used by ParseFile */
|
extern SECTION sections[]; /* used by ParseFile */
|
||||||
extern int isMaster;
|
extern int isMaster;
|
||||||
|
|
||||||
extern const char *StrTime(time_t *);
|
extern const char *StrTime PARAMS((time_t *));
|
||||||
extern void Debug(int, char *, ...);
|
extern void Debug PARAMS((int, char *, ...));
|
||||||
extern void Error(char *, ...);
|
extern void Error PARAMS((char *, ...));
|
||||||
extern void Msg(char *, ...);
|
extern void Msg PARAMS((char *, ...));
|
||||||
extern void Verbose(char *, ...);
|
extern void Verbose PARAMS((char *, ...));
|
||||||
extern void SimpleSignal(int, RETSIGTYPE(*)(int));
|
extern void SimpleSignal PARAMS((int, RETSIGTYPE(*)(int)));
|
||||||
extern int GetMaxFiles();
|
extern int GetMaxFiles PARAMS(());
|
||||||
extern char *FmtCtl(int, STRING *);
|
extern char *FmtCtl PARAMS((int, STRING *));
|
||||||
extern void FmtCtlStr(char *, int, STRING *);
|
extern void FmtCtlStr PARAMS((char *, int, STRING *));
|
||||||
extern CONSFILE *FileOpenFD(int, enum consFileType);
|
extern CONSFILE *FileOpenFD PARAMS((int, enum consFileType));
|
||||||
extern CONSFILE *FileOpenPipe(int, int);
|
extern CONSFILE *FileOpenPipe PARAMS((int, int));
|
||||||
extern CONSFILE *FileOpen(const char *, int, int);
|
extern CONSFILE *FileOpen PARAMS((const char *, int, int));
|
||||||
extern int FileClose(CONSFILE **);
|
extern int FileClose PARAMS((CONSFILE **));
|
||||||
extern int FileRead(CONSFILE *, void *, int);
|
extern int FileRead PARAMS((CONSFILE *, void *, int));
|
||||||
extern int FileWrite(CONSFILE *, FLAG, char *, int);
|
extern int FileWrite PARAMS((CONSFILE *, FLAG, char *, int));
|
||||||
extern void FileVWrite(CONSFILE *, FLAG, char *, va_list);
|
extern void FileVWrite PARAMS((CONSFILE *, FLAG, char *, va_list));
|
||||||
extern void FilePrint(CONSFILE *, FLAG, char *, ...);
|
extern void FilePrint PARAMS((CONSFILE *, FLAG, char *, ...));
|
||||||
extern int FileStat(CONSFILE *, struct stat *);
|
extern int FileStat PARAMS((CONSFILE *, struct stat *));
|
||||||
extern int FileSeek(CONSFILE *, off_t, int);
|
extern int FileSeek PARAMS((CONSFILE *, off_t, int));
|
||||||
extern int FileSend(CONSFILE *, const void *, size_t, int);
|
extern int FileSend PARAMS((CONSFILE *, const void *, size_t, int));
|
||||||
extern int FileFDNum(CONSFILE *);
|
extern int FileFDNum PARAMS((CONSFILE *));
|
||||||
extern int FileFDOutNum(CONSFILE *);
|
extern int FileFDOutNum PARAMS((CONSFILE *));
|
||||||
extern int FileUnopen(CONSFILE *);
|
extern int FileUnopen PARAMS((CONSFILE *));
|
||||||
extern void OutOfMem();
|
extern void OutOfMem PARAMS(());
|
||||||
extern char *BuildTmpString(const char *);
|
extern char *BuildTmpString PARAMS((const char *));
|
||||||
extern char *BuildTmpStringChar(const char);
|
extern char *BuildTmpStringChar PARAMS((const char));
|
||||||
extern char *BuildTmpStringPrint(char *, ...);
|
extern char *BuildTmpStringPrint PARAMS((char *, ...));
|
||||||
extern char *BuildString(const char *, STRING *);
|
extern char *BuildString PARAMS((const char *, STRING *));
|
||||||
extern char *BuildStringChar(const char, STRING *);
|
extern char *BuildStringChar PARAMS((const char, STRING *));
|
||||||
extern char *BuildStringPrint(STRING *, char *, ...);
|
extern char *BuildStringPrint PARAMS((STRING *, char *, ...));
|
||||||
extern char *BuildStringN(const char *, int, STRING *);
|
extern char *BuildStringN PARAMS((const char *, int, STRING *));
|
||||||
extern char *ShiftString(STRING *, int);
|
extern char *ShiftString PARAMS((STRING *, int));
|
||||||
extern void InitString(STRING *);
|
extern void InitString PARAMS((STRING *));
|
||||||
extern void DestroyString(STRING *);
|
extern void DestroyString PARAMS((STRING *));
|
||||||
extern void DestroyStrings(void);
|
extern void DestroyStrings PARAMS((void));
|
||||||
extern STRING *AllocString(void);
|
extern STRING *AllocString PARAMS((void));
|
||||||
extern char *ReadLine(FILE *, STRING *, int *);
|
extern char *ReadLine PARAMS((FILE *, STRING *, int *));
|
||||||
extern enum consFileType FileGetType(CONSFILE *);
|
extern enum consFileType FileGetType PARAMS((CONSFILE *));
|
||||||
extern void FileSetType(CONSFILE *, enum consFileType);
|
extern void FileSetType PARAMS((CONSFILE *, enum consFileType));
|
||||||
extern void FileSetQuoteIAC(CONSFILE *, FLAG);
|
extern void FileSetQuoteIAC PARAMS((CONSFILE *, FLAG));
|
||||||
extern FLAG FileSawQuoteSusp(CONSFILE *);
|
extern FLAG FileSawQuoteSusp PARAMS((CONSFILE *));
|
||||||
extern FLAG FileSawQuoteExec(CONSFILE *);
|
extern FLAG FileSawQuoteExec PARAMS((CONSFILE *));
|
||||||
extern FLAG FileSawQuoteAbrt(CONSFILE *);
|
extern FLAG FileSawQuoteAbrt PARAMS((CONSFILE *));
|
||||||
extern FLAG FileSawQuoteGoto(CONSFILE *);
|
extern FLAG FileSawQuoteGoto PARAMS((CONSFILE *));
|
||||||
extern void Bye(int);
|
extern void Bye PARAMS((int));
|
||||||
extern void DestroyDataStructures(void);
|
extern void DestroyDataStructures PARAMS((void));
|
||||||
extern int IsMe(char *);
|
extern int IsMe PARAMS((char *));
|
||||||
extern char *PruneSpace(char *);
|
extern char *PruneSpace PARAMS((char *));
|
||||||
extern int FileCanRead(CONSFILE *, fd_set *, fd_set *);
|
extern int FileCanRead PARAMS((CONSFILE *, fd_set *, fd_set *));
|
||||||
extern int FileCanWrite(CONSFILE *, fd_set *, fd_set *);
|
extern int FileCanWrite PARAMS((CONSFILE *, fd_set *, fd_set *));
|
||||||
extern int FileBufEmpty(CONSFILE *);
|
extern int FileBufEmpty PARAMS((CONSFILE *));
|
||||||
extern int SetFlags(int, int, int);
|
extern int SetFlags PARAMS((int, int, int));
|
||||||
extern char *StrDup(const char *);
|
extern char *StrDup PARAMS((char *));
|
||||||
extern int ParseIACBuf(CONSFILE *, void *, int *);
|
extern int ParseIACBuf PARAMS((CONSFILE *, void *, int *));
|
||||||
extern void *MemMove(void *, void *, size_t);
|
extern void *MemMove PARAMS((void *, void *, size_t));
|
||||||
extern char *StringChar(STRING *, int, char);
|
extern char *StringChar PARAMS((STRING *, int, char));
|
||||||
extern void ParseFile(char *, FILE *, int);
|
extern void ParseFile PARAMS((char *, FILE *, int));
|
||||||
#if !USE_IPV6
|
extern void ProbeInterfaces PARAMS((in_addr_t));
|
||||||
extern void ProbeInterfaces(in_addr_t);
|
extern void ProcessSubst
|
||||||
#endif
|
PARAMS((SUBST *, char **, char **, char *, char *));
|
||||||
extern void ProcessSubst(SUBST *, char **, char **, char *, char *);
|
|
||||||
extern char *MyVersion(void);
|
|
||||||
extern unsigned int AtoU(char *);
|
|
||||||
extern void StrCpy(char *, const char *, unsigned int);
|
|
||||||
extern void Sleep(useconds_t);
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
extern SSL *FileGetSSL(CONSFILE *);
|
extern SSL *FileGetSSL PARAMS((CONSFILE *));
|
||||||
extern void FileSetSSL(CONSFILE *, SSL *);
|
extern void FileSetSSL PARAMS((CONSFILE *, SSL *));
|
||||||
extern int SSLVerifyCallback(int, X509_STORE_CTX *);
|
extern int SSLVerifyCallback PARAMS((int, X509_STORE_CTX *));
|
||||||
extern int FileSSLAccept(CONSFILE *);
|
extern int FileSSLAccept PARAMS((CONSFILE *));
|
||||||
extern int FileCanSSLAccept(CONSFILE *, fd_set *, fd_set *);
|
extern int FileCanSSLAccept PARAMS((CONSFILE *, fd_set *, fd_set *));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: fallback.c,v 5.61 2004/04/16 16:58:09 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -25,7 +27,13 @@
|
|||||||
* packages, i think things are ok...hopefully it's true!
|
* packages, i think things are ok...hopefully it's true!
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
#if PROTOTYPES
|
||||||
GetPseudoTTY(STRING *slave, int *slaveFD)
|
GetPseudoTTY(STRING *slave, int *slaveFD)
|
||||||
|
#else
|
||||||
|
GetPseudoTTY(slave, slaveFD)
|
||||||
|
STRING *slave;
|
||||||
|
int *slaveFD;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if HAVE_OPENPTY
|
#if HAVE_OPENPTY
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
@ -35,7 +43,7 @@ GetPseudoTTY(STRING *slave, int *slaveFD)
|
|||||||
#if HAVE_SIGACTION
|
#if HAVE_SIGACTION
|
||||||
sigset_t oldmask, newmask;
|
sigset_t oldmask, newmask;
|
||||||
#else
|
#else
|
||||||
extern RETSIGTYPE FlagReapVirt(int);
|
extern RETSIGTYPE FlagReapVirt PARAMS((int));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SIGACTION
|
#if HAVE_SIGACTION
|
||||||
@ -83,7 +91,7 @@ GetPseudoTTY(STRING *slave, int *slaveFD)
|
|||||||
#if HAVE_SIGACTION
|
#if HAVE_SIGACTION
|
||||||
sigset_t oldmask, newmask;
|
sigset_t oldmask, newmask;
|
||||||
#else
|
#else
|
||||||
extern RETSIGTYPE FlagReapVirt(int);
|
extern RETSIGTYPE FlagReapVirt PARAMS((int));
|
||||||
#endif
|
#endif
|
||||||
int c;
|
int c;
|
||||||
/* clone list and idea stolen from xemacs distribution */
|
/* clone list and idea stolen from xemacs distribution */
|
||||||
@ -234,7 +242,13 @@ GetPseudoTTY(STRING *slave, int *slaveFD)
|
|||||||
* get a pty using the GetPseudoTTY code above
|
* get a pty using the GetPseudoTTY code above
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
#if PROTOTYPES
|
||||||
FallBack(char **slave, int *sfd)
|
FallBack(char **slave, int *sfd)
|
||||||
|
#else
|
||||||
|
FallBack(slave, sfd)
|
||||||
|
char **slave;
|
||||||
|
int *sfd;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
static STRING *pcTSlave = (STRING *)0;
|
static STRING *pcTSlave = (STRING *)0;
|
||||||
|
2220
conserver/group.c
2220
conserver/group.c
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: group.h,v 5.46 2004/05/25 00:38:15 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -62,27 +64,23 @@ typedef struct grpent { /* group info */
|
|||||||
|
|
||||||
extern time_t timers[];
|
extern time_t timers[];
|
||||||
|
|
||||||
extern void Spawn(GRPENT *, int);
|
extern void Spawn PARAMS((GRPENT *));
|
||||||
extern int CheckPass(char *, char *, FLAG);
|
extern int CheckPass PARAMS((char *, char *));
|
||||||
extern void TagLogfile(const CONSENT *, char *, ...);
|
extern void TagLogfile PARAMS((const CONSENT *, char *, ...));
|
||||||
extern void TagLogfileAct(const CONSENT *, char *, ...);
|
extern void TagLogfileAct PARAMS((const CONSENT *, char *, ...));
|
||||||
extern void DestroyGroup(GRPENT *);
|
extern void DestroyGroup PARAMS((GRPENT *));
|
||||||
extern void DestroyConsent(GRPENT *, CONSENT *);
|
extern void DestroyConsent PARAMS((GRPENT *, CONSENT *));
|
||||||
extern void SendClientsMsg(CONSENT *, char *);
|
extern void SendClientsMsg PARAMS((CONSENT *, char *));
|
||||||
extern void ResetMark(void);
|
extern void ResetMark PARAMS((void));
|
||||||
extern void DestroyConsentUsers(CONSENTUSERS **);
|
extern void DestroyConsentUsers PARAMS((CONSENTUSERS **));
|
||||||
extern CONSENTUSERS *ConsentFindUser(CONSENTUSERS *, char *);
|
extern CONSENTUSERS *ConsentFindUser PARAMS((CONSENTUSERS *, char *));
|
||||||
extern int ConsentUserOk(CONSENTUSERS *, char *);
|
extern int ConsentUserOk PARAMS((CONSENTUSERS *, char *));
|
||||||
extern void DisconnectClient(GRPENT *, CONSCLIENT *, char *, FLAG);
|
extern void DisconnectClient
|
||||||
extern int ClientAccess(CONSENT *, char *);
|
PARAMS((GRPENT *, CONSCLIENT *, char *, FLAG));
|
||||||
extern void DestroyClient(CONSCLIENT *);
|
extern int ClientAccess PARAMS((CONSENT *, char *));
|
||||||
extern int CheckPasswd(CONSCLIENT *, char *, FLAG);
|
extern void DestroyClient PARAMS((CONSCLIENT *));
|
||||||
extern void DeUtmp(GRPENT *, int);
|
extern int CheckPasswd PARAMS((CONSCLIENT *, char *));
|
||||||
extern void ClientWantsWrite(CONSCLIENT *);
|
extern void DeUtmp PARAMS((GRPENT *, int));
|
||||||
extern void SendIWaitClientsMsg(CONSENT *, char *);
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
extern int AttemptSSL(CONSCLIENT *);
|
extern int AttemptSSL PARAMS((CONSCLIENT *));
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
extern int AttemptGSSAPI(CONSCLIENT *);
|
|
||||||
#endif
|
#endif
|
||||||
|
660
conserver/main.c
660
conserver/main.c
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: main.h,v 5.53 2004/05/21 04:15:17 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -34,18 +36,14 @@
|
|||||||
|
|
||||||
/* program options and stuff
|
/* program options and stuff
|
||||||
*/
|
*/
|
||||||
|
extern char rcsid[];
|
||||||
extern int fAll, fNoinit, fInteractive, fStrip, fDaemon, fReopen,
|
extern int fAll, fNoinit, fInteractive, fStrip, fDaemon, fReopen,
|
||||||
fNoautoreup, fSyntaxOnly;
|
fNoautoreup, fSyntaxOnly;
|
||||||
#if USE_IPV6
|
|
||||||
extern struct addrinfo *bindAddr;
|
|
||||||
extern struct addrinfo *bindBaseAddr;
|
|
||||||
#else
|
|
||||||
extern in_addr_t bindAddr;
|
extern in_addr_t bindAddr;
|
||||||
extern struct sockaddr_in in_port;
|
|
||||||
#endif
|
|
||||||
extern unsigned short bindPort, bindBasePort;
|
extern unsigned short bindPort, bindBasePort;
|
||||||
extern char *pcConfig;
|
extern char *pcConfig;
|
||||||
extern int cMaxMemb;
|
extern int cMaxMemb;
|
||||||
|
extern struct sockaddr_in in_port;
|
||||||
extern CONFIG *optConf;
|
extern CONFIG *optConf;
|
||||||
extern CONFIG *config;
|
extern CONFIG *config;
|
||||||
extern CONFIG defConfig;
|
extern CONFIG defConfig;
|
||||||
@ -56,10 +54,6 @@ extern char *interface;
|
|||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
extern SSL_CTX *ctx;
|
extern SSL_CTX *ctx;
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_GSSAPI
|
extern void ReopenLogfile PARAMS((void));
|
||||||
extern gss_name_t gss_myname;
|
extern void ReopenUnifiedlog PARAMS((void));
|
||||||
extern gss_cred_id_t gss_mycreds;
|
extern void DumpDataStructures PARAMS((void));
|
||||||
#endif
|
|
||||||
extern void ReopenLogfile(void);
|
|
||||||
extern void ReopenUnifiedlog(void);
|
|
||||||
extern void DumpDataStructures(void);
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: master.c,v 5.126 2004/05/06 02:09:07 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -34,6 +36,7 @@
|
|||||||
#include <access.h>
|
#include <access.h>
|
||||||
#include <master.h>
|
#include <master.h>
|
||||||
#include <readcfg.h>
|
#include <readcfg.h>
|
||||||
|
#include <version.h>
|
||||||
#include <main.h>
|
#include <main.h>
|
||||||
|
|
||||||
|
|
||||||
@ -47,7 +50,12 @@ static unsigned long dmallocMarkClientConnection = 0;
|
|||||||
|
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagSawCHLD(int sig)
|
FlagSawCHLD(int sig)
|
||||||
|
#else
|
||||||
|
FlagSawCHLD(sig)
|
||||||
|
int sig;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawCHLD = 1;
|
fSawCHLD = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -59,7 +67,11 @@ FlagSawCHLD(int sig)
|
|||||||
* Called when master process receives SIGCHLD
|
* Called when master process receives SIGCHLD
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
FixKids(int msfd)
|
#if PROTOTYPES
|
||||||
|
FixKids()
|
||||||
|
#else
|
||||||
|
FixKids()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int UWbuf;
|
int UWbuf;
|
||||||
@ -112,7 +124,7 @@ FixKids(int msfd)
|
|||||||
|
|
||||||
/* this kid kid is dead, start another
|
/* this kid kid is dead, start another
|
||||||
*/
|
*/
|
||||||
Spawn(pGE, msfd);
|
Spawn(pGE);
|
||||||
Verbose("group #%d pid %lu on port %hu", pGE->id,
|
Verbose("group #%d pid %lu on port %hu", pGE->id,
|
||||||
(unsigned long)pGE->pid, pGE->port);
|
(unsigned long)pGE->pid, pGE->port);
|
||||||
}
|
}
|
||||||
@ -123,7 +135,12 @@ FixKids(int msfd)
|
|||||||
* Called when master process receives SIGTERM
|
* Called when master process receives SIGTERM
|
||||||
*/
|
*/
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagQuitIt(int arg)
|
FlagQuitIt(int arg)
|
||||||
|
#else
|
||||||
|
FlagQuitIt(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawQuit = 1;
|
fSawQuit = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -135,7 +152,12 @@ FlagQuitIt(int arg)
|
|||||||
* want to do something special on SIGINT at some point.
|
* want to do something special on SIGINT at some point.
|
||||||
*/
|
*/
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagSawINT(int arg)
|
FlagSawINT(int arg)
|
||||||
|
#else
|
||||||
|
FlagSawINT(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawQuit = 1;
|
fSawQuit = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -144,7 +166,12 @@ FlagSawINT(int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagSawHUP(int arg)
|
FlagSawHUP(int arg)
|
||||||
|
#else
|
||||||
|
FlagSawHUP(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawHUP = 1;
|
fSawHUP = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -153,7 +180,12 @@ FlagSawHUP(int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagSawUSR2(int arg)
|
FlagSawUSR2(int arg)
|
||||||
|
#else
|
||||||
|
FlagSawUSR2(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawUSR2 = 1;
|
fSawUSR2 = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -162,7 +194,12 @@ FlagSawUSR2(int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
|
#if PROTOTYPES
|
||||||
FlagSawUSR1(int arg)
|
FlagSawUSR1(int arg)
|
||||||
|
#else
|
||||||
|
FlagSawUSR1(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
fSawUSR1 = 1;
|
fSawUSR1 = 1;
|
||||||
#if !HAVE_SIGACTION
|
#if !HAVE_SIGACTION
|
||||||
@ -173,7 +210,12 @@ FlagSawUSR1(int arg)
|
|||||||
/* Signal all the kids...
|
/* Signal all the kids...
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
SignalKids(int arg)
|
SignalKids(int arg)
|
||||||
|
#else
|
||||||
|
SignalKids(arg)
|
||||||
|
int arg;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
GRPENT *pGE;
|
GRPENT *pGE;
|
||||||
|
|
||||||
@ -190,7 +232,12 @@ SignalKids(int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
REMOTE *
|
REMOTE *
|
||||||
|
#if PROTOTYPES
|
||||||
FindRemoteConsole(char *args)
|
FindRemoteConsole(char *args)
|
||||||
|
#else
|
||||||
|
FindRemoteConsole(args)
|
||||||
|
char *args;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
REMOTE *pRC;
|
REMOTE *pRC;
|
||||||
NAMES *name;
|
NAMES *name;
|
||||||
@ -207,7 +254,13 @@ FindRemoteConsole(char *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
CommandCall(CONSCLIENT *pCL, char *args)
|
CommandCall(CONSCLIENT *pCL, char *args)
|
||||||
|
#else
|
||||||
|
CommandCall(pCL, args)
|
||||||
|
CONSCLIENT *pCL;
|
||||||
|
char *args;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int found;
|
int found;
|
||||||
REMOTE *pRC, *pRCFound;
|
REMOTE *pRC, *pRCFound;
|
||||||
@ -239,8 +292,7 @@ CommandCall(CONSCLIENT *pCL, char *args)
|
|||||||
pRCFound = pRC;
|
pRCFound = pRC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == 0 && config->autocomplete == FLAGTRUE) {
|
if (found == 0) { /* Then look for substring matches */
|
||||||
/* Then look for substring matches */
|
|
||||||
NAMES *name = (NAMES *)0;
|
NAMES *name = (NAMES *)0;
|
||||||
int foundOne = 0;
|
int foundOne = 0;
|
||||||
for (pGE = pGroups; pGE != (GRPENT *)0; pGE = pGE->pGEnext) {
|
for (pGE = pGroups; pGE != (GRPENT *)0; pGE = pGE->pGEnext) {
|
||||||
@ -330,7 +382,13 @@ CommandCall(CONSCLIENT *pCL, char *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
DropMasterClient(CONSCLIENT *pCLServing, FLAG force)
|
DropMasterClient(CONSCLIENT *pCLServing, FLAG force)
|
||||||
|
#else
|
||||||
|
DropMasterClient(pCLServing, force)
|
||||||
|
CONSCLIENT *pCLServing;
|
||||||
|
FLAG force;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
/* if we have data buffered and aren't forced to close,
|
/* if we have data buffered and aren't forced to close,
|
||||||
* we can't close quite yet
|
* we can't close quite yet
|
||||||
@ -366,7 +424,12 @@ DropMasterClient(CONSCLIENT *pCLServing, FLAG force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
DoNormalRead(CONSCLIENT *pCLServing)
|
DoNormalRead(CONSCLIENT *pCLServing)
|
||||||
|
#else
|
||||||
|
DoNormalRead(pCLServing)
|
||||||
|
CONSCLIENT *pCLServing;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
char *pcCmd;
|
char *pcCmd;
|
||||||
char *pcArgs;
|
char *pcArgs;
|
||||||
@ -397,9 +460,8 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
|
|
||||||
/* process password here...before we corrupt accmd */
|
/* process password here...before we corrupt accmd */
|
||||||
if (pCLServing->iState == S_PASSWD) {
|
if (pCLServing->iState == S_PASSWD) {
|
||||||
if (CheckPasswd
|
if (CheckPasswd(pCLServing, pCLServing->accmd->string) !=
|
||||||
(pCLServing, pCLServing->accmd->string, FLAGFALSE)
|
AUTH_SUCCESS) {
|
||||||
!= AUTH_SUCCESS) {
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"invalid password\r\n", -1);
|
"invalid password\r\n", -1);
|
||||||
BuildString((char *)0, pCLServing->accmd);
|
BuildString((char *)0, pCLServing->accmd);
|
||||||
@ -430,9 +492,6 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
"login log in\r\n",
|
"login log in\r\n",
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
"ssl start ssl session\r\n",
|
"ssl start ssl session\r\n",
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
"gssapi log in with gssapi\r\n",
|
|
||||||
#endif
|
#endif
|
||||||
(char *)0
|
(char *)0
|
||||||
};
|
};
|
||||||
@ -442,13 +501,10 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
"groups provide ports for group leaders\r\n",
|
"groups provide ports for group leaders\r\n",
|
||||||
"help this help message\r\n",
|
"help this help message\r\n",
|
||||||
"master provide a list of master servers\r\n",
|
"master provide a list of master servers\r\n",
|
||||||
"newlogs* close and open all logfiles (SIGUSR2)\r\n",
|
|
||||||
"pid provide pid of master process\r\n",
|
"pid provide pid of master process\r\n",
|
||||||
"quit* terminate conserver (SIGTERM)\r\n",
|
"quit* terminate conserver (SIGTERM)\r\n",
|
||||||
"restart* restart conserver (SIGHUP) - deprecated\r\n",
|
"restart* restart conserver (SIGHUP)\r\n",
|
||||||
"reconfig* reread config file (SIGHUP)\r\n",
|
|
||||||
"version provide version info for server\r\n",
|
"version provide version info for server\r\n",
|
||||||
"up* bring up all downed consoles (SIGUSR1)\r\n",
|
|
||||||
"* = requires admin privileges\r\n",
|
"* = requires admin privileges\r\n",
|
||||||
(char *)0
|
(char *)0
|
||||||
};
|
};
|
||||||
@ -471,14 +527,6 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
DropMasterClient(pCLServing, FLAGFALSE);
|
DropMasterClient(pCLServing, FLAGFALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
} else if (pCLServing->iState == S_IDENT &&
|
|
||||||
strcmp(pcCmd, "gssapi") == 0) {
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE, "ok\r\n", -1);
|
|
||||||
/* Change the I/O mode right away, we'll do the read
|
|
||||||
* and accept when the select gets back to us */
|
|
||||||
pCLServing->ioState = INGSSACCEPT;
|
|
||||||
#endif
|
#endif
|
||||||
} else if (pCLServing->iState == S_IDENT &&
|
} else if (pCLServing->iState == S_IDENT &&
|
||||||
strcmp(pcCmd, "login") == 0) {
|
strcmp(pcCmd, "login") == 0) {
|
||||||
@ -501,8 +549,7 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
BuildString(pCLServing->peername->string,
|
BuildString(pCLServing->peername->string,
|
||||||
pCLServing->acid);
|
pCLServing->acid);
|
||||||
if (pCLServing->caccess == 't' ||
|
if (pCLServing->caccess == 't' ||
|
||||||
CheckPasswd(pCLServing, "",
|
CheckPasswd(pCLServing, "") == AUTH_SUCCESS) {
|
||||||
FLAGTRUE) == AUTH_SUCCESS) {
|
|
||||||
pCLServing->iState = S_NORMAL;
|
pCLServing->iState = S_NORMAL;
|
||||||
Verbose("<master> login %s",
|
Verbose("<master> login %s",
|
||||||
pCLServing->acid->string);
|
pCLServing->acid->string);
|
||||||
@ -522,9 +569,11 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
int iSep = 1;
|
int iSep = 1;
|
||||||
|
|
||||||
if ((GRPENT *)0 != pGroups) {
|
if ((GRPENT *)0 != pGroups) {
|
||||||
#if USE_IPV6 || !USE_UNIX_DOMAIN_SOCKETS
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
SOCKADDR_STYPE lcl;
|
FilePrint(pCLServing->fd, FLAGTRUE, "@0");
|
||||||
|
iSep = 0;
|
||||||
|
#else
|
||||||
|
struct sockaddr_in lcl;
|
||||||
socklen_t so = sizeof(lcl);
|
socklen_t so = sizeof(lcl);
|
||||||
if (-1 ==
|
if (-1 ==
|
||||||
getsockname(FileFDNum(pCLServing->fd),
|
getsockname(FileFDNum(pCLServing->fd),
|
||||||
@ -536,37 +585,19 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
FileFDNum(pCLServing->fd), strerror(errno));
|
FileFDNum(pCLServing->fd), strerror(errno));
|
||||||
iSep = -1;
|
iSep = -1;
|
||||||
} else {
|
} else {
|
||||||
# if USE_IPV6
|
|
||||||
int error;
|
|
||||||
char addr[NI_MAXHOST];
|
|
||||||
error =
|
|
||||||
getnameinfo((struct sockaddr *)&lcl, so, addr,
|
|
||||||
sizeof(addr), NULL, 0,
|
|
||||||
NI_NUMERICHOST);
|
|
||||||
if (!error)
|
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, "@%s",
|
|
||||||
addr);
|
|
||||||
# else
|
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, "@%s",
|
FilePrint(pCLServing->fd, FLAGTRUE, "@%s",
|
||||||
inet_ntoa(lcl.sin_addr));
|
inet_ntoa(lcl.sin_addr));
|
||||||
# endif
|
|
||||||
iSep = 0;
|
iSep = 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, "@0");
|
|
||||||
iSep = 0;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (iSep >= 0) {
|
if (iSep >= 0) {
|
||||||
if (config->redirect == FLAGTRUE) {
|
if (config->redirect == FLAGTRUE) {
|
||||||
REMOTE *pRC;
|
REMOTE *pRC;
|
||||||
char *s;
|
|
||||||
for (pRC = pRCUniq; (REMOTE *)0 != pRC;
|
for (pRC = pRCUniq; (REMOTE *)0 != pRC;
|
||||||
pRC = pRC->pRCuniq) {
|
pRC = pRC->pRCuniq) {
|
||||||
s = ":@%s";
|
FilePrint(pCLServing->fd, FLAGTRUE,
|
||||||
s += iSep;
|
":@%s" + iSep, pRC->rhost);
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, s,
|
|
||||||
pRC->rhost);
|
|
||||||
iSep = 0;
|
iSep = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,7 +610,7 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
} else if (pCLServing->iState == S_NORMAL &&
|
} else if (pCLServing->iState == S_NORMAL &&
|
||||||
strcmp(pcCmd, "version") == 0) {
|
strcmp(pcCmd, "version") == 0) {
|
||||||
FilePrint(pCLServing->fd, FLAGFALSE, "version `%s'\r\n",
|
FilePrint(pCLServing->fd, FLAGFALSE, "version `%s'\r\n",
|
||||||
MyVersion());
|
THIS_VERSION);
|
||||||
} else if (pCLServing->iState == S_NORMAL &&
|
} else if (pCLServing->iState == S_NORMAL &&
|
||||||
strcmp(pcCmd, "quit") == 0) {
|
strcmp(pcCmd, "quit") == 0) {
|
||||||
if (ConsentUserOk(pADList, pCLServing->username->string) ==
|
if (ConsentUserOk(pADList, pCLServing->username->string) ==
|
||||||
@ -606,53 +637,16 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
} else
|
} else
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
FileWrite(pCLServing->fd, FLAGFALSE,
|
||||||
"unauthorized command\r\n", -1);
|
"unauthorized command\r\n", -1);
|
||||||
} else if (pCLServing->iState == S_NORMAL &&
|
|
||||||
strcmp(pcCmd, "reconfig") == 0) {
|
|
||||||
if (ConsentUserOk(pADList, pCLServing->username->string) ==
|
|
||||||
1) {
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"ok -- reconfiguring\r\n", -1);
|
|
||||||
Verbose("reconfig command by %s",
|
|
||||||
pCLServing->acid->string);
|
|
||||||
kill(thepid, SIGHUP);
|
|
||||||
} else
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"unauthorized command\r\n", -1);
|
|
||||||
} else if (pCLServing->iState == S_NORMAL &&
|
|
||||||
strcmp(pcCmd, "up") == 0) {
|
|
||||||
if (ConsentUserOk(pADList, pCLServing->username->string) ==
|
|
||||||
1) {
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"ok -- bringing up consoles\r\n", -1);
|
|
||||||
Verbose("up command by %s", pCLServing->acid->string);
|
|
||||||
kill(thepid, SIGUSR1);
|
|
||||||
} else
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"unauthorized command\r\n", -1);
|
|
||||||
} else if (pCLServing->iState == S_NORMAL &&
|
|
||||||
strcmp(pcCmd, "newlogs") == 0) {
|
|
||||||
if (ConsentUserOk(pADList, pCLServing->username->string) ==
|
|
||||||
1) {
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"ok -- opening new logfiles\r\n", -1);
|
|
||||||
Verbose("newlogs command by %s",
|
|
||||||
pCLServing->acid->string);
|
|
||||||
kill(thepid, SIGUSR2);
|
|
||||||
} else
|
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE,
|
|
||||||
"unauthorized command\r\n", -1);
|
|
||||||
} else if (pCLServing->iState == S_NORMAL &&
|
} else if (pCLServing->iState == S_NORMAL &&
|
||||||
strcmp(pcCmd, "groups") == 0) {
|
strcmp(pcCmd, "groups") == 0) {
|
||||||
int iSep = 1;
|
int iSep = 1;
|
||||||
GRPENT *pGE;
|
GRPENT *pGE;
|
||||||
char *s;
|
|
||||||
|
|
||||||
for (pGE = pGroups; pGE != (GRPENT *)0; pGE = pGE->pGEnext) {
|
for (pGE = pGroups; pGE != (GRPENT *)0; pGE = pGE->pGEnext) {
|
||||||
if (0 == pGE->imembers)
|
if (0 == pGE->imembers)
|
||||||
continue;
|
continue;
|
||||||
s = ":%hu";
|
FilePrint(pCLServing->fd, FLAGTRUE, ":%hu" + iSep,
|
||||||
s += iSep;
|
pGE->port);
|
||||||
FilePrint(pCLServing->fd, FLAGTRUE, s, pGE->port);
|
|
||||||
iSep = 0;
|
iSep = 0;
|
||||||
}
|
}
|
||||||
FileWrite(pCLServing->fd, FLAGFALSE, "\r\n", 2);
|
FileWrite(pCLServing->fd, FLAGFALSE, "\r\n", 2);
|
||||||
@ -677,24 +671,22 @@ DoNormalRead(CONSCLIENT *pCLServing)
|
|||||||
/* this routine is used by the master console server process (ksb)
|
/* this routine is used by the master console server process (ksb)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
Master(void)
|
Master(void)
|
||||||
|
#else
|
||||||
|
Master()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int cfd;
|
int cfd;
|
||||||
int msfd;
|
int msfd;
|
||||||
socklen_t so;
|
socklen_t so;
|
||||||
fd_set rmask, wmask;
|
fd_set rmask, wmask;
|
||||||
#if USE_IPV6 || !USE_UNIX_DOMAIN_SOCKETS
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
# if USE_IPV6
|
|
||||||
struct addrinfo *rp;
|
|
||||||
# else
|
|
||||||
struct sockaddr_in master_port;
|
|
||||||
# endif
|
|
||||||
# if HAVE_SETSOCKOPT
|
|
||||||
int sock_opt_true = 1;
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
struct sockaddr_un master_port;
|
struct sockaddr_un master_port;
|
||||||
static STRING *portPath = (STRING *)0;
|
static STRING *portPath = (STRING *)0;
|
||||||
|
#else
|
||||||
|
struct sockaddr_in master_port;
|
||||||
|
int true = 1;
|
||||||
#endif
|
#endif
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
CONSCLIENT *pCLServing = (CONSCLIENT *)0;
|
CONSCLIENT *pCLServing = (CONSCLIENT *)0;
|
||||||
@ -712,9 +704,6 @@ Master(void)
|
|||||||
#endif
|
#endif
|
||||||
#if defined(SIGPOLL)
|
#if defined(SIGPOLL)
|
||||||
SimpleSignal(SIGPOLL, SIG_IGN);
|
SimpleSignal(SIGPOLL, SIG_IGN);
|
||||||
#endif
|
|
||||||
#if defined(SIGXFSZ)
|
|
||||||
SimpleSignal(SIGXFSZ, SIG_IGN);
|
|
||||||
#endif
|
#endif
|
||||||
SimpleSignal(SIGCHLD, FlagSawCHLD);
|
SimpleSignal(SIGCHLD, FlagSawCHLD);
|
||||||
SimpleSignal(SIGTERM, FlagQuitIt);
|
SimpleSignal(SIGTERM, FlagQuitIt);
|
||||||
@ -734,44 +723,13 @@ Master(void)
|
|||||||
|
|
||||||
/* set up port for master to listen on
|
/* set up port for master to listen on
|
||||||
*/
|
*/
|
||||||
#if !USE_IPV6
|
|
||||||
#if HAVE_MEMSET
|
#if HAVE_MEMSET
|
||||||
memset((void *)&master_port, 0, sizeof(master_port));
|
memset((void *)&master_port, 0, sizeof(master_port));
|
||||||
#else
|
#else
|
||||||
bzero((char *)&master_port, sizeof(master_port));
|
bzero((char *)&master_port, sizeof(master_port));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_IPV6
|
#if USE_UNIX_DOMAIN_SOCKETS
|
||||||
for (rp = bindAddr; rp != NULL; rp = rp->ai_next) {
|
|
||||||
if ((msfd =
|
|
||||||
socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol)) < 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
# if HAVE_SETSOCKOPT
|
|
||||||
if (setsockopt
|
|
||||||
(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&sock_opt_true,
|
|
||||||
sizeof(sock_opt_true)) < 0)
|
|
||||||
goto fail;
|
|
||||||
# endif
|
|
||||||
if (!SetFlags(msfd, O_NONBLOCK, 0))
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
if (bind(msfd, rp->ai_addr, rp->ai_addrlen) == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
close(msfd);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listen(msfd, SOMAXCONN) < 0) {
|
|
||||||
Error("Master(): listen(): %s", strerror(errno));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* save addrlen for accept */
|
|
||||||
so = rp->ai_addrlen;
|
|
||||||
#elif USE_UNIX_DOMAIN_SOCKETS
|
|
||||||
master_port.sun_family = AF_UNIX;
|
master_port.sun_family = AF_UNIX;
|
||||||
|
|
||||||
if (portPath == (STRING *)0)
|
if (portPath == (STRING *)0)
|
||||||
@ -781,8 +739,7 @@ Master(void)
|
|||||||
Error("Master(): path to socket too long: %s", portPath->string);
|
Error("Master(): path to socket too long: %s", portPath->string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
StrCpy(master_port.sun_path, portPath->string,
|
strcpy(master_port.sun_path, portPath->string);
|
||||||
sizeof(master_port.sun_path));
|
|
||||||
|
|
||||||
if ((msfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
if ((msfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||||
Error("Master(): socket(AF_UNIX,SOCK_STREAM): %s",
|
Error("Master(): socket(AF_UNIX,SOCK_STREAM): %s",
|
||||||
@ -804,11 +761,6 @@ Master(void)
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
# ifdef TRUST_UDS_CRED
|
|
||||||
/* Allow everyone to connect, but we later auth them via SO_PEERCRED */
|
|
||||||
chmod(master_port.sun_path, 0666);
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
master_port.sin_family = AF_INET;
|
master_port.sin_family = AF_INET;
|
||||||
master_port.sin_addr.s_addr = bindAddr;
|
master_port.sin_addr.s_addr = bindAddr;
|
||||||
@ -821,8 +773,8 @@ Master(void)
|
|||||||
}
|
}
|
||||||
# if HAVE_SETSOCKOPT
|
# if HAVE_SETSOCKOPT
|
||||||
if (setsockopt
|
if (setsockopt
|
||||||
(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&sock_opt_true,
|
(msfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true,
|
||||||
sizeof(sock_opt_true)) < 0) {
|
sizeof(true)) < 0) {
|
||||||
Error("Master(): setsockopt(%u,SO_REUSEADDR): %s", msfd,
|
Error("Master(): setsockopt(%u,SO_REUSEADDR): %s", msfd,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return;
|
return;
|
||||||
@ -861,7 +813,7 @@ Master(void)
|
|||||||
for (fSawQuit = 0; !fSawQuit; /* can't close here :-( */ ) {
|
for (fSawQuit = 0; !fSawQuit; /* can't close here :-( */ ) {
|
||||||
if (fSawCHLD) {
|
if (fSawCHLD) {
|
||||||
fSawCHLD = 0;
|
fSawCHLD = 0;
|
||||||
FixKids(msfd);
|
FixKids();
|
||||||
}
|
}
|
||||||
if (fSawHUP) {
|
if (fSawHUP) {
|
||||||
fSawHUP = 0;
|
fSawHUP = 0;
|
||||||
@ -869,7 +821,7 @@ Master(void)
|
|||||||
ReopenLogfile();
|
ReopenLogfile();
|
||||||
ReopenUnifiedlog();
|
ReopenUnifiedlog();
|
||||||
SignalKids(SIGHUP);
|
SignalKids(SIGHUP);
|
||||||
ReReadCfg(msfd, msfd);
|
ReReadCfg(msfd);
|
||||||
/* fix up the client descriptors since ReReadCfg() doesn't
|
/* fix up the client descriptors since ReReadCfg() doesn't
|
||||||
* see them like it can in the child processes */
|
* see them like it can in the child processes */
|
||||||
for (pCL = pCLmall; pCL != (CONSCLIENT *)0; pCL = pCL->pCLscan) {
|
for (pCL = pCLmall; pCL != (CONSCLIENT *)0; pCL = pCL->pCLscan) {
|
||||||
@ -923,17 +875,6 @@ Master(void)
|
|||||||
pCLServing->ioState = ISNORMAL;
|
pCLServing->ioState = ISNORMAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if HAVE_GSSAPI
|
|
||||||
case INGSSACCEPT:
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
if ((r = AttemptGSSAPI(pCLServing)) < 0)
|
|
||||||
DropMasterClient(pCLServing, FLAGFALSE);
|
|
||||||
else if (r == 1)
|
|
||||||
pCLServing->ioState = ISNORMAL;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
case ISNORMAL:
|
case ISNORMAL:
|
||||||
if (FileCanRead(pCLServing->fd, &rmask, &wmask))
|
if (FileCanRead(pCLServing->fd, &rmask, &wmask))
|
||||||
@ -945,8 +886,8 @@ Master(void)
|
|||||||
CONDDEBUG((1, "Master(): flushing fd %d",
|
CONDDEBUG((1, "Master(): flushing fd %d",
|
||||||
FileFDNum(pCLServing->fd)));
|
FileFDNum(pCLServing->fd)));
|
||||||
if (FileWrite
|
if (FileWrite
|
||||||
(pCLServing->fd, FLAGFALSE, (char *)0, 0)
|
(pCLServing->fd, FLAGFALSE, (char *)0,
|
||||||
< 0) {
|
0) < 0) {
|
||||||
DropMasterClient(pCLServing, FLAGTRUE);
|
DropMasterClient(pCLServing, FLAGTRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -975,9 +916,7 @@ Master(void)
|
|||||||
dmallocMarkClientConnection = dmalloc_mark();
|
dmallocMarkClientConnection = dmalloc_mark();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !USE_IPV6
|
|
||||||
so = sizeof(struct sockaddr_in);
|
so = sizeof(struct sockaddr_in);
|
||||||
#endif
|
|
||||||
for (cfd = 0; cfd == 0;) {
|
for (cfd = 0; cfd == 0;) {
|
||||||
cfd =
|
cfd =
|
||||||
accept(msfd, (struct sockaddr *)&pCLmfree->cnct_port, &so);
|
accept(msfd, (struct sockaddr *)&pCLmfree->cnct_port, &so);
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: master.h,v 5.17 2003/10/03 14:23:37 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -37,5 +39,5 @@
|
|||||||
*/
|
*/
|
||||||
extern CONSCLIENT *pCLmall;
|
extern CONSCLIENT *pCLmall;
|
||||||
extern CONSCLIENT *pCLmfree;
|
extern CONSCLIENT *pCLmfree;
|
||||||
extern void Master(void);
|
extern void Master PARAMS((void));
|
||||||
extern void SignalKids(int);
|
extern void SignalKids PARAMS((int));
|
||||||
|
2522
conserver/readcfg.c
2522
conserver/readcfg.c
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: readcfg.h,v 5.40 2004/05/25 23:03:01 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BREAKDELAYDEFAULT 250
|
#define BREAKDELAYDEFAULT 250
|
||||||
#define BREAKLISTSIZE 35 /* ('z'-('a'-1))+('9'-('1'-1)) */
|
|
||||||
#define BREAKALPHAOFFSET 39 /* ('a'-('9'+1)) */
|
|
||||||
|
|
||||||
typedef struct config {
|
typedef struct config {
|
||||||
STRING *name;
|
STRING *name;
|
||||||
FLAG autocomplete;
|
|
||||||
char defaultaccess;
|
char defaultaccess;
|
||||||
FLAG daemonmode;
|
FLAG daemonmode;
|
||||||
char *logfile;
|
char *logfile;
|
||||||
@ -18,7 +17,7 @@ typedef struct config {
|
|||||||
char *primaryport;
|
char *primaryport;
|
||||||
FLAG redirect;
|
FLAG redirect;
|
||||||
FLAG loghostnames;
|
FLAG loghostnames;
|
||||||
int reinitcheck; /* stored in sec, configured in min or sec */
|
int reinitcheck;
|
||||||
char *secondaryport;
|
char *secondaryport;
|
||||||
char *unifiedlog;
|
char *unifiedlog;
|
||||||
int initdelay;
|
int initdelay;
|
||||||
@ -28,48 +27,29 @@ typedef struct config {
|
|||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
char *sslcredentials;
|
char *sslcredentials;
|
||||||
FLAG sslrequired;
|
FLAG sslrequired;
|
||||||
FLAG sslreqclientcert;
|
|
||||||
char *sslcacertificatefile;
|
|
||||||
#endif
|
#endif
|
||||||
} CONFIG;
|
} CONFIG;
|
||||||
|
|
||||||
typedef struct breaks {
|
typedef struct breaks {
|
||||||
STRING *seq;
|
STRING *seq;
|
||||||
int delay;
|
int delay;
|
||||||
FLAG confirm;
|
|
||||||
} BREAKS;
|
} BREAKS;
|
||||||
|
|
||||||
typedef struct tasks {
|
|
||||||
char id;
|
|
||||||
STRING *cmd;
|
|
||||||
STRING *descr;
|
|
||||||
uid_t uid;
|
|
||||||
gid_t gid;
|
|
||||||
char *subst;
|
|
||||||
FLAG confirm;
|
|
||||||
struct tasks *next;
|
|
||||||
} TASKS;
|
|
||||||
|
|
||||||
extern NAMES *userList; /* user list */
|
extern NAMES *userList; /* user list */
|
||||||
extern GRPENT *pGroups; /* group info */
|
extern GRPENT *pGroups; /* group info */
|
||||||
extern REMOTE *pRCList; /* list of remote consoles we know about */
|
extern REMOTE *pRCList; /* list of remote consoles we know about */
|
||||||
extern REMOTE *pRCUniq; /* list of uniq console servers */
|
extern REMOTE *pRCUniq; /* list of uniq console servers */
|
||||||
extern ACCESS *pACList; /* `who do you love' (or trust) */
|
extern ACCESS *pACList; /* `who do you love' (or trust) */
|
||||||
extern CONSENTUSERS *pADList; /* list of admin users */
|
extern CONSENTUSERS *pADList; /* list of admin users */
|
||||||
extern CONSENTUSERS *pLUList; /* list of limited users */
|
extern BREAKS breakList[9]; /* list of break sequences */
|
||||||
extern BREAKS breakList[BREAKLISTSIZE]; /* list of break sequences */
|
|
||||||
extern TASKS *taskList; /* list of tasks */
|
|
||||||
extern SUBST *taskSubst; /* substitution function data for tasks */
|
|
||||||
extern CONFIG *pConfig; /* settings seen by config parser */
|
extern CONFIG *pConfig; /* settings seen by config parser */
|
||||||
extern SUBST *substData; /* substitution function data */
|
extern SUBST *substData; /* substitution function data */
|
||||||
|
|
||||||
extern void ReadCfg(char *, FILE *);
|
extern void ReadCfg PARAMS((char *, FILE *));
|
||||||
extern void ReReadCfg(int, int);
|
extern void ReReadCfg PARAMS((int));
|
||||||
extern void DestroyBreakList(void);
|
extern void DestroyBreakList PARAMS((void));
|
||||||
extern void InitBreakList(void);
|
extern void DestroyUserList PARAMS((void));
|
||||||
extern void DestroyTaskList(void);
|
extern void DestroyConfig PARAMS((CONFIG *));
|
||||||
extern void DestroyUserList(void);
|
extern NAMES *FindUserList PARAMS((char *));
|
||||||
extern void DestroyConfig(CONFIG *);
|
extern NAMES *AddUserList PARAMS((char *));
|
||||||
extern NAMES *FindUserList(char *);
|
extern CONSENT *FindConsoleName PARAMS((CONSENT *, char *));
|
||||||
extern NAMES *AddUserList(char *);
|
|
||||||
extern CONSENT *FindConsoleName(CONSENT *, char *);
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: version.h,v 1.63 2004/05/28 17:59:37 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -12,9 +14,4 @@
|
|||||||
@(#) Copyright 2000 conserver.com.\n\
|
@(#) Copyright 2000 conserver.com.\n\
|
||||||
All rights reserved.\n"
|
All rights reserved.\n"
|
||||||
|
|
||||||
#define VERSION_DATE "2022/07/07"
|
#define THIS_VERSION "conserver.com version 8.1.7"
|
||||||
#define VERSION_MAJOR 8
|
|
||||||
#define VERSION_MINOR 2
|
|
||||||
#define VERSION_REV 7
|
|
||||||
#define VERSION_TEXT "conserver.com version"
|
|
||||||
#define VERSION_UINT (VERSION_MAJOR * 1000000 + VERSION_MINOR * 1000 + VERSION_REV)
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
@ -58,6 +56,6 @@ install: console
|
|||||||
$(MKDIR) $(DESTDIR)$(bindir)
|
$(MKDIR) $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_PROGRAM) console $(DESTDIR)$(bindir)
|
$(INSTALL_PROGRAM) console $(DESTDIR)$(bindir)
|
||||||
$(MKDIR) $(DESTDIR)$(mandir)/man1
|
$(MKDIR) $(DESTDIR)$(mandir)/man1
|
||||||
$(INSTALL) -m 0644 console.man $(DESTDIR)$(mandir)/man1/console.1
|
$(INSTALL) console.man $(DESTDIR)$(mandir)/man1/console.1
|
||||||
|
|
||||||
.PHONY: clean distclean install
|
.PHONY: clean distclean install
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,11 @@
|
|||||||
.TH CONSOLE 1 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
.\" $Id: console.man,v 1.54 2004/05/28 00:02:16 bryan Exp $
|
||||||
|
.TH CONSOLE 1 "2004/05/28" "conserver-8.1.7" "conserver"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
console \- console server client program
|
console \- console server client program
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B console
|
.B console
|
||||||
.RI [ generic-args ]
|
|
||||||
.RB [ \-aAfFsS ]
|
.RB [ \-aAfFsS ]
|
||||||
.BR [ \-e
|
.RB [ \-7DEnUv ]
|
||||||
.IR esc ]
|
|
||||||
.I console
|
|
||||||
.br
|
|
||||||
.B console
|
|
||||||
.RI [ generic-args ]
|
|
||||||
.RB [ \-iIuwWx ]
|
|
||||||
.RI [ console ]
|
|
||||||
.br
|
|
||||||
.B console
|
|
||||||
.RI [ generic-args ]
|
|
||||||
.RB [ \-hPqQrRV ]
|
|
||||||
.RB [ \- [ bB ]
|
|
||||||
.IR message ]
|
|
||||||
.RB [ \-d
|
|
||||||
.RI [ user ][\f3@\fP console ]]
|
|
||||||
.RB [ \-t
|
|
||||||
.RI [ user ][\f3@\fP console ]
|
|
||||||
.IR message ]
|
|
||||||
.RB [ \- [ zZ ]
|
|
||||||
.IR cmd ]
|
|
||||||
.PP
|
|
||||||
.IR generic-args :
|
|
||||||
.RB [ \-7DEknUv ]
|
|
||||||
.RB [ \-c
|
.RB [ \-c
|
||||||
.IR cred ]
|
.IR cred ]
|
||||||
.RB [ \-C
|
.RB [ \-C
|
||||||
@ -37,8 +14,42 @@ console \- console server client program
|
|||||||
.IR master ]
|
.IR master ]
|
||||||
.BR [ \-p
|
.BR [ \-p
|
||||||
.IR port ]
|
.IR port ]
|
||||||
|
.BR [ \-e
|
||||||
|
.IR esc ]
|
||||||
.BR [ \-l
|
.BR [ \-l
|
||||||
.IR user ]
|
.IR user ]
|
||||||
|
.I console
|
||||||
|
.br
|
||||||
|
.B console
|
||||||
|
.RB [ \-hiIPrRuVwWx ]
|
||||||
|
.RB [ \-7DEnUv ]
|
||||||
|
.RB [ \-c
|
||||||
|
.IR cred ]
|
||||||
|
.RB [ \-C
|
||||||
|
.IR config ]
|
||||||
|
.RB [ \-M
|
||||||
|
.IR master ]
|
||||||
|
.RB [ \-p
|
||||||
|
.IR port ]
|
||||||
|
.RB [ \-d
|
||||||
|
.RI [ user ][\f3@\fP console ]]
|
||||||
|
.RB [ \- [ bB ]
|
||||||
|
.IR message ]
|
||||||
|
.RB [ \-t
|
||||||
|
.RI [ user ][\f3@\fP console ]
|
||||||
|
.IR message ]
|
||||||
|
.br
|
||||||
|
.B console
|
||||||
|
.RB [ \-qQ ]
|
||||||
|
.RB [ \-7DEnUv ]
|
||||||
|
.RB [ \-c
|
||||||
|
.IR cred ]
|
||||||
|
.RB [ \-C
|
||||||
|
.IR config ]
|
||||||
|
.RB [ \-M
|
||||||
|
.IR master ]
|
||||||
|
.RB [ \-p
|
||||||
|
.IR port ]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B Console
|
.B Console
|
||||||
is used to manipulate console terminals remotely or to poll running
|
is used to manipulate console terminals remotely or to poll running
|
||||||
@ -50,8 +61,7 @@ In the first form above,
|
|||||||
asks the user's password before
|
asks the user's password before
|
||||||
granting interactive access to a console (on a non-trusted system),
|
granting interactive access to a console (on a non-trusted system),
|
||||||
since such a session may provide single-user access.
|
since such a session may provide single-user access.
|
||||||
If the server's autocompletion feature is enabled,
|
Only as much of the console name as is required to
|
||||||
only as much of the console name as is required to
|
|
||||||
identify it uniquely to the server is required.
|
identify it uniquely to the server is required.
|
||||||
.PP
|
.PP
|
||||||
For non-interactive options,
|
For non-interactive options,
|
||||||
@ -118,7 +128,7 @@ Load an SSL certificate and key from the PEM encoded file
|
|||||||
.TP
|
.TP
|
||||||
.BI \-C config
|
.BI \-C config
|
||||||
Use the per-user configuration file
|
Use the per-user configuration file
|
||||||
.IR config .
|
.IR conf .
|
||||||
.TP
|
.TP
|
||||||
.B \-d
|
.B \-d
|
||||||
Disconnect the users specified by
|
Disconnect the users specified by
|
||||||
@ -171,17 +181,13 @@ except it will force any existing connection into spy mode.
|
|||||||
Display a brief help message.
|
Display a brief help message.
|
||||||
.TP
|
.TP
|
||||||
.B \-i
|
.B \-i
|
||||||
Display status information in a machine-parseable format (see below for the details).
|
Display information in a machine-parseable format (see below for the details).
|
||||||
.TP
|
.TP
|
||||||
.B \-I
|
.B \-I
|
||||||
Same as
|
Same as
|
||||||
.B \-i
|
.B \-i
|
||||||
but just acts on the primary server.
|
but just acts on the primary server.
|
||||||
.TP
|
.TP
|
||||||
.B \-k
|
|
||||||
Abort the connection if the console is not in the `up' state immediately
|
|
||||||
upon connecting.
|
|
||||||
.TP
|
|
||||||
.BI \-l user
|
.BI \-l user
|
||||||
Set the login name used for authentication to
|
Set the login name used for authentication to
|
||||||
.IR user .
|
.IR user .
|
||||||
@ -331,72 +337,6 @@ but just acts on the primary server.
|
|||||||
.TP
|
.TP
|
||||||
.B \-x
|
.B \-x
|
||||||
Show a list of consoles and devices.
|
Show a list of consoles and devices.
|
||||||
.TP
|
|
||||||
.BI \-z cmd
|
|
||||||
Sends a command
|
|
||||||
.RI ( cmd )
|
|
||||||
to each server and displays the result.
|
|
||||||
The valid commands are:
|
|
||||||
.RS
|
|
||||||
.sp
|
|
||||||
.PD 0
|
|
||||||
.TP 12
|
|
||||||
.B bringup
|
|
||||||
Try to connect all consoles marked as down (this is equivalent
|
|
||||||
to sending the server a SIGUSR1)
|
|
||||||
.TP
|
|
||||||
.B SIGUSR1
|
|
||||||
Same as
|
|
||||||
.B bringup
|
|
||||||
.TP
|
|
||||||
.B help
|
|
||||||
Displays the help message
|
|
||||||
.TP
|
|
||||||
.B pid
|
|
||||||
Returns the pid of the server (this is equivalent to
|
|
||||||
.BR \-P )
|
|
||||||
.TP
|
|
||||||
.B quit
|
|
||||||
Instructs the server to shut down (this is equivalent to
|
|
||||||
.B \-q
|
|
||||||
or sending the server a SIGTERM)
|
|
||||||
.TP
|
|
||||||
.B SIGTERM
|
|
||||||
Same as
|
|
||||||
.B quit
|
|
||||||
.TP
|
|
||||||
.B reconfig
|
|
||||||
Instructs the server to reload the configuration file, then
|
|
||||||
perform the actions of
|
|
||||||
.B reopen
|
|
||||||
(this is equivalent to sending the server a SIGHUP)
|
|
||||||
.TP
|
|
||||||
.B SIGHUP
|
|
||||||
Same as
|
|
||||||
.B reconfig
|
|
||||||
.TP
|
|
||||||
.B reopen
|
|
||||||
Instructs the server to reopen all logfiles, then
|
|
||||||
perform the actions of
|
|
||||||
.B bringup
|
|
||||||
(this is equivalent to sending the server a SIGUSR2)
|
|
||||||
.TP
|
|
||||||
.B SIGUSR2
|
|
||||||
Same as
|
|
||||||
.B reopen
|
|
||||||
.TP
|
|
||||||
.B version
|
|
||||||
Returns the version of the server (this is equivalent to
|
|
||||||
.BR \-V )
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.TP
|
|
||||||
.BI \-Z cmd
|
|
||||||
Same as
|
|
||||||
.B \-z
|
|
||||||
but just sends
|
|
||||||
.I cmd
|
|
||||||
to the primary server.
|
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.BR \-A ,
|
.BR \-A ,
|
||||||
@ -409,15 +349,8 @@ making the connection (as if
|
|||||||
were typed).
|
were typed).
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.BR \-i ,
|
|
||||||
.BR \-u ,
|
|
||||||
.BR \-w ", and"
|
|
||||||
.B \-x
|
|
||||||
options can be given a console name, which will limit their output to that console.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
.B \-i
|
.B \-i
|
||||||
option outputs status information regarding each console in 15 colon-separated fields.
|
option outputs information regarding each console in 15 colon-separated fields.
|
||||||
.TP
|
.TP
|
||||||
.I name
|
.I name
|
||||||
The name of the console.
|
The name of the console.
|
||||||
@ -429,8 +362,7 @@ the console.
|
|||||||
.I type
|
.I type
|
||||||
The type of console.
|
The type of console.
|
||||||
Values will be a `/' for a local device, `|' for
|
Values will be a `/' for a local device, `|' for
|
||||||
a command, `!' for a remote port, `%' for a Unix domain socket,
|
a command, or `!' for a remote port.
|
||||||
and `#' for a noop console.
|
|
||||||
.TP
|
.TP
|
||||||
.I console-details
|
.I console-details
|
||||||
The details regarding the console.
|
The details regarding the console.
|
||||||
@ -441,9 +373,6 @@ Commands will have values of the command, the command's pid, the
|
|||||||
pseudo-tty, and file descriptor for the pseudo-tty.
|
pseudo-tty, and file descriptor for the pseudo-tty.
|
||||||
Remote ports will have values of the remote hostname, remote port number,
|
Remote ports will have values of the remote hostname, remote port number,
|
||||||
``raw'' or ``telnet'' protocol, and file descriptor for the socket connection.
|
``raw'' or ``telnet'' protocol, and file descriptor for the socket connection.
|
||||||
Unix domain sockets will have the path to the socket and the file
|
|
||||||
descriptor for the socket connection.
|
|
||||||
Noop consoles will have nothing.
|
|
||||||
.TP
|
.TP
|
||||||
.I users-list
|
.I users-list
|
||||||
The details of each user connected to the console.
|
The details of each user connected to the console.
|
||||||
@ -537,17 +466,6 @@ Set the default master to
|
|||||||
.B \-M
|
.B \-M
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3playback\fP \f2num\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Override the playback length for the
|
|
||||||
.B p
|
|
||||||
escape command to
|
|
||||||
.I num
|
|
||||||
lines (if the server supports it).
|
|
||||||
Using the special value of ``0'' will cause the client to use the number
|
|
||||||
of lines of the current terminal (if that can be determined).
|
|
||||||
If the null string (``""'') is used, the playback length will not be overridden.
|
|
||||||
.TP
|
|
||||||
\f3port\fP \f2port\fP
|
\f3port\fP \f2port\fP
|
||||||
.br
|
.br
|
||||||
Set the default port to
|
Set the default port to
|
||||||
@ -556,29 +474,6 @@ Set the default port to
|
|||||||
.B \-p
|
.B \-p
|
||||||
command-line flag).
|
command-line flag).
|
||||||
.TP
|
.TP
|
||||||
\f3replay\fP \f2num\fP|\f3""\fP
|
|
||||||
.br
|
|
||||||
Override the replay length for the
|
|
||||||
.B r
|
|
||||||
escape command to
|
|
||||||
.I num
|
|
||||||
lines (if the server supports it).
|
|
||||||
Using the special value of ``0'' will cause the client to use the number
|
|
||||||
of lines of the current terminal (if that can be determined).
|
|
||||||
If the null string (``""'') is used, the replay length will not be overridden.
|
|
||||||
.TP
|
|
||||||
\f3sslcacertificatefile\fP \f2filename\fP
|
|
||||||
.br
|
|
||||||
Load the valid CA certificates for the
|
|
||||||
.SM SSL
|
|
||||||
connection from the PEM encoded file.
|
|
||||||
.TP
|
|
||||||
\f3sslcacertificatepath\fP \f2directory\fP
|
|
||||||
.br
|
|
||||||
Load the valid CA certificates for the
|
|
||||||
.SM SSL
|
|
||||||
connection from the PEM encoded files in the directory.
|
|
||||||
.TP
|
|
||||||
\f3sslcredentials\fP \f2filename\fP
|
\f3sslcredentials\fP \f2filename\fP
|
||||||
.br
|
.br
|
||||||
Set the
|
Set the
|
||||||
@ -860,7 +755,7 @@ list the break sequences available
|
|||||||
.B l0
|
.B l0
|
||||||
send the break sequence associated with this console
|
send the break sequence associated with this console
|
||||||
.TP
|
.TP
|
||||||
.B l1-9a-z
|
.B l1-9
|
||||||
send the specific break sequence
|
send the specific break sequence
|
||||||
.TP
|
.TP
|
||||||
.B m
|
.B m
|
||||||
@ -871,19 +766,13 @@ close (if open) and reopen the line (to clear errors (silo overflows))
|
|||||||
and the log file
|
and the log file
|
||||||
.TP
|
.TP
|
||||||
.B p
|
.B p
|
||||||
playback the last 60 lines of output
|
replay the last 60 lines of output
|
||||||
.TP
|
|
||||||
.B P
|
|
||||||
set number of playback lines
|
|
||||||
.TP
|
.TP
|
||||||
.B r
|
.B r
|
||||||
replay the last 20 lines of output
|
replay the last 20 lines of output
|
||||||
.TP
|
.TP
|
||||||
.B R
|
|
||||||
set number of replay lines
|
|
||||||
.TP
|
|
||||||
.B s
|
.B s
|
||||||
switch to spy mode (read only)
|
switch to spy mode (read-only)
|
||||||
.TP
|
.TP
|
||||||
.B u
|
.B u
|
||||||
show status of hosts/users in this group
|
show status of hosts/users in this group
|
||||||
@ -900,9 +789,6 @@ examine this group's devices and modes
|
|||||||
.B z
|
.B z
|
||||||
suspend this connection
|
suspend this connection
|
||||||
.TP
|
.TP
|
||||||
.B !
|
|
||||||
invoke task
|
|
||||||
.TP
|
|
||||||
.B |
|
.B |
|
||||||
attach a local command to the console
|
attach a local command to the console
|
||||||
.TP
|
.TP
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: getpassword.c,v 1.8 2003/11/20 13:56:41 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -29,7 +31,12 @@ static STRING *pass = (STRING *)0;
|
|||||||
* we really use cbreak at PUCC because we need even parity...
|
* we really use cbreak at PUCC because we need even parity...
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
#if PROTOTYPES
|
||||||
C2Raw(int fd)
|
C2Raw(int fd)
|
||||||
|
#else
|
||||||
|
C2Raw(fd)
|
||||||
|
int fd;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct termios n_tios;
|
struct termios n_tios;
|
||||||
|
|
||||||
@ -57,7 +64,12 @@ C2Raw(int fd)
|
|||||||
* put the tty back as it was, however that was
|
* put the tty back as it was, however that was
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
#if PROTOTYPES
|
||||||
C2Normal(int fd)
|
C2Normal(int fd)
|
||||||
|
#else
|
||||||
|
C2Normal(fd)
|
||||||
|
int fd;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!screwy)
|
if (!screwy)
|
||||||
return;
|
return;
|
||||||
@ -66,7 +78,12 @@ C2Normal(int fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
#if PROTOTYPES
|
||||||
GetPassword(char *prompt)
|
GetPassword(char *prompt)
|
||||||
|
#else
|
||||||
|
GetPassword(prompt)
|
||||||
|
char *prompt;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int nc;
|
int nc;
|
||||||
@ -123,7 +140,11 @@ GetPassword(char *prompt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ClearPassword(void)
|
ClearPassword(void)
|
||||||
|
#else
|
||||||
|
ClearPassword()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (pass == (STRING *)0 || pass->allocated == 0)
|
if (pass == (STRING *)0 || pass->allocated == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: getpassword.h,v 1.3 2003/09/11 09:10:58 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern char *GetPassword(char *);
|
extern char *GetPassword PARAMS((char *));
|
||||||
extern void *ClearPassword(void);
|
extern void *ClearPassword PARAMS((void));
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: readconf.c,v 5.2 2004/05/25 00:38:15 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -17,7 +19,12 @@ TERM *parserTermDefault = (TERM *)0;
|
|||||||
TERM *pTerm = (TERM *)0;
|
TERM *pTerm = (TERM *)0;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
DestroyConfig(CONFIG *c)
|
DestroyConfig(CONFIG *c)
|
||||||
|
#else
|
||||||
|
DestroyConfig(c)
|
||||||
|
CONFIG *c;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (c == (CONFIG *)0)
|
if (c == (CONFIG *)0)
|
||||||
return;
|
return;
|
||||||
@ -32,16 +39,17 @@ DestroyConfig(CONFIG *c)
|
|||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
if (c->sslcredentials != (char *)0)
|
if (c->sslcredentials != (char *)0)
|
||||||
free(c->sslcredentials);
|
free(c->sslcredentials);
|
||||||
if (c->sslcacertificatefile != (char *)0)
|
|
||||||
free(c->sslcacertificatefile);
|
|
||||||
if (c->sslcacertificatepath != (char *)0)
|
|
||||||
free(c->sslcacertificatepath);
|
|
||||||
#endif
|
#endif
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ApplyConfigDefault(CONFIG *c)
|
ApplyConfigDefault(CONFIG *c)
|
||||||
|
#else
|
||||||
|
ApplyConfigDefault(c)
|
||||||
|
CONFIG *c;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (parserConfigDefault == (CONFIG *)0)
|
if (parserConfigDefault == (CONFIG *)0)
|
||||||
return;
|
return;
|
||||||
@ -73,10 +81,6 @@ ApplyConfigDefault(CONFIG *c)
|
|||||||
}
|
}
|
||||||
if (parserConfigDefault->striphigh != FLAGUNKNOWN)
|
if (parserConfigDefault->striphigh != FLAGUNKNOWN)
|
||||||
c->striphigh = parserConfigDefault->striphigh;
|
c->striphigh = parserConfigDefault->striphigh;
|
||||||
if (parserConfigDefault->replay != FLAGUNKNOWN)
|
|
||||||
c->replay = parserConfigDefault->replay;
|
|
||||||
if (parserConfigDefault->playback != FLAGUNKNOWN)
|
|
||||||
c->playback = parserConfigDefault->playback;
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
if (parserConfigDefault->sslcredentials != (char *)0) {
|
if (parserConfigDefault->sslcredentials != (char *)0) {
|
||||||
if (c->sslcredentials != (char *)0)
|
if (c->sslcredentials != (char *)0)
|
||||||
@ -85,22 +89,6 @@ ApplyConfigDefault(CONFIG *c)
|
|||||||
StrDup(parserConfigDefault->sslcredentials)) == (char *)0)
|
StrDup(parserConfigDefault->sslcredentials)) == (char *)0)
|
||||||
OutOfMem();
|
OutOfMem();
|
||||||
}
|
}
|
||||||
if (parserConfigDefault->sslcacertificatefile != (char *)0) {
|
|
||||||
if (c->sslcacertificatefile != (char *)0)
|
|
||||||
free(c->sslcacertificatefile);
|
|
||||||
if ((c->sslcacertificatefile =
|
|
||||||
StrDup(parserConfigDefault->sslcacertificatefile)) ==
|
|
||||||
(char *)0)
|
|
||||||
OutOfMem();
|
|
||||||
}
|
|
||||||
if (parserConfigDefault->sslcacertificatepath != (char *)0) {
|
|
||||||
if (c->sslcacertificatepath != (char *)0)
|
|
||||||
free(c->sslcacertificatepath);
|
|
||||||
if ((c->sslcacertificatepath =
|
|
||||||
StrDup(parserConfigDefault->sslcacertificatepath)) ==
|
|
||||||
(char *)0)
|
|
||||||
OutOfMem();
|
|
||||||
}
|
|
||||||
if (parserConfigDefault->sslrequired != FLAGUNKNOWN)
|
if (parserConfigDefault->sslrequired != FLAGUNKNOWN)
|
||||||
c->sslrequired = parserConfigDefault->sslrequired;
|
c->sslrequired = parserConfigDefault->sslrequired;
|
||||||
if (parserConfigDefault->sslenabled != FLAGUNKNOWN)
|
if (parserConfigDefault->sslenabled != FLAGUNKNOWN)
|
||||||
@ -109,7 +97,12 @@ ApplyConfigDefault(CONFIG *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigBegin(char *id)
|
ConfigBegin(char *id)
|
||||||
|
#else
|
||||||
|
ConfigBegin(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigBegin(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigBegin(%s) [%s:%d]", id, file, line));
|
||||||
if (id == (char *)0 || id[0] == '\000') {
|
if (id == (char *)0 || id[0] == '\000') {
|
||||||
@ -127,7 +120,11 @@ ConfigBegin(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigEnd(void)
|
ConfigEnd(void)
|
||||||
|
#else
|
||||||
|
ConfigEnd()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigEnd() [%s:%d]", file, line));
|
CONDDEBUG((1, "ConfigEnd() [%s:%d]", file, line));
|
||||||
|
|
||||||
@ -149,7 +146,11 @@ ConfigEnd(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigAbort(void)
|
ConfigAbort(void)
|
||||||
|
#else
|
||||||
|
ConfigAbort()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigAbort() [%s:%d]", file, line));
|
CONDDEBUG((1, "ConfigAbort() [%s:%d]", file, line));
|
||||||
if (parserConfigTemp == (CONFIG *)0)
|
if (parserConfigTemp == (CONFIG *)0)
|
||||||
@ -160,7 +161,11 @@ ConfigAbort(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigDestroy(void)
|
ConfigDestroy(void)
|
||||||
|
#else
|
||||||
|
ConfigDestroy()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigDestroy() [%s:%d]", file, line));
|
CONDDEBUG((1, "ConfigDestroy() [%s:%d]", file, line));
|
||||||
|
|
||||||
@ -177,7 +182,12 @@ ConfigDestroy(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
DestroyTerminal(TERM *t)
|
DestroyTerminal(TERM *t)
|
||||||
|
#else
|
||||||
|
DestroyTerminal(t)
|
||||||
|
TERM *t;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (t == (TERM *)0)
|
if (t == (TERM *)0)
|
||||||
return;
|
return;
|
||||||
@ -193,7 +203,12 @@ DestroyTerminal(TERM *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ApplyTermDefault(TERM *t)
|
ApplyTermDefault(TERM *t)
|
||||||
|
#else
|
||||||
|
ApplyTermDefault(t)
|
||||||
|
TERM *t;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (parserTermDefault == (TERM *)0)
|
if (parserTermDefault == (TERM *)0)
|
||||||
return;
|
return;
|
||||||
@ -227,7 +242,12 @@ ApplyTermDefault(TERM *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalBegin(char *id)
|
TerminalBegin(char *id)
|
||||||
|
#else
|
||||||
|
TerminalBegin(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalBegin(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "TerminalBegin(%s) [%s:%d]", id, file, line));
|
||||||
if (id == (char *)0 || id[0] == '\000') {
|
if (id == (char *)0 || id[0] == '\000') {
|
||||||
@ -245,7 +265,11 @@ TerminalBegin(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalEnd(void)
|
TerminalEnd(void)
|
||||||
|
#else
|
||||||
|
TerminalEnd()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
static char *term = (char *)0;
|
static char *term = (char *)0;
|
||||||
|
|
||||||
@ -275,7 +299,11 @@ TerminalEnd(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalAbort(void)
|
TerminalAbort(void)
|
||||||
|
#else
|
||||||
|
TerminalAbort()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalAbort() [%s:%d]", file, line));
|
CONDDEBUG((1, "TerminalAbort() [%s:%d]", file, line));
|
||||||
if (parserTermTemp == (TERM *)0)
|
if (parserTermTemp == (TERM *)0)
|
||||||
@ -286,7 +314,11 @@ TerminalAbort(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalDestroy(void)
|
TerminalDestroy(void)
|
||||||
|
#else
|
||||||
|
TerminalDestroy()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalDestroy() [%s:%d]", file, line));
|
CONDDEBUG((1, "TerminalDestroy() [%s:%d]", file, line));
|
||||||
|
|
||||||
@ -303,7 +335,13 @@ TerminalDestroy(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ProcessYesNo(char *id, FLAG *flag)
|
ProcessYesNo(char *id, FLAG *flag)
|
||||||
|
#else
|
||||||
|
ProcessYesNo(id, flag)
|
||||||
|
char *id;
|
||||||
|
FLAG *flag;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (id == (char *)0 || id[0] == '\000')
|
if (id == (char *)0 || id[0] == '\000')
|
||||||
*flag = FLAGFALSE;
|
*flag = FLAGFALSE;
|
||||||
@ -316,7 +354,12 @@ ProcessYesNo(char *id, FLAG *flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigItemEscape(char *id)
|
ConfigItemEscape(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemEscape(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemEscape(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemEscape(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -332,7 +375,12 @@ ConfigItemEscape(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigItemMaster(char *id)
|
ConfigItemMaster(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemMaster(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemMaster(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemMaster(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -348,31 +396,12 @@ ConfigItemMaster(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConfigItemPlayback(char *id)
|
#if PROTOTYPES
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
CONDDEBUG((1, "ConfigItemPlayback(%s) [%s:%d]", id, file, line));
|
|
||||||
|
|
||||||
if ((id == (char *)0) || (*id == '\000')) {
|
|
||||||
parserConfigTemp->playback = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (i = 0; id[i] != '\000'; i++) {
|
|
||||||
if (!isdigit((int)id[i])) {
|
|
||||||
Error("invalid playback value [%s:%d]", file, line);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i > 4) {
|
|
||||||
Error("playback value too large [%s:%d]", file, line);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
parserConfigTemp->playback = (unsigned short)atoi(id) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConfigItemPort(char *id)
|
ConfigItemPort(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemPort(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemPort(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemPort(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -388,31 +417,12 @@ ConfigItemPort(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConfigItemReplay(char *id)
|
#if PROTOTYPES
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
CONDDEBUG((1, "ConfigItemReplay(%s) [%s:%d]", id, file, line));
|
|
||||||
|
|
||||||
if ((id == (char *)0) || (*id == '\000')) {
|
|
||||||
parserConfigTemp->replay = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (i = 0; id[i] != '\000'; i++) {
|
|
||||||
if (!isdigit((int)id[i])) {
|
|
||||||
Error("invalid replay value [%s:%d]", file, line);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (i > 4) {
|
|
||||||
Error("replay value too large [%s:%d]", file, line);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
parserConfigTemp->replay = (unsigned short)atoi(id) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConfigItemSslcredentials(char *id)
|
ConfigItemSslcredentials(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemSslcredentials(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemSslcredentials(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemSslcredentials(%s) [%s:%d]", id, file, line));
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
@ -433,51 +443,12 @@ ConfigItemSslcredentials(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConfigItemSslcacertificatefile(char *id)
|
#if PROTOTYPES
|
||||||
{
|
|
||||||
CONDDEBUG((1, "ConfigItemSslcacertificatefile(%s) [%s:%d]", id, file,
|
|
||||||
line));
|
|
||||||
#if HAVE_OPENSSL
|
|
||||||
if (parserConfigTemp->sslcacertificatefile != (char *)0)
|
|
||||||
free(parserConfigTemp->sslcacertificatefile);
|
|
||||||
|
|
||||||
if ((id == (char *)0) || (*id == '\000')) {
|
|
||||||
parserConfigTemp->sslcacertificatefile = (char *)0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((parserConfigTemp->sslcacertificatefile = StrDup(id)) == (char *)0)
|
|
||||||
OutOfMem();
|
|
||||||
#else
|
|
||||||
Error
|
|
||||||
("sslcacertificatefile ignored - encryption not compiled into code [%s:%d]",
|
|
||||||
file, line);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConfigItemSslcacertificatepath(char *id)
|
|
||||||
{
|
|
||||||
CONDDEBUG((1, "ConfigItemSslcacertificatepath(%s) [%s:%d]", id, file,
|
|
||||||
line));
|
|
||||||
#if HAVE_OPENSSL
|
|
||||||
if (parserConfigTemp->sslcacertificatepath != (char *)0)
|
|
||||||
free(parserConfigTemp->sslcacertificatepath);
|
|
||||||
|
|
||||||
if ((id == (char *)0) || (*id == '\000')) {
|
|
||||||
parserConfigTemp->sslcacertificatepath = (char *)0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((parserConfigTemp->sslcacertificatepath = StrDup(id)) == (char *)0)
|
|
||||||
OutOfMem();
|
|
||||||
#else
|
|
||||||
Error
|
|
||||||
("sslcacertificatepath ignored - encryption not compiled into code [%s:%d]",
|
|
||||||
file, line);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConfigItemSslrequired(char *id)
|
ConfigItemSslrequired(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemSslrequired(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemSslrequired(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemSslrequired(%s) [%s:%d]", id, file, line));
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
@ -490,7 +461,12 @@ ConfigItemSslrequired(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigItemSslenabled(char *id)
|
ConfigItemSslenabled(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemSslenabled(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemSslenabled(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemSslenabled(%s) [%s:%d]", id, file, line));
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
@ -502,14 +478,24 @@ ConfigItemSslenabled(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigItemStriphigh(char *id)
|
ConfigItemStriphigh(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemStriphigh(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemStriphigh(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemStriphigh(%s) [%s:%d]", id, file, line));
|
||||||
ProcessYesNo(id, &(parserConfigTemp->striphigh));
|
ProcessYesNo(id, &(parserConfigTemp->striphigh));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ConfigItemUsername(char *id)
|
ConfigItemUsername(char *id)
|
||||||
|
#else
|
||||||
|
ConfigItemUsername(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "ConfigItemUsername(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "ConfigItemUsername(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -526,23 +512,27 @@ ConfigItemUsername(char *id)
|
|||||||
|
|
||||||
SUBST *substData = (SUBST *) 0;
|
SUBST *substData = (SUBST *) 0;
|
||||||
|
|
||||||
SUBSTTOKEN
|
|
||||||
SubstToken(char c)
|
|
||||||
{
|
|
||||||
switch (c) {
|
|
||||||
case 'u':
|
|
||||||
case 'c':
|
|
||||||
return ISSTRING;
|
|
||||||
default:
|
|
||||||
return ISNOTHING;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
SubstValue(char c, char **s, int *i)
|
#if PROTOTYPES
|
||||||
|
SubstCallback(char c, char **s, int *i)
|
||||||
|
#else
|
||||||
|
SubstCallback(c, s, i)
|
||||||
|
char c;
|
||||||
|
char **s;
|
||||||
|
int *i;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
if (substData == (SUBST *) 0) {
|
||||||
|
if ((substData =
|
||||||
|
(SUBST *) calloc(1, sizeof(SUBST))) == (SUBST *) 0)
|
||||||
|
OutOfMem();
|
||||||
|
substData->callback = &SubstCallback;
|
||||||
|
substData->tokens['u'] = ISSTRING;
|
||||||
|
substData->tokens['c'] = ISSTRING;
|
||||||
|
}
|
||||||
|
|
||||||
if (s != (char **)0) {
|
if (s != (char **)0) {
|
||||||
CONFIG *pc;
|
CONFIG *pc;
|
||||||
if (substData->data == (void *)0)
|
if (substData->data == (void *)0)
|
||||||
@ -562,19 +552,12 @@ SubstValue(char c, char **s, int *i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InitSubstCallback(void)
|
#if PROTOTYPES
|
||||||
{
|
|
||||||
if (substData == (SUBST *)0) {
|
|
||||||
if ((substData = (SUBST *)calloc(1, sizeof(SUBST))) == (SUBST *)0)
|
|
||||||
OutOfMem();
|
|
||||||
substData->value = &SubstValue;
|
|
||||||
substData->token = &SubstToken;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
TerminalItemAttach(char *id)
|
TerminalItemAttach(char *id)
|
||||||
|
#else
|
||||||
|
TerminalItemAttach(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalItemAttach(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "TerminalItemAttach(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -590,7 +573,12 @@ TerminalItemAttach(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalItemAttachsubst(char *id)
|
TerminalItemAttachsubst(char *id)
|
||||||
|
#else
|
||||||
|
TerminalItemAttachsubst(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalItemAttachsubst(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "TerminalItemAttachsubst(%s) [%s:%d]", id, file, line));
|
||||||
ProcessSubst(substData, (char **)0, &(parserTermTemp->attachsubst),
|
ProcessSubst(substData, (char **)0, &(parserTermTemp->attachsubst),
|
||||||
@ -598,7 +586,12 @@ TerminalItemAttachsubst(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalItemDetach(char *id)
|
TerminalItemDetach(char *id)
|
||||||
|
#else
|
||||||
|
TerminalItemDetach(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalItemDetach(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "TerminalItemDetach(%s) [%s:%d]", id, file, line));
|
||||||
|
|
||||||
@ -614,7 +607,12 @@ TerminalItemDetach(char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
TerminalItemDetachsubst(char *id)
|
TerminalItemDetachsubst(char *id)
|
||||||
|
#else
|
||||||
|
TerminalItemDetachsubst(id)
|
||||||
|
char *id;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONDDEBUG((1, "TerminalItemDetachsubst(%s) [%s:%d]", id, file, line));
|
CONDDEBUG((1, "TerminalItemDetachsubst(%s) [%s:%d]", id, file, line));
|
||||||
ProcessSubst(substData, (char **)0, &(parserTermTemp->detachsubst),
|
ProcessSubst(substData, (char **)0, &(parserTermTemp->detachsubst),
|
||||||
@ -624,12 +622,8 @@ TerminalItemDetachsubst(char *id)
|
|||||||
ITEM keyConfig[] = {
|
ITEM keyConfig[] = {
|
||||||
{"escape", ConfigItemEscape},
|
{"escape", ConfigItemEscape},
|
||||||
{"master", ConfigItemMaster},
|
{"master", ConfigItemMaster},
|
||||||
{"playback", ConfigItemPlayback},
|
|
||||||
{"port", ConfigItemPort},
|
{"port", ConfigItemPort},
|
||||||
{"replay", ConfigItemReplay},
|
|
||||||
{"sslcredentials", ConfigItemSslcredentials},
|
{"sslcredentials", ConfigItemSslcredentials},
|
||||||
{"sslcacertificatefile", ConfigItemSslcacertificatefile},
|
|
||||||
{"sslcacertificatepath", ConfigItemSslcacertificatepath},
|
|
||||||
{"sslrequired", ConfigItemSslrequired},
|
{"sslrequired", ConfigItemSslrequired},
|
||||||
{"sslenabled", ConfigItemSslenabled},
|
{"sslenabled", ConfigItemSslenabled},
|
||||||
{"striphigh", ConfigItemStriphigh},
|
{"striphigh", ConfigItemStriphigh},
|
||||||
@ -654,7 +648,13 @@ SECTION sections[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
#if PROTOTYPES
|
||||||
ReadConf(char *filename, FLAG verbose)
|
ReadConf(char *filename, FLAG verbose)
|
||||||
|
#else
|
||||||
|
ReadConf(filename, verbose)
|
||||||
|
char *filename;
|
||||||
|
FLAG verbose;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ ReadConf(char *filename, FLAG verbose)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the substition bits */
|
/* initialize the substition bits */
|
||||||
InitSubstCallback();
|
SubstCallback('\000', (char **)0, (int *)0);
|
||||||
|
|
||||||
parserConfigDefault = pConfig;
|
parserConfigDefault = pConfig;
|
||||||
pConfig = (CONFIG *)0;
|
pConfig = (CONFIG *)0;
|
||||||
@ -700,15 +700,9 @@ ReadConf(char *filename, FLAG verbose)
|
|||||||
CONDDEBUG((1, "pConfig->escape = %s", EMPTYSTR(pConfig->escape)));
|
CONDDEBUG((1, "pConfig->escape = %s", EMPTYSTR(pConfig->escape)));
|
||||||
CONDDEBUG((1, "pConfig->striphigh = %s",
|
CONDDEBUG((1, "pConfig->striphigh = %s",
|
||||||
FLAGSTR(pConfig->striphigh)));
|
FLAGSTR(pConfig->striphigh)));
|
||||||
CONDDEBUG((1, "pConfig->replay = %hu", pConfig->replay));
|
|
||||||
CONDDEBUG((1, "pConfig->playback = %hu", pConfig->playback));
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
CONDDEBUG((1, "pConfig->sslcredentials = %s",
|
CONDDEBUG((1, "pConfig->sslcredentials = %s",
|
||||||
EMPTYSTR(pConfig->sslcredentials)));
|
EMPTYSTR(pConfig->sslcredentials)));
|
||||||
CONDDEBUG((1, "pConfig->sslcacertificatefile = %s",
|
|
||||||
EMPTYSTR(pConfig->sslcacertificatefile)));
|
|
||||||
CONDDEBUG((1, "pConfig->sslcacertificatepath = %s",
|
|
||||||
EMPTYSTR(pConfig->sslcacertificatepath)));
|
|
||||||
CONDDEBUG((1, "pConfig->sslrequired = %s",
|
CONDDEBUG((1, "pConfig->sslrequired = %s",
|
||||||
FLAGSTR(pConfig->sslrequired)));
|
FLAGSTR(pConfig->sslrequired)));
|
||||||
CONDDEBUG((1, "pConfig->sslenabled = %s",
|
CONDDEBUG((1, "pConfig->sslenabled = %s",
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $Id: readconf.h,v 5.3 2004/05/25 23:03:25 bryan Exp $
|
||||||
|
*
|
||||||
* Copyright conserver.com, 2000
|
* Copyright conserver.com, 2000
|
||||||
*
|
*
|
||||||
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
|
||||||
@ -12,13 +14,8 @@ typedef struct config {
|
|||||||
char *port;
|
char *port;
|
||||||
char *escape;
|
char *escape;
|
||||||
FLAG striphigh;
|
FLAG striphigh;
|
||||||
FLAG exitdown;
|
|
||||||
unsigned short replay;
|
|
||||||
unsigned short playback;
|
|
||||||
#if HAVE_OPENSSL
|
#if HAVE_OPENSSL
|
||||||
char *sslcredentials;
|
char *sslcredentials;
|
||||||
char *sslcacertificatefile;
|
|
||||||
char *sslcacertificatepath;
|
|
||||||
FLAG sslrequired;
|
FLAG sslrequired;
|
||||||
FLAG sslenabled;
|
FLAG sslenabled;
|
||||||
#endif
|
#endif
|
||||||
@ -36,6 +33,6 @@ extern CONFIG *pConfig;
|
|||||||
extern TERM *pTerm;
|
extern TERM *pTerm;
|
||||||
extern SUBST *substData;
|
extern SUBST *substData;
|
||||||
|
|
||||||
extern void ReadConf(char *, FLAG);
|
extern void ReadConf PARAMS((char *, FLAG));
|
||||||
extern void DestroyConfig(CONFIG *);
|
extern void DestroyConfig PARAMS((CONFIG *));
|
||||||
extern void DestroyTerminal(TERM *);
|
extern void DestroyTerminal PARAMS((TERM *));
|
||||||
|
@ -22,3 +22,7 @@ I can't verify that these scripts will work for everyone. Hopefully they
|
|||||||
will be helpful.
|
will be helpful.
|
||||||
|
|
||||||
Bryan Stansell
|
Bryan Stansell
|
||||||
|
|
||||||
|
#
|
||||||
|
# $Id: README,v 1.4 2003/09/29 14:29:37 bryan Exp $
|
||||||
|
#
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
### Path settings
|
### Path settings
|
||||||
datarootdir = @datarootdir@
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
@ -6,13 +6,12 @@
|
|||||||
# outside of my own purposes. If this helps, cool. In the end I put the
|
# outside of my own purposes. If this helps, cool. In the end I put the
|
||||||
# rootcert.pem file in my global certs directory (OPENSSL_ROOT/ssl/certs),
|
# rootcert.pem file in my global certs directory (OPENSSL_ROOT/ssl/certs),
|
||||||
# point the server to server.pem and point the client at client.pem. I
|
# point the server to server.pem and point the client at client.pem. I
|
||||||
# then run the c_rehash command.
|
# then run the c_rehash command (I supposed it helps or is important).
|
||||||
#
|
# When it asks for a passphrase, use 'pass', otherwise this script won't
|
||||||
# You can also use the sslcacertificatefile options to point the client/server
|
# work. Ugly, yeah, but it's an ok test.
|
||||||
# at rootcert.pem instead of populating the global repository
|
|
||||||
#
|
#
|
||||||
|
|
||||||
[ -f rootreq.pem -a -f rootkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout rootkey.pem -out rootreq.pem -nodes
|
[ -f rootreq.pem -a -f rootkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout rootkey.pem -out rootreq.pem -passin pass:pass -passout pass:pass
|
||||||
US
|
US
|
||||||
California
|
California
|
||||||
Folsom
|
Folsom
|
||||||
@ -26,7 +25,7 @@ EOD
|
|||||||
[ -f rootcert.pem ] || openssl x509 -req -in rootreq.pem -sha1 -extensions v3_ca -signkey rootkey.pem -out rootcert.pem
|
[ -f rootcert.pem ] || openssl x509 -req -in rootreq.pem -sha1 -extensions v3_ca -signkey rootkey.pem -out rootcert.pem
|
||||||
[ -f root.pem ] || cat rootcert.pem rootkey.pem > root.pem
|
[ -f root.pem ] || cat rootcert.pem rootkey.pem > root.pem
|
||||||
|
|
||||||
[ -f serverreq.pem -a -f serverkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout serverkey.pem -out serverreq.pem -nodes
|
[ -f serverreq.pem -a -f serverkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout serverkey.pem -out serverreq.pem -passin pass:pass -passout pass:pass
|
||||||
US
|
US
|
||||||
California
|
California
|
||||||
Folsom
|
Folsom
|
||||||
@ -40,7 +39,7 @@ EOD
|
|||||||
[ -f servercert.pem ] || openssl x509 -req -in serverreq.pem -sha1 -extensions usr_cert -CA root.pem -CAkey root.pem -CAcreateserial -out servercert.pem
|
[ -f servercert.pem ] || openssl x509 -req -in serverreq.pem -sha1 -extensions usr_cert -CA root.pem -CAkey root.pem -CAcreateserial -out servercert.pem
|
||||||
[ -f server.pem ] || cat servercert.pem serverkey.pem rootcert.pem > server.pem
|
[ -f server.pem ] || cat servercert.pem serverkey.pem rootcert.pem > server.pem
|
||||||
|
|
||||||
[ -f clientreq.pem -a -f clientkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout clientkey.pem -out clientreq.pem -nodes
|
[ -f clientreq.pem -a -f clientkey.pem ] || cat <<EOD | openssl req -newkey rsa:1024 -sha1 -keyout clientkey.pem -out clientreq.pem -passin pass:pass -passout pass:pass
|
||||||
US
|
US
|
||||||
California
|
California
|
||||||
Folsom
|
Folsom
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
# server options
|
|
||||||
#OPTIONS="-p 33000 -d"
|
|
||||||
# run as different user that root
|
|
||||||
#RUNAS=conservr
|
|
||||||
|
|
@ -7,66 +7,44 @@
|
|||||||
# config: /etc/conserver.cf
|
# config: /etc/conserver.cf
|
||||||
#
|
#
|
||||||
|
|
||||||
DAEMON=/usr/sbin/conserver
|
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
# Source networking configuration.
|
# Source networking configuration.
|
||||||
. /etc/sysconfig/network
|
. /etc/sysconfig/network
|
||||||
|
|
||||||
# Source defaults
|
|
||||||
. /etc/default/conserver
|
|
||||||
|
|
||||||
# Check that networking is up.
|
# Check that networking is up.
|
||||||
[ ${NETWORKING} = "no" ] && exit 0
|
[ ${NETWORKING} = "no" ] && exit 0
|
||||||
|
|
||||||
# make sure conserver is installed and executable
|
# make sure conserver is installed and executable
|
||||||
[ -x $DAEMON ] || exit 1
|
[ -x /usr/sbin/conserver ] || exit 1
|
||||||
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
echo -n "Starting conserver: "
|
|
||||||
daemon --user "${RUNAS-}" $DAEMON ${OPTIONS--d}
|
|
||||||
RETVAL=$?
|
|
||||||
[ "$RETVAL" = 0 ] && touch /var/lock/subsys/conserver
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
stop()
|
|
||||||
{
|
|
||||||
echo -n "Shutting down conserver: "
|
|
||||||
killproc conserver
|
|
||||||
RETVAL=$?
|
|
||||||
[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/conserver
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
# See how we were called.
|
# See how we were called.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
echo -n "Starting conserver: "
|
||||||
|
daemon conserver -d
|
||||||
|
echo
|
||||||
|
touch /var/lock/subsys/conserver
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
stop
|
echo -n "Shutting down conserver: "
|
||||||
|
killproc conserver
|
||||||
|
echo
|
||||||
|
rm -f /var/lock/subsys/conserver
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status conserver
|
status conserver
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
stop
|
echo -n "Restarting conserver: "
|
||||||
start
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
echo -n "Reloading conserver: "
|
|
||||||
killproc conserver -HUP
|
killproc conserver -HUP
|
||||||
RETVAL=$?
|
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: conserver {start|stop|restart|reload|status}"
|
echo "Usage: conserver {start|stop|restart|status}"
|
||||||
RETVAL=1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
exit 0
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
%define pkg conserver
|
%define pkg conserver
|
||||||
%define ver
|
%define ver 8.1.7
|
||||||
|
|
||||||
# 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
|
||||||
@ -12,71 +12,26 @@
|
|||||||
%define master console
|
%define master console
|
||||||
|
|
||||||
# what red hat (or other distibution) version are you running?
|
# what red hat (or other distibution) version are you running?
|
||||||
%define distver 1
|
%define distver 6
|
||||||
|
|
||||||
# compile arguments. defaults to 0
|
|
||||||
# example: rpmbuild -bb conserver.spec --with openssl
|
|
||||||
%define with_openssl %{?_with_openssl: 1} %{?!_with_openssl: 0}
|
|
||||||
%define with_libwrap %{?_with_libwrap: 1} %{?!_with_libwrap: 0}
|
|
||||||
%define with_pam %{?_with_pam: 1} %{?!_with_pam: 0}
|
|
||||||
%define with_dmalloc %{?_with_dmalloc: 1} %{?!_with_dmalloc: 0}
|
|
||||||
%define with_freeipmi %{?_with_freeipmi: 1} %{?!_with_freeipmi: 0}
|
|
||||||
|
|
||||||
# additionally you can use macros logfile pidfile
|
|
||||||
# example: rpmbuild -bb conserver.spec --define "pidfile /var/run/conserver/pid"
|
|
||||||
|
|
||||||
|
Summary: Serial console server daemon/client
|
||||||
Name: %{pkg}
|
Name: %{pkg}
|
||||||
Version: %{ver}
|
Version: %{ver}
|
||||||
Release: %{distver}
|
Release: 1.%{distver}
|
||||||
License: BSD
|
Copyright: distributable
|
||||||
Summary: Serial console server daemon/client
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.conserver.com/
|
URL: http://www.conserver.com/
|
||||||
Source: http://www.conserver.com/%{pkg}-%{ver}.tar.gz
|
Source: http://www.conserver.com/%{pkg}-%{ver}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{pkg}-buildroot
|
BuildRoot: %{_tmppath}/%{pkg}-buildroot
|
||||||
%if %{with_openssl}
|
|
||||||
Requires: openssl
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
%endif
|
|
||||||
%if %{with_pam}
|
|
||||||
BuildRequires: pam-devel
|
|
||||||
%endif
|
|
||||||
%if %{with_libwrap}
|
|
||||||
Requires: tcp_wrappers
|
|
||||||
%endif
|
|
||||||
%if %{with_dmalloc}
|
|
||||||
Requires: dmalloc
|
|
||||||
BuildRequires: dmalloc
|
|
||||||
%endif
|
|
||||||
%if %{with_freeipmi}
|
|
||||||
Requires: freeipmi
|
|
||||||
BuildRequires: freeipmi-devel
|
|
||||||
%endif
|
|
||||||
Prefix: %{_prefix}
|
Prefix: %{_prefix}
|
||||||
|
|
||||||
%package server
|
|
||||||
Summary: Serial console server daemon
|
|
||||||
Group: System Environment/Daemons
|
|
||||||
|
|
||||||
%package client
|
|
||||||
Summary: Serial console server client
|
|
||||||
Group: Applications/Internet
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Conserver is a daemon that allows multiple users to watch a
|
Conserver is an application that allows multiple users to watch a
|
||||||
serial console at the same time. It can log the data, allows users to
|
serial console at the same time. It can log the data, allows users to
|
||||||
take write-access of a console (one at a time), and has a variety of
|
take write-access of a console (one at a time), and has a variety of
|
||||||
bells and whistles to accentuate that basic functionality.
|
bells and whistles to accentuate that basic functionality.
|
||||||
|
|
||||||
%description server
|
|
||||||
conserver-server is a daemon that allows multiple users to watch a
|
|
||||||
serial console at the same time. It can log the data, allows users to
|
|
||||||
take write-access of a console (one at a time), and has a variety of
|
|
||||||
bells and whistles to accentuate that basic functionality.
|
|
||||||
|
|
||||||
%description client
|
|
||||||
conserver-client to connect to conserver-server using a tcp port.
|
|
||||||
Allows multiple users to watch a serial console at the same time.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%{__rm} -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
@ -89,8 +44,7 @@ f="conserver/Makefile.in"
|
|||||||
%{__mv} $f $f.orig
|
%{__mv} $f $f.orig
|
||||||
%{__sed} -e 's/^.*conserver\.rc.*$//' < $f.orig > $f
|
%{__sed} -e 's/^.*conserver\.rc.*$//' < $f.orig > $f
|
||||||
|
|
||||||
%configure %{?_with_openssl} %{?_with_libwrap} %{?_with_dmalloc} %{?_with_freeipmi} %{?_with_pam} %{?logfile: --with-logfile=%{logfile}} %{?pidfile: --with-pidfile=%{pidfile}} %{?master: --with-master=%{master}}
|
%configure --with-master=%{master}
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
|
||||||
@ -111,15 +65,12 @@ make
|
|||||||
%{__mkdir_p} %{buildroot}/%{_initrddir}
|
%{__mkdir_p} %{buildroot}/%{_initrddir}
|
||||||
%{__cp} contrib/redhat-rpm/conserver.init %{buildroot}/%{_initrddir}/conserver
|
%{__cp} contrib/redhat-rpm/conserver.init %{buildroot}/%{_initrddir}/conserver
|
||||||
|
|
||||||
# install copy of init script defaults
|
|
||||||
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/default
|
|
||||||
%{__cp} contrib/redhat-rpm/conserver.defaults %{buildroot}/%{_sysconfdir}/default/conserver
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{__rm} -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%post server
|
%post
|
||||||
if [ -x %{_initrddir}/conserver ]; then
|
if [ -x %{_initrddir}/conserver ]; then
|
||||||
/sbin/chkconfig --add conserver
|
/sbin/chkconfig --add conserver
|
||||||
fi
|
fi
|
||||||
@ -129,7 +80,7 @@ if ! egrep '\<conserver\>' /etc/services > /dev/null 2>&1 ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
%preun server
|
%preun
|
||||||
if [ "$1" = 0 ]; then
|
if [ "$1" = 0 ]; then
|
||||||
if [ -x %{_initrddir}/conserver ]; then
|
if [ -x %{_initrddir}/conserver ]; then
|
||||||
%{_initrddir}/conserver stop
|
%{_initrddir}/conserver stop
|
||||||
@ -137,37 +88,18 @@ if [ "$1" = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# we need this even if empty
|
|
||||||
#%files
|
|
||||||
|
|
||||||
%files server
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc CHANGES FAQ INSTALL README conserver.cf
|
%doc CHANGES FAQ INSTALL README conserver.cf
|
||||||
%config(noreplace) %{_sysconfdir}/conserver.cf
|
%config(noreplace) %{_sysconfdir}/conserver.cf
|
||||||
%config(noreplace) %{_sysconfdir}/conserver.passwd
|
%config(noreplace) %{_sysconfdir}/conserver.passwd
|
||||||
%config(noreplace) %{_sysconfdir}/default/conserver
|
|
||||||
%attr(555,root,root) %{_initrddir}/conserver
|
%attr(555,root,root) %{_initrddir}/conserver
|
||||||
%{_libdir}/conserver/convert
|
%{prefix}/bin/console
|
||||||
%{_mandir}/man8/conserver.8.gz
|
%{prefix}/share/man/man1/console.1.gz
|
||||||
%{_mandir}/man5/conserver.cf.5.gz
|
%{prefix}/share/man/man8/conserver.8.gz
|
||||||
%{_mandir}/man5/conserver.passwd.5.gz
|
%{prefix}/share/man/man5/conserver.cf.5.gz
|
||||||
%{_datadir}/examples/conserver/conserver.cf
|
%{prefix}/share/man/man5/conserver.passwd.5.gz
|
||||||
%{_datadir}/examples/conserver/conserver.passwd
|
%{prefix}/share/examples/conserver/conserver.cf
|
||||||
%{_sbindir}/conserver
|
%{prefix}/share/examples/conserver/conserver.passwd
|
||||||
|
%{prefix}/sbin/conserver
|
||||||
%files client
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc CHANGES FAQ INSTALL README
|
|
||||||
%{_bindir}/console
|
|
||||||
%{_mandir}/man1/console.1.gz
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Wed Oct 14 2009 Jodok Ole Muellers <muellejo@aschendorff.de>
|
|
||||||
- Changed the conserver.spec file to create separate subpackages
|
|
||||||
for client and server by using the %package directive.
|
|
||||||
* Wed Sep 25 2009 Fabien Wernli
|
|
||||||
- added configure prerequisites
|
|
||||||
* Thu Sep 24 2009 Fabien Wernli
|
|
||||||
- added prefix to configure
|
|
||||||
- changed some hardcoded values to proper macros:
|
|
||||||
didn't work on x64 lib -> lib64
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
PKG="conserver"
|
PKG="conserver"
|
||||||
NAME="Console server and client"
|
NAME="Console server and client"
|
||||||
CATEGORY="system"
|
CATEGORY="system"
|
||||||
VERSION=
|
VERSION="8.1.7"
|
||||||
DESC="Console server and client"
|
DESC="Console server and client"
|
||||||
CLASSES=none
|
CLASSES=none
|
||||||
ARCH=sparc
|
ARCH=sparc
|
||||||
|
22
gen-version
22
gen-version
@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# awk gets stdin from /dev/null 'cause when autoconf runs this via m4_esyscmd_s,
|
|
||||||
# stdin is closed and awk assumes there will always be an open stdin and you end
|
|
||||||
# up with a bogus message:
|
|
||||||
#
|
|
||||||
# awk: i/o error occurred while closing /dev/stdin
|
|
||||||
# input record number 20, file conserver/version.h
|
|
||||||
# source line number 1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
case "$1" in
|
|
||||||
number)
|
|
||||||
awk '$2=="VERSION_MAJOR"{maj=$NF} $2=="VERSION_MINOR"{min=$NF} $2=="VERSION_REV"{rev=$NF} END{print maj "." min "." rev}' conserver/version.h < /dev/null
|
|
||||||
;;
|
|
||||||
|
|
||||||
date)
|
|
||||||
awk '$2=="VERSION_DATE"{print $NF}' conserver/version.h < /dev/null | tr -d '"'
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,26 +0,0 @@
|
|||||||
Testing Locally
|
|
||||||
---------------
|
|
||||||
|
|
||||||
You can run `./package/make-and-stage-release local` and the current code will be
|
|
||||||
packaged into `./build` so anyone can configure and build code in a confined space.
|
|
||||||
|
|
||||||
Creating a new release
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
- Create a new release branch `git checkout -b release-vx.y.z`
|
|
||||||
- Edit `conserver/version.h`
|
|
||||||
- Update `CHANGES` with output of `./package/create-changes vx.y.z..`
|
|
||||||
- Double-check and merge release branch
|
|
||||||
- Run `GITHUB_TOKEN=xxxx ./package/make-and-stage-release` to tag release, create distribution, pgp sign, and push to github
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
|
|
||||||
- autoconf
|
|
||||||
- githubrelease (pypi)
|
|
||||||
- gpg
|
|
||||||
|
|
||||||
Publishing a release
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
- Use github to promote from draft or use the command output from `make-and-stage-release`
|
|
||||||
- Send announcement on mailing lists
|
|
1645
package/config.guess
vendored
1645
package/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1795
package/config.sub
vendored
1795
package/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -z "$1" ] && echo "Usage: $0 tag" && exit 1
|
|
||||||
range="$1"
|
|
||||||
date=`./gen-version date`
|
|
||||||
changedate=`date -j -f '%Y/%m/%d' "$date" '+%B %-d, %Y'`
|
|
||||||
echo "version `./gen-version number` ($changedate):"
|
|
||||||
git log --no-merges --pretty=tformat:' - %s (%an <%ae>)' "$range" | tail -r | awk '{if (! l[$0]) {l[$0]++; print}}' | sed -e 's/ *(Bryan Stansell <bryan@conserver.com>)$//'
|
|
@ -1,65 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case $(sed --help 2>&1) in
|
|
||||||
*GNU*) sed_i () { sed -i "$@"; };;
|
|
||||||
*) sed_i () { sed -i '' "$@"; };;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local=false && [ "$1" = "local" ] && local=true
|
|
||||||
|
|
||||||
[ -f conserver/version.h ] || { echo "you are in the wrong place" ; exit 1; }
|
|
||||||
|
|
||||||
ver=`./gen-version number`
|
|
||||||
|
|
||||||
if ! $local; then
|
|
||||||
echo "Ready to tag release v$ver (y/N)?"
|
|
||||||
read i
|
|
||||||
if [ "$i" = "y" ]; then
|
|
||||||
echo "Adding git tag v$ver"
|
|
||||||
git tag -a -m "Release $ver" v$ver
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
|
||||||
(
|
|
||||||
[ -d build ] && rm -rf build
|
|
||||||
mkdir build
|
|
||||||
archtag=v$ver
|
|
||||||
$local && archtag=HEAD
|
|
||||||
git archive --format=tar.gz --prefix=conserver-$ver/ $archtag | (cd build; tar zxf -)
|
|
||||||
cd build/conserver-$ver
|
|
||||||
../../package/setup-configure
|
|
||||||
rm -rf package
|
|
||||||
sed_i -e "/^%define ver/s| ver.*| ver $ver|" contrib/redhat-rpm/conserver.spec
|
|
||||||
sed_i -e "/^VERSION=/s|.*|VERSION=\"$ver\"|" contrib/solaris-package/pkginfo
|
|
||||||
)
|
|
||||||
$local && exit
|
|
||||||
echo "Creating ../conserver-$ver.tar.gz"
|
|
||||||
tar zcf ../conserver-$ver.tar.gz -C build conserver-$ver
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
[ -f ../conserver-$ver.tar.gz.asc ] && rm ../conserver-$ver.tar.gz.asc
|
|
||||||
fi
|
|
||||||
if [ ! -f ../conserver-$ver.tar.gz.asc ]; then
|
|
||||||
echo "Signing ../conserver-$ver.tar.gz"
|
|
||||||
gpg -ab --local-user bryan@conserver.com ../conserver-$ver.tar.gz
|
|
||||||
fi
|
|
||||||
body="\`\`\`
|
|
||||||
`sed -ne '/^ver/,/^$/p' CHANGES | sed -e '/^$/,$d'`
|
|
||||||
\`\`\`"
|
|
||||||
|
|
||||||
ls -l ../conserver-$ver.tar.gz*
|
|
||||||
echo "Ready to push (y/N)?"
|
|
||||||
read i
|
|
||||||
if [ "$i" = "y" ]; then
|
|
||||||
git push --tags
|
|
||||||
githubrelease release bstansell/conserver create --name conserver-$ver --body "$body" v$ver ../conserver-$ver.tar.gz*
|
|
||||||
echo You can publish this release on the website or with:
|
|
||||||
echo " "githubrelease release bstansell/conserver publish v$ver
|
|
||||||
else
|
|
||||||
echo Ok, here is the command I would have used:
|
|
||||||
echo " "git push --tags
|
|
||||||
echo " "githubrelease release bstansell/conserver create --name conserver-$ver --body \""$body"\" v$ver ../conserver-$ver.tar.gz*
|
|
||||||
fi
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
gindent -npro -i4 -ip4 -cli4 -br -brs -cdw -ce -npcs -ncs -nhnl -l75 -lc75 -nbbo -ppi1 `
|
|
||||||
echo -T SOCKADDR_STYPE
|
|
||||||
echo -T INADDR_STYPE
|
|
||||||
echo -T time_t
|
|
||||||
echo -T X509_STORE_CTX
|
|
||||||
echo -T FILE
|
|
||||||
echo -T SSL
|
|
||||||
echo -T fd_set
|
|
||||||
echo -T pam_handle_t
|
|
||||||
echo -T SSL_CTX
|
|
||||||
echo -T DH
|
|
||||||
sed -ne '/typedef/,/}/p' */*.[ch] | grep '^[ ]*}' | sed -e 's/[ ]*}/-T/' -e 's/;//' | sort -u
|
|
||||||
` */*.[ch]
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
curl -s -o config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess'
|
|
||||||
curl -s -o config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub'
|
|
||||||
|
|
||||||
grep ^timestamp config.guess >/dev/null 2>&1 || cp package/config.guess .
|
|
||||||
grep ^timestamp config.sub >/dev/null 2>&1 || cp package/config.sub .
|
|
||||||
|
|
||||||
# We set lang to avoid this with the gcc docker image on cirrus:
|
|
||||||
#
|
|
||||||
# ./package/setup-configure
|
|
||||||
# perl: warning: Setting locale failed.
|
|
||||||
# perl: warning: Please check that your locale settings:
|
|
||||||
# LANGUAGE = (unset),
|
|
||||||
# LC_ALL = (unset),
|
|
||||||
# LANG = "en_US.UTF-8"
|
|
||||||
# are supported and installed on your system.
|
|
||||||
|
|
||||||
LANG=C autoreconf
|
|
@ -33,7 +33,7 @@ dotest()
|
|||||||
mv test.out results/test$testnum
|
mv test.out results/test$testnum
|
||||||
else
|
else
|
||||||
if [ -f results/test$testnum ]; then
|
if [ -f results/test$testnum ]; then
|
||||||
if diff -i results/test$testnum >test$testnum.diff test.out 2>&1; then
|
if diff -i test.out results/test$testnum >test$testnum.diff 2>&1; then
|
||||||
echo "succeeded"
|
echo "succeeded"
|
||||||
rm -f test$testnum.diff
|
rm -f test$testnum.diff
|
||||||
else
|
else
|
||||||
@ -89,12 +89,10 @@ dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -u | sed -e
|
|||||||
dotest 'c?c.'
|
dotest 'c?c.'
|
||||||
dotest 'cl?c.'
|
dotest 'cl?c.'
|
||||||
dotest 'cdc.'
|
dotest 'cdc.'
|
||||||
dotest 'cocacoc.'
|
dotest 'coc.'
|
||||||
|
|
||||||
dotest EVAL "echo 'tu.' | ../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -e 'tu' shell"
|
dotest EVAL "echo 'tu.' | ../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -e 'tu' shell"
|
||||||
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -R | sed -e 's/ [^ ]*$//'"
|
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -R | sed -e 's/ [^ ]*$//'"
|
||||||
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -x | sed -e 's/ on [^ ]* */ on /'"
|
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -x | sed -e 's/ on [^ ]* */ on /'"
|
||||||
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -x sh | sed -e '1s/^[^:]*//'"
|
|
||||||
dotest EVAL "../console/console -n -C /dev/null -M 127.0.0.1 -p 7777 -x shell | sed -e 's/ on [^ ]* */ on /'"
|
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
[`shell' -- console is down]
|
console: shell is down
|
||||||
[Enter `^Ec?' for help]
|
[Enter `^Ec?' for help]
|
||||||
[up]
|
[up -- attached]
|
||||||
[ok]
|
|
||||||
[up]
|
|
||||||
[disconnect]
|
[disconnect]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
: ambiguous console abbreviation, `sh'
|
|
||||||
choices are shellb, shella, shell
|
|
@ -1 +0,0 @@
|
|||||||
shell on at Local
|
|
@ -6,14 +6,12 @@
|
|||||||
e change escape sequence f force attach read/write
|
e change escape sequence f force attach read/write
|
||||||
g group info i information dump
|
g group info i information dump
|
||||||
L toggle logging on/off l? break sequence list
|
L toggle logging on/off l? break sequence list
|
||||||
l0 send break per config file l1-9a-z send specific break sequence
|
l0 send break per config file l1-9 send specific break sequence
|
||||||
m display message of the day n write a note to the logfile
|
m display the message of the day o (re)open the tty and log file
|
||||||
o (re)open the tty and log file p playback the last 60 lines
|
p replay the last 60 lines r replay the last 20 lines
|
||||||
P set number of playback lines r replay the last 20 lines
|
s spy read only u show host status
|
||||||
R set number of replay lines s spy mode (read only)
|
v show version info w who is on this console
|
||||||
u show host status v show version info
|
x show console baud info z suspend the connection
|
||||||
w who is on this console x show console baud info
|
|
||||||
z suspend the connection ! invoke task
|
|
||||||
| attach local command ? print this message
|
| attach local command ? print this message
|
||||||
<cr> ignore/abort command ^R replay the last line
|
<cr> ignore/abort command ^R replay the last line
|
||||||
\ooo send character by octal code
|
\ooo send character by octal code
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[`shell' -- console is down]
|
console: shell is down
|
||||||
[Enter `^Ec?' for help]
|
[Enter `^Ec?' for help]
|
||||||
[up]
|
[up -- attached]
|
||||||
[disconnect]
|
[disconnect]
|
||||||
|
@ -6,14 +6,12 @@
|
|||||||
e change escape sequence f force attach read/write
|
e change escape sequence f force attach read/write
|
||||||
g group info i information dump
|
g group info i information dump
|
||||||
L toggle logging on/off l? break sequence list
|
L toggle logging on/off l? break sequence list
|
||||||
l0 send break per config file l1-9a-z send specific break sequence
|
l0 send break per config file l1-9 send specific break sequence
|
||||||
m display message of the day n write a note to the logfile
|
m display the message of the day o (re)open the tty and log file
|
||||||
o (re)open the tty and log file p playback the last 60 lines
|
p replay the last 60 lines r replay the last 20 lines
|
||||||
P set number of playback lines r replay the last 20 lines
|
s spy read only u show host status
|
||||||
R set number of replay lines s spy mode (read only)
|
v show version info w who is on this console
|
||||||
u show host status v show version info
|
x show console baud info z suspend the connection
|
||||||
w who is on this console x show console baud info
|
|
||||||
z suspend the connection ! invoke task
|
|
||||||
| attach local command ? print this message
|
| attach local command ? print this message
|
||||||
<cr> ignore/abort command ^R replay the last line
|
<cr> ignore/abort command ^R replay the last line
|
||||||
\ooo send character by octal code
|
\ooo send character by octal code
|
||||||
|
@ -7,9 +7,6 @@ default * {
|
|||||||
timestamp "";
|
timestamp "";
|
||||||
include full;
|
include full;
|
||||||
}
|
}
|
||||||
config * {
|
|
||||||
reinitcheck 1s;
|
|
||||||
}
|
|
||||||
break 5 {
|
break 5 {
|
||||||
string "\rtest\r";
|
string "\rtest\r";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user