mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-16 23:18:56 +00:00
Imported from conserver-7.2.3.tar.gz
This commit is contained in:
parent
38ab668078
commit
a55f7d1974
28
CHANGES
28
CHANGES
@ -1,13 +1,37 @@
|
||||
CHANGES
|
||||
=======
|
||||
|
||||
version 7.2.3 (Sep 23, 2002):
|
||||
- checking for duplicate console names got lost in the major
|
||||
7.2.0 rewrite of that code. it's back now, with a couple of
|
||||
other edge-case fixes i noticed while scanning the code -
|
||||
reported by Dave Stuit <djs@tellme.com>
|
||||
- added --with-pam and PAM authentication support - suggested
|
||||
by Stu May <jsmay@wasteofbits.com>
|
||||
- added -F server option to prevent automatic reinitialization
|
||||
of failed consoles ('|' syntax consoles which exit with a
|
||||
zero status are still reinitialized) - requested by William P
|
||||
LePera <lepera@us.ibm.com> and Malcolm Gibbs
|
||||
<Malcolm.Gibbs005@msd.govt.nz>
|
||||
- successful automatic reinitialization of consoles now attaches
|
||||
a client that wants read-write mode
|
||||
- added read-only client wish to become read-write in -i output
|
||||
- moved to autoconf-2.54 and fixed some small configure.in bugs
|
||||
Many thanks to John R. Jackson <jrj@purdue.edu> for the following
|
||||
fixes, cleanups, and enhancements...
|
||||
- "lost timestamps" bug (SIGALRM/sleep()/usleep()/tcp_wrapper
|
||||
interaction)
|
||||
- compiler warnings, bad fileOpenFD tests, and ability to use
|
||||
a colon after an equal in the config file (LOGDIR=C:\Logs)
|
||||
- autologin fix for Solaris BSM support
|
||||
|
||||
version 7.2.2 (Jun 05, 2002):
|
||||
- added 'n' as token for no-parity - patch by Greg A. Woods
|
||||
<woods@weird.com>
|
||||
- extra timestamps occur when consoles come back up after being
|
||||
down longer than their timestamp period - reported by Dave
|
||||
Stuit <djs@gnac.com>
|
||||
- AIX 5.1 psuedo-terminal support broken - patch by William P
|
||||
- AIX 5.1 pseudo-terminal support broken - patch by William P
|
||||
LePera <lepera@us.ibm.com>
|
||||
- PID file overwritten and not unlinked on exit - reported by
|
||||
William P LePera <lepera@us.ibm.com>
|
||||
@ -321,5 +345,5 @@ before version 6.05:
|
||||
and enhancements of various types were applied.
|
||||
|
||||
#
|
||||
# $Id: CHANGES,v 1.60 2002-06-05 15:05:13-07 bryan Exp $
|
||||
# $Id: CHANGES,v 1.68 2002-09-23 14:20:20-07 bryan Exp $
|
||||
#
|
||||
|
18
FAQ
18
FAQ
@ -15,6 +15,7 @@ directed to faq@conserver.com. The FAQ answers the following questions:
|
||||
mean (or something close to that)?
|
||||
7) How do I set up a serial port for no parity?
|
||||
8) Is "Conserver" a Trademark or Registered Trademark?
|
||||
9) When I connect to a console, it says it is down. Why?
|
||||
99) Ok, things just don't seem to work. Help?!?
|
||||
|
||||
|
||||
@ -90,6 +91,21 @@ directed to faq@conserver.com. The FAQ answers the following questions:
|
||||
things, so I'm not exactly sure what I'm taking about and my answer
|
||||
becomes a very vague "not as far as I know".
|
||||
|
||||
9) When I connect to a console, it says it is down. Why?
|
||||
|
||||
There are multiple reasons why this might happen. First, see if it's
|
||||
just a remnant of some other temporary problem. Try and bring the
|
||||
console up by doing a '^Eco' from the client. If that doesn't work,
|
||||
there's a more serious problem which, hopefully, the conserver logfile
|
||||
will explain. Check the log for any permission problems, connection
|
||||
refused messages, etc. You might get more useful information in
|
||||
the log by using the -v option or even by enabling debugging with
|
||||
-D (ideally that shouldn't be necessary). Depending on the type of
|
||||
console, your system might be out of pseudo-terminals, another process
|
||||
might have a terminal server port occupied (another console server or
|
||||
telnet session), or there was an unseen typo in a path or hostname.
|
||||
The logfile should show hints of things like this and other issues.
|
||||
|
||||
99) Ok, things just don't seem to work. Help?!?
|
||||
|
||||
Yes, this is a pretty vague question, but here are a few tips that
|
||||
@ -130,5 +146,5 @@ directed to faq@conserver.com. The FAQ answers the following questions:
|
||||
through the same problem?
|
||||
|
||||
#
|
||||
# $Id: FAQ,v 1.6 2002-03-25 16:16:29-08 bryan Exp $
|
||||
# $Id: FAQ,v 1.7 2002-09-22 10:21:06-07 bryan Exp $
|
||||
#
|
||||
|
3
INSTALL
3
INSTALL
@ -69,6 +69,7 @@ Detailed Instructions
|
||||
--with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
|
||||
--with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
|
||||
--with-regex Use regular expressions in conserver.passwd
|
||||
--with-pam enable PAM support
|
||||
|
||||
Not surprisingly, some match the old conserver/cons.h items...here
|
||||
they are for reference:
|
||||
@ -161,5 +162,5 @@ Other Information And Gotchas
|
||||
|
||||
|
||||
#
|
||||
# $Id: INSTALL,v 1.22 2002-03-25 16:16:17-08 bryan Exp $
|
||||
# $Id: INSTALL,v 1.23 2002-09-23 14:05:31-07 bryan Exp $
|
||||
#
|
||||
|
27
README
27
README
@ -18,18 +18,23 @@ Downloading
|
||||
The latest version can be found at http://www.conserver.com/
|
||||
|
||||
|
||||
Postcard
|
||||
Systems Tested
|
||||
|
||||
I always like to hear from people who use conserver - it's exciting
|
||||
to see how many people all over the world are using the package.
|
||||
If you'd like to give me a real thrill, send me a postcard of your
|
||||
site, town, or area! Even if you're right around the corner, it
|
||||
would be a blast to hear from you.
|
||||
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.
|
||||
|
||||
Bryan Stansell
|
||||
P.O. Box 984
|
||||
Redwood City, CA 94064-0984
|
||||
USA
|
||||
Solaris 2.5.1 thru 9 (sparc/x86), gcc
|
||||
BSDI BSD/OS 3.X, gcc
|
||||
MacOS X
|
||||
Linux 2.2.18 (x86), gcc
|
||||
Linux 2.4.2 (x86), gcc
|
||||
FreeBSD 4.2 (x86), gcc
|
||||
cygwin (w2k),gcc 2.95.3
|
||||
DEC Tru64 4.0, gcc
|
||||
DEC Tru64 4.0/5.1, DEC cc
|
||||
HP-UX 10.20, gcc
|
||||
AIX 4.3.3, AIX cc
|
||||
|
||||
|
||||
Contributions
|
||||
@ -45,5 +50,5 @@ Contributions
|
||||
http://www.columbia.edu/acis/sy/unixdev/zinc
|
||||
|
||||
#
|
||||
# $Id: README,v 1.19 2002-02-16 17:31:44-08 bryan Exp $
|
||||
# $Id: README,v 1.21 2002-09-23 10:10:11-07 bryan Exp $
|
||||
#
|
||||
|
64
acconfig.h
64
acconfig.h
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* ./configure invocation
|
||||
*/
|
||||
#undef CONFIGINVOCATION
|
||||
|
||||
/*
|
||||
* Socket used to communicate
|
||||
*/
|
||||
#undef DEFPORT
|
||||
|
||||
/*
|
||||
* Base socket used for secondary channel
|
||||
*/
|
||||
#undef DEFBASEPORT
|
||||
|
||||
/*
|
||||
* Hostname of console server
|
||||
*/
|
||||
#undef MASTERHOST
|
||||
|
||||
/*
|
||||
* Config file path
|
||||
*/
|
||||
#undef CONFIGFILE
|
||||
|
||||
/*
|
||||
* Password file path
|
||||
*/
|
||||
#undef PASSWDFILE
|
||||
|
||||
/*
|
||||
* Logfile path
|
||||
*/
|
||||
#undef LOGFILEPATH
|
||||
|
||||
/*
|
||||
* Number of consoles per child process
|
||||
*/
|
||||
#undef MAXMEMB
|
||||
|
||||
/*
|
||||
* TCP connection timeout
|
||||
*/
|
||||
#undef CONNECTTIMEOUT
|
||||
|
||||
/*
|
||||
* pidfile to write to
|
||||
*/
|
||||
#undef PIDFILE
|
||||
|
||||
/*
|
||||
* use tcp_wrappers libwrap
|
||||
*/
|
||||
#undef USE_LIBWRAP
|
||||
|
||||
/*
|
||||
* use ansi prototypes/decls
|
||||
*/
|
||||
#undef USE_ANSI_PROTO
|
||||
|
||||
/*
|
||||
* have POSIX regcomp
|
||||
*/
|
||||
#undef HAVE_POSIX_REGCOMP
|
@ -1,10 +1,15 @@
|
||||
|
||||
I have not touched the autologin directory. See the README.old and
|
||||
INSTALL.old files if you interested in the program. I cannot guarantee
|
||||
it will compile, install, or run. It is definately not integrated with
|
||||
../Makefile or any of the porting support. If you have patches that
|
||||
make it work, please send them to me and I'll be more than happy to
|
||||
incorporate them.
|
||||
This file used to say "I have not touched the autologin directory."
|
||||
That's no longer true. I've applied patches submitted by the user
|
||||
community (see the CHANGES file for details). I still cannot guarantee
|
||||
anything, but it sounds like at least one person out there is
|
||||
successfully using the code. And now for my original hand-waving...
|
||||
|
||||
See the README.old and INSTALL.old files if you interested in the
|
||||
program. I cannot guarantee it will compile, install, or run. It is
|
||||
definately not integrated with ../Makefile or any of the porting
|
||||
support. If you have patches that make it work, please send them to me
|
||||
and I'll be more than happy to incorporate them.
|
||||
|
||||
No one I've ever talked to found a need for something like autologin.
|
||||
Good luck.
|
||||
@ -12,5 +17,5 @@ Good luck.
|
||||
Bryan Stansell
|
||||
|
||||
#
|
||||
# $Id: README,v 1.1 1999-01-21 22:59:40-08 bryan Exp $
|
||||
# $Id: README,v 1.2 2002-09-23 14:08:42-07 bryan Exp $
|
||||
#
|
||||
|
@ -19,6 +19,29 @@
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <utmp.h>
|
||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||
|
||||
/*
|
||||
* There is no official registry of non-vendor audit event numbers,
|
||||
* but the following should be OK.
|
||||
*
|
||||
* You need to add a line by hand to /etc/security/audit_event to make
|
||||
* praudit(1) look pretty:
|
||||
*
|
||||
* 32900:AUE_autologin:autologin:lo
|
||||
*
|
||||
* If you have to change the value for AUE_autologin, you'll also need
|
||||
* to change the /etc/security/audit_event line.
|
||||
*/
|
||||
|
||||
#define AUE_autologin 32900
|
||||
|
||||
#include <sys/unistd.h>
|
||||
#include <netdb.h>
|
||||
#include <bsm/audit.h>
|
||||
#include <bsm/libbsm.h>
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#include <compat.h>
|
||||
|
||||
@ -46,7 +69,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
char *rcsid = "$Id: autologin.c,v 1.22 93/09/04 21:48:41 ksb Exp $";
|
||||
char *rcsid = "$Id: autologin.c,v 1.23 2002-09-20 23:29:39-07 bryan Exp $";
|
||||
#endif /* not lint */
|
||||
extern char *progname;
|
||||
gid_t awGrps[NGROUPS_MAX];
|
||||
@ -96,8 +119,18 @@ Process()
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||
char my_hostname[MAXHOSTNAMELEN];
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||
if (0 != gethostname(my_hostname, sizeof(my_hostname))) {
|
||||
(void) fprintf(stderr, "%s: gethostname: %s\n", strerror(errno));
|
||||
exit(1);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
if ((char *)0 != pcCommand) {
|
||||
if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) {
|
||||
(void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno));
|
||||
@ -127,6 +160,7 @@ Process()
|
||||
}
|
||||
wUid = pwd->pw_uid;
|
||||
wGid = pwd->pw_gid;
|
||||
(void)endpwent();
|
||||
#ifdef HAVE_GETUSERATTR
|
||||
/* getuserattr() returns a funny list of groups:
|
||||
* "grp1\0grp2\0grp3\0\0"
|
||||
@ -141,6 +175,7 @@ Process()
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_GETUSERATTR */
|
||||
(void)endgrent();
|
||||
|
||||
if ((char *)0 != pcTty) {
|
||||
if ( '/' == *pcTty ) {
|
||||
@ -199,6 +234,100 @@ Process()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM)
|
||||
if (!cannot_audit(0)) {
|
||||
# if defined(HAVE_GETAUDIT_ADDR)
|
||||
struct auditinfo_addr audit_info;
|
||||
# else
|
||||
struct auditinfo audit_info;
|
||||
# endif
|
||||
au_mask_t audit_mask;
|
||||
# if !defined(HAVE_GETAUDIT_ADDR)
|
||||
struct hostent *hp;
|
||||
# endif
|
||||
int iAuditFile;
|
||||
int fShowEvent = 1;
|
||||
token_t *ptAuditToken;
|
||||
|
||||
(void)memset(&audit_info, 0, sizeof(audit_info));
|
||||
audit_info.ai_auid = wUid;
|
||||
audit_info.ai_asid = getpid();
|
||||
audit_mask.am_success = audit_mask.am_failure = 0;
|
||||
(void) au_user_mask(pcLogin, &audit_mask);
|
||||
audit_info.ai_mask.am_success = audit_mask.am_success;
|
||||
audit_info.ai_mask.am_failure = audit_mask.am_failure;
|
||||
# if defined(HAVE_GETAUDIT_ADDR)
|
||||
(void)aug_get_machine(my_hostname,
|
||||
&audit_info.ai_termid.at_addr[0],
|
||||
&audit_info.ai_termid.at_type);
|
||||
# else
|
||||
if ((char *)0 != (hp = gethostbyname(my_hostname))
|
||||
&& AF_INET == hp->h_addrtype) {
|
||||
(void)memcpy(&audit_info.ai_termid.machine,
|
||||
hp->h_addr,
|
||||
sizeof(audit_info.ai_termid.machine));
|
||||
}
|
||||
# endif
|
||||
# if defined(HAVE_GETAUDIT_ADDR)
|
||||
if (0 > setaudit_addr(&audit_info, sizeof(audit_info)))
|
||||
# else
|
||||
if (0 > setaudit(&audit_info))
|
||||
# endif
|
||||
{
|
||||
fprintf(stderr, "%s: setaudit failed: %s\n",
|
||||
progname,
|
||||
strerror(errno));
|
||||
fShowEvent = 0;
|
||||
}
|
||||
if (fShowEvent) {
|
||||
fShowEvent = au_preselect(AUE_autologin,
|
||||
&audit_mask,
|
||||
AU_PRS_SUCCESS,
|
||||
AU_PRS_REREAD);
|
||||
}
|
||||
if (fShowEvent) {
|
||||
iAuditFile = au_open();
|
||||
# if defined(HAVE_GETAUDIT_ADDR)
|
||||
ptAuditToken = au_to_subject_ex(wUid,
|
||||
wUid,
|
||||
wGid,
|
||||
wUid,
|
||||
wGid,
|
||||
audit_info.ai_asid,
|
||||
audit_info.ai_asid,
|
||||
&audit_info.ai_termid),
|
||||
# else
|
||||
ptAuditToken = au_to_subject(wUid,
|
||||
wUid,
|
||||
wGid,
|
||||
wUid,
|
||||
wGid,
|
||||
audit_info.ai_asid,
|
||||
audit_info.ai_asid,
|
||||
&audit_info.ai_termid),
|
||||
# endif
|
||||
(void)au_write(iAuditFile, ptAuditToken);
|
||||
ptAuditToken = au_to_text(gettext("successful login"));
|
||||
(void)au_write(iAuditFile, ptAuditToken);
|
||||
if ((char *)0 != pcCmd) {
|
||||
ptAuditToken = au_to_text(pcCmd);
|
||||
(void)au_write(iAuditFile, ptAuditToken);
|
||||
}
|
||||
# if defined(HAVE_GETAUDIT_ADDR)
|
||||
ptAuditToken = au_to_return32(0, 0);
|
||||
# else
|
||||
ptAuditToken = au_to_return(0, 0);
|
||||
# endif
|
||||
(void)au_write(iAuditFile, ptAuditToken);
|
||||
if(0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) {
|
||||
fprintf(stderr, "%s: audit write failed",
|
||||
progname,
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Open the TTY for stdin, stdout and stderr
|
||||
*/
|
||||
if ((char *)0 != pcDevTty) {
|
||||
|
4
compat.h
4
compat.h
@ -186,6 +186,10 @@ extern char *h_errlist[];
|
||||
typedef unsigned long in_addr_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IUCLC, OLCUC and XCASE were removed from IEEE Std 1003.1-200x
|
||||
* as legacy definitions.
|
||||
|
258
config.h.in
258
config.h.in
@ -1,277 +1,285 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/*
|
||||
* ./configure invocation
|
||||
*/
|
||||
#undef CONFIGINVOCATION
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/*
|
||||
* Socket used to communicate
|
||||
*/
|
||||
#undef DEFPORT
|
||||
|
||||
/*
|
||||
* Base socket used for secondary channel
|
||||
*/
|
||||
#undef DEFBASEPORT
|
||||
|
||||
/*
|
||||
* Hostname of console server
|
||||
*/
|
||||
#undef MASTERHOST
|
||||
|
||||
/*
|
||||
* Config file path
|
||||
*/
|
||||
/* Config file path */
|
||||
#undef CONFIGFILE
|
||||
|
||||
/*
|
||||
* Password file path
|
||||
*/
|
||||
#undef PASSWDFILE
|
||||
/* ./configure invocation */
|
||||
#undef CONFIGINVOCATION
|
||||
|
||||
/*
|
||||
* Logfile path
|
||||
*/
|
||||
#undef LOGFILEPATH
|
||||
|
||||
/*
|
||||
* Number of consoles per child process
|
||||
*/
|
||||
#undef MAXMEMB
|
||||
|
||||
/*
|
||||
* TCP connection timeout
|
||||
*/
|
||||
/* TCP connection timeout */
|
||||
#undef CONNECTTIMEOUT
|
||||
|
||||
/*
|
||||
* pidfile to write to
|
||||
*/
|
||||
#undef PIDFILE
|
||||
/* Base socket used for secondary channel */
|
||||
#undef DEFBASEPORT
|
||||
|
||||
/*
|
||||
* use tcp_wrappers libwrap
|
||||
*/
|
||||
#undef USE_LIBWRAP
|
||||
/* Socket used to communicate */
|
||||
#undef DEFPORT
|
||||
|
||||
/*
|
||||
* use ansi prototypes/decls
|
||||
*/
|
||||
#undef USE_ANSI_PROTO
|
||||
/* Define to 1 if you have the <bsm/audit.h> header file. */
|
||||
#undef HAVE_BSM_AUDIT_H
|
||||
|
||||
/*
|
||||
* have POSIX regcomp
|
||||
*/
|
||||
#undef HAVE_POSIX_REGCOMP
|
||||
|
||||
/* Define if you have the <crypt.h> header file. */
|
||||
/* Define to 1 if you have the <crypt.h> header file. */
|
||||
#undef HAVE_CRYPT_H
|
||||
|
||||
/* Define if you have the `flock' function. */
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#undef HAVE_FLOCK
|
||||
|
||||
/* Define if you have the `getdtablesize' function. */
|
||||
/* Define if libbsm has `getaudit'. */
|
||||
#undef HAVE_GETAUDIT
|
||||
|
||||
/* Define if libbsm has `getaudit_addr'. */
|
||||
#undef HAVE_GETAUDIT_ADDR
|
||||
|
||||
/* Define to 1 if you have the `getdtablesize' function. */
|
||||
#undef HAVE_GETDTABLESIZE
|
||||
|
||||
/* Define if you have the `getlogin' function. */
|
||||
/* Define to 1 if you have the `getlogin' function. */
|
||||
#undef HAVE_GETLOGIN
|
||||
|
||||
/* Define if you have the `getopt' function. */
|
||||
/* Define to 1 if you have the `getopt' function. */
|
||||
#undef HAVE_GETOPT
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define if you have the `getpassphrase' function. */
|
||||
/* Define to 1 if you have the `getpassphrase' function. */
|
||||
#undef HAVE_GETPASSPHRASE
|
||||
|
||||
/* Define if you have the `getrlimit' function. */
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#undef HAVE_GETRLIMIT
|
||||
|
||||
/* Define if you have the `getsid' function. */
|
||||
/* Define to 1 if you have the `getsid' function. */
|
||||
#undef HAVE_GETSID
|
||||
|
||||
/* Define if you have the `getspnam' function. */
|
||||
/* Define to 1 if you have the `getspnam' function. */
|
||||
#undef HAVE_GETSPNAM
|
||||
|
||||
/* Define if you have the `getuserattr' function. */
|
||||
/* Define to 1 if you have the `getuserattr' function. */
|
||||
#undef HAVE_GETUSERATTR
|
||||
|
||||
/* Define if you have the `getutent' function. */
|
||||
/* Define to 1 if you have the `getutent' function. */
|
||||
#undef HAVE_GETUTENT
|
||||
|
||||
/* Define if you have the `grantpt' function. */
|
||||
/* Define to 1 if you have the `grantpt' function. */
|
||||
#undef HAVE_GRANTPT
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if the system has the type `in_addr_t'. */
|
||||
/* Defined if in_addr_t exists */
|
||||
#undef HAVE_IN_ADDR_T
|
||||
|
||||
/* Define if you have the `memcmp' function. */
|
||||
/* Define to 1 if you have the `bsm' library (-lbsm). */
|
||||
#undef HAVE_LIBBSM
|
||||
|
||||
/* Define to 1 if you have the `memcmp' function. */
|
||||
#undef HAVE_MEMCMP
|
||||
|
||||
/* Define if you have the `memcpy' function. */
|
||||
/* Define to 1 if you have the `memcpy' function. */
|
||||
#undef HAVE_MEMCPY
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the `memset' function. */
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define if you have the `ptsname' function. */
|
||||
/* have PAM */
|
||||
#undef HAVE_PAM
|
||||
|
||||
/* have POSIX regcomp */
|
||||
#undef HAVE_POSIX_REGCOMP
|
||||
|
||||
/* Define to 1 if you have the `ptsname' function. */
|
||||
#undef HAVE_PTSNAME
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the `setgroups' function. */
|
||||
/* Define to 1 if you have the `setgroups' function. */
|
||||
#undef HAVE_SETGROUPS
|
||||
|
||||
/* Define if you have the `setlinebuf' function. */
|
||||
/* Define to 1 if you have the `setlinebuf' function. */
|
||||
#undef HAVE_SETLINEBUF
|
||||
|
||||
/* Define if you have the `setpgrp' function. */
|
||||
/* Define to 1 if you have the `setpgrp' function. */
|
||||
#undef HAVE_SETPGRP
|
||||
|
||||
/* Define if you have the `setsid' function. */
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#undef HAVE_SETSID
|
||||
|
||||
/* Define if you have the `setsockopt' function. */
|
||||
/* Define to 1 if you have the `setsockopt' function. */
|
||||
#undef HAVE_SETSOCKOPT
|
||||
|
||||
/* Define if you have the `setttyent' function. */
|
||||
/* Define to 1 if you have the `setttyent' function. */
|
||||
#undef HAVE_SETTTYENT
|
||||
|
||||
/* Define if you have the `setvbuf' function. */
|
||||
/* Define to 1 if you have the `setvbuf' function. */
|
||||
#undef HAVE_SETVBUF
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
/* Define if you have the <shadow.h> header file. */
|
||||
/* Define to 1 if you have the <shadow.h> header file. */
|
||||
#undef HAVE_SHADOW_H
|
||||
|
||||
/* Define if you have the `sigaction' function. */
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
/* 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 if you have the <stdlib.h> header file. */
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the <stropts.h> header file. */
|
||||
/* Define to 1 if you have the <stropts.h> header file. */
|
||||
#undef HAVE_STROPTS_H
|
||||
|
||||
/* Define if you have the `sysconf' function. */
|
||||
/* Define to 1 if you have the `sysconf' function. */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* Define if you have the <sysexits.h> header file. */
|
||||
/* Define to 1 if you have the <sysexits.h> header file. */
|
||||
#undef HAVE_SYSEXITS_H
|
||||
|
||||
/* Define if you have the <sys/audit.h> header file. */
|
||||
/* Define to 1 if you have the <sys/audit.h> header file. */
|
||||
#undef HAVE_SYS_AUDIT_H
|
||||
|
||||
/* Define if you have the <sys/ioctl_compat.h> header file. */
|
||||
/* Define to 1 if you have the <sys/ioctl_compat.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_COMPAT_H
|
||||
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define if you have the <sys/proc.h> header file. */
|
||||
/* Define to 1 if you have the <sys/proc.h> header file. */
|
||||
#undef HAVE_SYS_PROC_H
|
||||
|
||||
/* Define if you have the <sys/resource.h> header file. */
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define if you have the <sys/ttold.h> header file. */
|
||||
/* Define to 1 if you have the <sys/ttold.h> header file. */
|
||||
#undef HAVE_SYS_TTOLD_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the <sys/uio.h> header file. */
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#undef HAVE_SYS_UIO_H
|
||||
|
||||
/* Define if you have the <sys/vlimit.h> header file. */
|
||||
/* Define to 1 if you have the <sys/vlimit.h> header file. */
|
||||
#undef HAVE_SYS_VLIMIT_H
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define if you have the `tcgetattr' function. */
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define if you have the `tcgetpgrp' function. */
|
||||
/* Define to 1 if you have the `tcgetpgrp' function. */
|
||||
#undef HAVE_TCGETPGRP
|
||||
|
||||
/* Define if you have the `tcsendbreak' function. */
|
||||
/* Define to 1 if you have the `tcsendbreak' function. */
|
||||
#undef HAVE_TCSENDBREAK
|
||||
|
||||
/* Define if you have the `tcsetattr' function. */
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define if you have the `tcsetpgrp' function. */
|
||||
/* Define to 1 if you have the `tcsetpgrp' function. */
|
||||
#undef HAVE_TCSETPGRP
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <ttyent.h> header file. */
|
||||
/* Define to 1 if you have the <ttyent.h> header file. */
|
||||
#undef HAVE_TTYENT_H
|
||||
|
||||
/* Define if you have the <types.h> header file. */
|
||||
/* Define to 1 if you have the <types.h> header file. */
|
||||
#undef HAVE_TYPES_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the `unlockpt' function. */
|
||||
/* Define to 1 if you have the `unlockpt' function. */
|
||||
#undef HAVE_UNLOCKPT
|
||||
|
||||
/* Define if you have the <usersec.h> header file. */
|
||||
/* Define to 1 if you have the <usersec.h> header file. */
|
||||
#undef HAVE_USERSEC_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 as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if the `setpgrp' function takes no argument. */
|
||||
/* Define to 1 if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define if on AIX 3.
|
||||
/* use ansi prototypes/decls */
|
||||
#undef USE_ANSI_PROTO
|
||||
|
||||
/* use tcp_wrappers libwrap */
|
||||
#undef USE_LIBWRAP
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
|
87
configure.in
87
configure.in
@ -1,3 +1,19 @@
|
||||
dnl ### autoheader templates. #######################################
|
||||
AH_TEMPLATE([CONFIGINVOCATION], [./configure invocation])
|
||||
AH_TEMPLATE([DEFPORT], [Socket used to communicate])
|
||||
AH_TEMPLATE([DEFBASEPORT], [Base socket used for secondary channel])
|
||||
AH_TEMPLATE([MASTERHOST], [Hostname of console server])
|
||||
AH_TEMPLATE([CONFIGFILE], [Config file path])
|
||||
AH_TEMPLATE([PASSWDFILE], [Password file path])
|
||||
AH_TEMPLATE([LOGFILEPATH], [Logfile path])
|
||||
AH_TEMPLATE([MAXMEMB], [Number of consoles per child process])
|
||||
AH_TEMPLATE([CONNECTTIMEOUT], [TCP connection timeout])
|
||||
AH_TEMPLATE([PIDFILE], [pidfile to write to])
|
||||
AH_TEMPLATE([USE_LIBWRAP], [use tcp_wrappers libwrap])
|
||||
AH_TEMPLATE([USE_ANSI_PROTO], [use ansi prototypes/decls])
|
||||
AH_TEMPLATE([HAVE_POSIX_REGCOMP], [have POSIX regcomp])
|
||||
AH_TEMPLATE([HAVE_PAM], [have PAM])
|
||||
|
||||
dnl ### Normal initialization. ######################################
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([conserver/main.c])
|
||||
@ -187,32 +203,26 @@ AC_HEADER_SYS_WAIT
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_CACHE_CHECK([if sig_atomic_t is defined], ac_cv_type_sig_atomic_t,
|
||||
AC_TRY_LINK([
|
||||
#include <signal.h>
|
||||
], [
|
||||
sig_atomic_t sigatom;
|
||||
sigatom = 1;
|
||||
],
|
||||
ac_cv_type_sig_atomic_t=yes,
|
||||
ac_cv_type_sig_atomic_t=no
|
||||
)
|
||||
)
|
||||
if test "$ac_cv_type_sig_atomic_t" != "yes"; then
|
||||
AC_DEFINE(sig_atomic_t, volatile int, [Define if <signal.h> does not define sig_atomic_t])
|
||||
fi
|
||||
AC_CHECK_TYPE([sig_atomic_t],,
|
||||
AC_DEFINE(sig_atomic_t, volatile int,
|
||||
[Define if <signal.h> does not define sig_atomic_t]),
|
||||
[#include <signal.h>])
|
||||
|
||||
AC_CHECK_TYPES(in_addr_t,,,[$ac_includes_default
|
||||
AC_CHECK_TYPE([in_addr_t],[AC_DEFINE(HAVE_IN_ADDR_T,1,
|
||||
[Defined if in_addr_t exists])],,[$ac_includes_default
|
||||
#include <netinet/in.h>])
|
||||
|
||||
AC_CHECK_TYPE([socklen_t],[AC_DEFINE(HAVE_SOCKLEN_T,1,
|
||||
[Defined if socklen_t exists])],,[$ac_includes_default
|
||||
#include <sys/socket.h>])
|
||||
|
||||
dnl ### Check for libraries. #######################################
|
||||
AC_SEARCH_LIBS(socket,socket)
|
||||
AC_SEARCH_LIBS(gethostbyname,nsl)
|
||||
AC_SEARCH_LIBS(crypt,crypt)
|
||||
|
||||
AC_SUBST(WRAPLIBS)
|
||||
AC_SUBST(WRAPINCS)
|
||||
AC_SUBST(CONSLIBS)
|
||||
AC_SUBST(CONSCPPFLAGS)
|
||||
AC_SUBST(CONSLDFLAGS)
|
||||
AC_ARG_WITH(libwrap,
|
||||
AC_HELP_STRING([--with-libwrap@<:@=PATH@:>@],
|
||||
[Compile in libwrap (tcp_wrappers) support]),
|
||||
@ -232,7 +242,6 @@ AC_ARG_WITH(libwrap,
|
||||
CPPFLAGS="$CPPFLAGS $WRAPCPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $WRAPLDFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for TCP wrappers header tcpd.h)
|
||||
AC_CHECK_HEADER(tcpd.h,
|
||||
[LIBS="$LIBS -lwrap"
|
||||
AC_MSG_CHECKING(for TCP wrappers library -lwrap)
|
||||
@ -242,8 +251,9 @@ AC_ARG_WITH(libwrap,
|
||||
],[hosts_access((void *)0)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_LIBWRAP)
|
||||
WRAPLIBS="$WRAPLDFLAGS -lwrap"
|
||||
WRAPINCS="$WRAPCPPFLAGS"],
|
||||
CONSLIBS="$CONSLIBS -lwrap"
|
||||
CONSLDFLAGS="$CONSLDFLAGS $WRAPLDFLAGS"
|
||||
CONSCPPFLAGS="$CONSCPPFLAGS $WRAPCPPFLAGS"],
|
||||
[AC_MSG_RESULT(no)])],)
|
||||
|
||||
LIBS="$oLIBS"
|
||||
@ -288,11 +298,44 @@ AC_ARG_WITH(regex,
|
||||
AC_MSG_RESULT(no)
|
||||
fi],[AC_MSG_RESULT(no)])
|
||||
|
||||
AC_ARG_WITH(pam,
|
||||
AC_HELP_STRING([--with-pam],
|
||||
[enable PAM support]),
|
||||
[if test "$withval" = yes; then
|
||||
oLIBS="$LIBS"
|
||||
|
||||
AC_CHECK_HEADER(security/pam_appl.h,
|
||||
[LIBS="$LIBS -lpam"
|
||||
AC_MSG_CHECKING(for PAM library -lpam)
|
||||
AC_TRY_LINK_FUNC([pam_start],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PAM)
|
||||
CONSLIBS="$CONSLIBS -lpam"],
|
||||
[LIBS="$LIBS -ldl"
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(for PAM library -lpam with -ldl)
|
||||
AC_TRY_LINK_FUNC([pam_end],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PAM)
|
||||
CONSLIBS="$CONSLIBS -lpam -ldl"],
|
||||
[AC_MSG_RESULT(no)])])],)
|
||||
|
||||
LIBS="$oLIBS"
|
||||
fi],)
|
||||
|
||||
|
||||
AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt flock sigaction setsockopt getdtablesize putenv memset memcpy memcmp sysconf getpassphrase getlogin)
|
||||
AC_FUNC_SETPGRP
|
||||
|
||||
dnl Checks for libbsm functions
|
||||
AC_CHECK_HEADERS(bsm/audit.h)
|
||||
AC_CHECK_LIB(bsm, getaudit)
|
||||
AC_CHECK_FUNC(getaudit,
|
||||
AC_DEFINE(HAVE_GETAUDIT, 1, [Define if libbsm has `getaudit'.]))
|
||||
AC_CHECK_FUNC(getaudit_addr,
|
||||
AC_DEFINE(HAVE_GETAUDIT_ADDR, 1, [Define if libbsm has `getaudit_addr'.]))
|
||||
|
||||
|
||||
dnl ### Create output files. #######################################
|
||||
AC_SUBST(LIBOBJS)
|
||||
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile])
|
||||
AC_OUTPUT
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: conserver.passwd.man,v 1.5 2002-03-25 15:45:43-08 bryan Exp $
|
||||
.\" $Id: conserver.passwd.man,v 1.6 2002-09-23 14:15:53-07 bryan Exp $
|
||||
.TH CONSERVER.PASSWD 5 "Local"
|
||||
.SH NAME
|
||||
conserver.passwd \- user access information for conserver(8)
|
||||
@ -37,7 +37,9 @@ without an entry earlier in the file.
|
||||
the encrypted password,
|
||||
or the string ``\fB*passwd*\fP''
|
||||
to indicate that \fBconserver\fP should look up the user's password
|
||||
in the system \fBpasswd\fP (or \fBshadow\fP) database.
|
||||
in the system \fBpasswd\fP (or \fBshadow\fP) database. If PAM
|
||||
support has been enabled (\fB--with-pam\fP), PAM lookups will be done instead
|
||||
of \fBpasswd\fP (or \fBshadow\fP) lookups.
|
||||
If this field is empty, password checking is bypassed for this user.
|
||||
.TP
|
||||
.I consoles
|
||||
|
@ -113,11 +113,15 @@
|
||||
"http://hea-www.harvard.edu/~fine/">Tom Fine</A> (<A
|
||||
href=
|
||||
"mailto:fine@head-cfa.harvard.edu">fine@head-cfa.harvard.edu</A>)
|
||||
at Ohio State and then Kevin S Braunsdorf (<A href=
|
||||
"mailto:ksb+conserver@sa.fedex.com">ksb+conserver@sa.fedex.com</A>).
|
||||
Patches from Robert Olson (<A href=
|
||||
"mailto:olson@mcs.anl.gov">olson@mcs.anl.gov</A>) were
|
||||
then applied to get network console support.</P>
|
||||
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>)
|
||||
@ -175,13 +179,13 @@
|
||||
|
||||
<H3>Downloading</H3>
|
||||
|
||||
<P>The current version, released on Jun 05, 2002, is <A
|
||||
<P>The current version, released on Sep 23, 2002, is <A
|
||||
href=
|
||||
"http://www.conserver.com/7.2.2.tar.gz">7.2.2.tar.gz</A>.
|
||||
"http://www.conserver.com/7.2.3.tar.gz">7.2.3.tar.gz</A>.
|
||||
You can get it via <A href=
|
||||
"ftp://ftp.conserver.com/conserver/7.2.2.tar.gz">FTP</A>
|
||||
"ftp://ftp.conserver.com/conserver/7.2.3.tar.gz">FTP</A>
|
||||
or <A href=
|
||||
"http://www.conserver.com/7.2.2.tar.gz">HTTP</A>. See the
|
||||
"http://www.conserver.com/7.2.3.tar.gz">HTTP</A>. See the
|
||||
<A href="http://www.conserver.com/CHANGES">CHANGES</A>
|
||||
file for information on the latest updates.</P>
|
||||
|
||||
@ -203,29 +207,15 @@
|
||||
"http://www.conserver.com/INSTALL">INSTALL</A> file for
|
||||
instructions.</P>
|
||||
|
||||
<H3>Postcard</H3>
|
||||
|
||||
<P>I always like to hear from people who use conserver -
|
||||
it's exciting to see how many people all over the world
|
||||
are using the package. If you'd like to give me a real
|
||||
thrill, send me a postcard of your site, town, or area!
|
||||
Even if you're right around the corner, it would be a
|
||||
blast to hear from you.</P>
|
||||
<PRE>
|
||||
Bryan Stansell
|
||||
P.O. Box 984
|
||||
Redwood City, CA 94064-0984
|
||||
USA
|
||||
</PRE>
|
||||
|
||||
<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, please let me know.</P>
|
||||
to this list (or something on the list doesn't work any
|
||||
more), please let me know.</P>
|
||||
|
||||
<UL>
|
||||
<LI>Solaris 2.5.1 thru 8 (sparc/x86), gcc</LI>
|
||||
<LI>Solaris 2.5.1 thru 9 (sparc/x86), gcc</LI>
|
||||
|
||||
<LI>BSDI BSD/OS 3.X, gcc</LI>
|
||||
|
||||
|
@ -15,11 +15,11 @@ MKDIR = @MKDIR@
|
||||
|
||||
### Compiler and link options
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@ # -DPUCC -DSUN5
|
||||
CFLAGS = @CFLAGS@
|
||||
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
CPPFLAGS = -I.. -I$(top_srcdir) -I$(srcdir) $(DEFS) @CPPFLAGS@ @WRAPINCS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@ @WRAPLIBS@
|
||||
CPPFLAGS = -I.. -I$(top_srcdir) -I$(srcdir) $(DEFS) @CPPFLAGS@ @CONSCPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@ @CONSLDFLAGS@
|
||||
LIBS = @LIBS@ @CONSLIBS@
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: consent.c,v 5.88 2002-06-05 15:05:00-07 bryan Exp $
|
||||
* $Id: consent.c,v 5.90 2002-09-23 11:38:46-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -714,11 +714,8 @@ ConsInit(pCE, pfdSet, useHostCache)
|
||||
*/
|
||||
if (pCE->fup) {
|
||||
ConsDown(pCE, pfdSet);
|
||||
if (pCE->isNetworkConsole) {
|
||||
sleep(1); /* Give the terminal server a chance */
|
||||
} else {
|
||||
usleep(USLEEP_FOR_SLOW_PORTS);
|
||||
}
|
||||
usleep(500000); /* pause 0.50 sec to let things settle a bit */
|
||||
resetMark();
|
||||
}
|
||||
|
||||
pCE->autoReUp = 0;
|
||||
@ -758,7 +755,8 @@ ConsInit(pCE, pfdSet, useHostCache)
|
||||
ConsDown(pCE, pfdSet);
|
||||
return;
|
||||
}
|
||||
usleep(USLEEP_FOR_SLOW_PORTS); /* Sleep for slow network ports */
|
||||
usleep(100000); /* Not all terminal servers can keep up */
|
||||
resetMark();
|
||||
|
||||
#if HAVE_MEMSET
|
||||
(void)memset((void *)&port, 0, sizeof(port));
|
||||
@ -830,7 +828,7 @@ ConsInit(pCE, pfdSet, useHostCache)
|
||||
ConsDown(pCE, pfdSet);
|
||||
return;
|
||||
} else { /* Response */
|
||||
int slen;
|
||||
socklen_t slen;
|
||||
flags = 0;
|
||||
slen = sizeof(flags);
|
||||
/* So, getsockopt seems to return -1 if there is something
|
||||
|
@ -1,10 +1,10 @@
|
||||
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
|
||||
.\" $Id: conserver.man,v 1.23 2002-02-25 13:58:45-08 bryan Exp $
|
||||
.\" $Id: conserver.man,v 1.26 2002-09-22 10:41:51-07 bryan Exp $
|
||||
.TH CONSERVER 8 "Local"
|
||||
.SH NAME
|
||||
conserver \- console server daemon
|
||||
.SH SYNOPSIS
|
||||
\fBconserver\fP [\fB\-7dDhinouvV\fP] [\fB\-a\fP \fItype\fP]
|
||||
\fBconserver\fP [\fB\-7dDFhinouvV\fP] [\fB\-a\fP \fItype\fP]
|
||||
[\fB\-m\fP \fImax\fP]
|
||||
[\fB\-M\fP \fIaddr\fP] [\fB\-p\fP \fIport\fP] [\fB\-b\fP \fIport\fP]
|
||||
[\fB\-C\fP \fIconfig\fP] [\fB\-P\fP \fIpasswd\fP]
|
||||
@ -151,6 +151,14 @@ all output to the logfile (see \fB\-L\fP).
|
||||
Enable debugging output, sent to stderr. Multiple \fB-D\fP options
|
||||
increases debug output.
|
||||
.TP
|
||||
.B \-F
|
||||
Do not automatically reinitialize failed (unexpectedly closed)
|
||||
consoles. If the console is a program (`|' syntax) and it closes
|
||||
with a zero exit status, the console is reinitialized regardless
|
||||
of this option. Without this option, a console is immediately reopened,
|
||||
and if that fails, retried every minute until successful.
|
||||
This option has no effect on the \fB-o\fP and \fB-O\fP options.
|
||||
.TP
|
||||
.B \-h
|
||||
Output a brief help message.
|
||||
.TP
|
||||
@ -179,7 +187,7 @@ Obsolete (now a no-op); see \fB\-u\fP.
|
||||
.TP
|
||||
.B \-o
|
||||
Normally, a client connecting to a ``downed'' console does just that.
|
||||
Using this flag, the server will automatically attempt to open
|
||||
Using this option, the server will automatically attempt to open
|
||||
(``bring up'') the console when the client connects.
|
||||
.TP
|
||||
.BI \-O min
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: group.c,v 5.178 2002-06-05 15:05:00-07 bryan Exp $
|
||||
* $Id: group.c,v 5.186 2002-09-23 11:40:35-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -75,6 +75,9 @@
|
||||
#if HAVE_POSIX_REGCOMP
|
||||
#include <regex.h>
|
||||
#endif
|
||||
#if HAVE_PAM
|
||||
#include <security/pam_appl.h>
|
||||
#endif
|
||||
|
||||
#if defined(USE_LIBWRAP)
|
||||
#include <syslog.h>
|
||||
@ -280,32 +283,155 @@ destroyGroup(pGE)
|
||||
free(pGE);
|
||||
}
|
||||
|
||||
#if HAVE_PAM
|
||||
int
|
||||
#if USE_ANSI_PROTO
|
||||
quiet_conv(int num_msg, struct pam_message **msg,
|
||||
struct pam_response **resp, void *appdata_ptr)
|
||||
#else
|
||||
quiet_conv(num_msg, msg, resp, appdata_ptr)
|
||||
int num_msg;
|
||||
struct pam_message **msg;
|
||||
struct pam_response **resp;
|
||||
void *appdata_ptr;
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
struct pam_response *response = NULL;
|
||||
char *pcUser;
|
||||
char *pcWord;
|
||||
pcUser = ((char **)appdata_ptr)[0];
|
||||
pcWord = ((char **)appdata_ptr)[1];
|
||||
|
||||
if (num_msg <= 0)
|
||||
return PAM_CONV_ERR;
|
||||
|
||||
response =
|
||||
(struct pam_response *)calloc(num_msg,
|
||||
sizeof(struct pam_response));
|
||||
|
||||
if (response == (struct pam_response *)0)
|
||||
return PAM_CONV_ERR;
|
||||
|
||||
for (i = 0; i < num_msg; i++) {
|
||||
response[i].resp_retcode = PAM_SUCCESS;
|
||||
switch (msg[i]->msg_style) {
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
response[i].resp =
|
||||
(pcUser != (char *)0 ? strdup(pcUser) : (char *)0);
|
||||
break;
|
||||
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
response[i].resp =
|
||||
(pcWord != (char *)0 ? strdup(pcWord) : (char *)0);
|
||||
break;
|
||||
|
||||
case PAM_TEXT_INFO:
|
||||
case PAM_ERROR_MSG:
|
||||
/* Ignore it... */
|
||||
response[i].resp = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Must be an error of some sort... */
|
||||
free(response);
|
||||
return PAM_CONV_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
*resp = response;
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Is this passwd a match for this user's passwd? (gregf/ksb)
|
||||
* look up passwd in shadow file if we have to, if we are
|
||||
* given a special epass try it first.
|
||||
*/
|
||||
int
|
||||
#if USE_ANSI_PROTO
|
||||
CheckPass(struct passwd *pwd, char *pcWord)
|
||||
CheckPass(char *pcUser, char *pcWord)
|
||||
#else
|
||||
CheckPass(pwd, pcWord)
|
||||
struct passwd *pwd;
|
||||
CheckPass(pcUser, pcWord)
|
||||
char *pcUser;
|
||||
char *pcWord;
|
||||
#endif
|
||||
{
|
||||
#if HAVE_PAM
|
||||
int pam_error;
|
||||
char *appdata[2];
|
||||
static pam_handle_t *pamh = (pam_handle_t *) 0;
|
||||
struct pam_conv conv;
|
||||
appdata[0] = pcUser;
|
||||
appdata[1] = pcWord;
|
||||
conv.conv = &quiet_conv;
|
||||
conv.appdata_ptr = (void *)&appdata;
|
||||
|
||||
Debug(1, "PAM: pam_start(conserver,%s,...)", pcUser);
|
||||
pam_error = pam_start("conserver", pcUser, &conv, &pamh);
|
||||
|
||||
if (pam_error == PAM_SUCCESS) {
|
||||
pam_set_item(pamh, PAM_RHOST, "IHaveNoIdeaHowIGotHere");
|
||||
Debug(1, "PAM: pam_authenticate()", pcUser);
|
||||
pam_error = pam_authenticate(pamh, PAM_SILENT);
|
||||
if (pam_error == PAM_SUCCESS) {
|
||||
Debug(1, "PAM: pam_acct_mgmt()", pcUser);
|
||||
pam_error = pam_acct_mgmt(pamh, PAM_SILENT);
|
||||
if (pam_error != PAM_SUCCESS) {
|
||||
Error("PAM(%s): %s", "conserver",
|
||||
pam_strerror(pamh, pam_error));
|
||||
}
|
||||
} else if (pam_error != PAM_AUTH_ERR) {
|
||||
Error("PAM(%s): %s", "conserver",
|
||||
pam_strerror(pamh, pam_error));
|
||||
}
|
||||
Debug(1, "PAM: pam_end()", pcUser);
|
||||
pam_end(pamh, pam_error);
|
||||
if (pam_error == PAM_ABORT) /* things just got real bad */
|
||||
fSawGoAway = 1;
|
||||
} else {
|
||||
Error("PAM(%s): %s", "conserver", pam_strerror(pamh, pam_error));
|
||||
}
|
||||
if (pam_error == PAM_SUCCESS)
|
||||
return AUTH_SUCCESS;
|
||||
if (pam_error == PAM_USER_UNKNOWN)
|
||||
return AUTH_NOUSER;
|
||||
return AUTH_INVALID;
|
||||
#else /* getpw*() */
|
||||
#if HAVE_GETSPNAM
|
||||
struct passwd *pwd;
|
||||
struct spwd *spwd;
|
||||
int retval = AUTH_SUCCESS;
|
||||
#endif
|
||||
|
||||
#if HAVE_GETSPNAM
|
||||
if ('x' == pwd->pw_passwd[0] && '\000' == pwd->pw_passwd[1]) {
|
||||
if ((struct spwd *)0 != (spwd = getspnam(pwd->pw_name)))
|
||||
return 0 == strcmp(spwd->sp_pwdp,
|
||||
crypt(pcWord, spwd->sp_pwdp));
|
||||
return 0;
|
||||
if (pcWord == (char *)0) {
|
||||
pcWord = "";
|
||||
}
|
||||
if ((pwd = getpwnam(pcUser)) == (struct passwd *)0) {
|
||||
retval = AUTH_NOUSER;
|
||||
} else {
|
||||
#if HAVE_GETSPNAM
|
||||
if ('x' == pwd->pw_passwd[0] && '\000' == pwd->pw_passwd[1]) {
|
||||
if ((spwd = getspnam(pwd->pw_name)) == (struct spwd *)0) {
|
||||
retval = AUTH_NOUSER;
|
||||
} else {
|
||||
if ((spwd->sp_pwdp[0] != '\000' || pcWord[0] != '\000') &&
|
||||
(strcmp(spwd->sp_pwdp, crypt(pcWord, spwd->sp_pwdp)) !=
|
||||
0)) {
|
||||
retval = AUTH_INVALID;
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
return 0 == strcmp(pwd->pw_passwd, crypt(pcWord, pwd->pw_passwd));
|
||||
if ((pwd->pw_passwd[0] != '\000' || pcWord[0] != '\000') &&
|
||||
(strcmp(pwd->pw_passwd, crypt(pcWord, pwd->pw_passwd))
|
||||
!= 0)) {
|
||||
retval = AUTH_INVALID;
|
||||
}
|
||||
}
|
||||
endpwent();
|
||||
return retval;
|
||||
#endif /* getpw*() */
|
||||
}
|
||||
|
||||
/* This returns a string with the current time in ascii form.
|
||||
@ -414,6 +540,8 @@ ReUp(pGE, automatic)
|
||||
Info("%s: automatic reinitialization [%s]", pCE->server.string,
|
||||
strtime(NULL));
|
||||
ConsInit(pCE, &pGE->rinit, 1);
|
||||
if (pCE->fup)
|
||||
pCE->pCLwr = FindWrite(pCE->pCLon);
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,6 +559,22 @@ FlagMark(sig)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* various areas of the code (sometimes not even our own) mess with
|
||||
* the alarm signal, so this function is here to reset it to what
|
||||
* we need. We do not actually set an alarm here, but set the flag
|
||||
* that will call Mark() which will set the next alarm.
|
||||
*/
|
||||
void
|
||||
#if USE_ANSI_PROTO
|
||||
resetMark(void)
|
||||
#else
|
||||
resetMark()
|
||||
#endif
|
||||
{
|
||||
simpleSignal(SIGALRM, FlagMark);
|
||||
fSawMark = 1;
|
||||
}
|
||||
|
||||
void
|
||||
#if USE_ANSI_PROTO
|
||||
tagLogfile(const CONSENT * pCE, const char *fmt, ...)
|
||||
@ -654,18 +798,26 @@ ReapVirt(pGE)
|
||||
/* If someone was writing, they fall back to read-only */
|
||||
if (pCE->pCLwr != (CONSCLIENT *) 0) {
|
||||
pCE->pCLwr->fwr = 0;
|
||||
pCE->pCLwr->fwantwr = 1;
|
||||
tagLogfile(pCE, "%s detached", pCE->pCLwr->acid.string);
|
||||
pCE->pCLwr = (CONSCLIENT *) 0;
|
||||
}
|
||||
|
||||
/* Try an initial reconnect */
|
||||
Info("%s: automatic reinitialization [%s]", pCE->server.string,
|
||||
strtime(NULL));
|
||||
ConsInit(pCE, &pGE->rinit, 0);
|
||||
if (fNoautoreup &&
|
||||
!(WIFEXITED(UWbuf) && WEXITSTATUS(UWbuf) == 0)) {
|
||||
ConsDown(pCE, &pGE->rinit);
|
||||
} else {
|
||||
/* Try an initial reconnect */
|
||||
Info("%s: automatic reinitialization [%s]",
|
||||
pCE->server.string, strtime(NULL));
|
||||
ConsInit(pCE, &pGE->rinit, 0);
|
||||
|
||||
/* If we didn't succeed, try again later */
|
||||
if (!pCE->fup)
|
||||
pCE->autoReUp = 1;
|
||||
/* If we didn't succeed, try again later */
|
||||
if (!pCE->fup)
|
||||
pCE->autoReUp = 1;
|
||||
else
|
||||
pCE->pCLwr = FindWrite(pCE->pCLon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -683,14 +835,10 @@ CheckPasswd(pCLServing, pw_string)
|
||||
char *pw_string;
|
||||
#endif
|
||||
{
|
||||
struct passwd *pwd;
|
||||
FILE *fp;
|
||||
int iLine = 0;
|
||||
char *server, *servers, *this_pw, *user;
|
||||
static STRING username = { (char *)0, 0, 0 };
|
||||
#if HAVE_GETSPNAM
|
||||
struct spwd *spwd;
|
||||
#endif
|
||||
|
||||
buildMyString((char *)0, &username);
|
||||
buildMyString(pCLServing->acid.string, &username);
|
||||
@ -700,18 +848,10 @@ CheckPasswd(pCLServing, pw_string)
|
||||
if ((fp = fopen(pcPasswd, "r")) == (FILE *) 0) {
|
||||
Info("Cannot open passwd file %s: %s", pcPasswd, strerror(errno));
|
||||
|
||||
if ((struct passwd *)0 == (pwd = getpwuid(0))) {
|
||||
(void)endpwent();
|
||||
fileWrite(pCLServing->fd, "no root passwd?\r\n", -1);
|
||||
return 0;
|
||||
}
|
||||
if (0 != CheckPass(pwd, pw_string)) {
|
||||
if (CheckPass("root", pw_string) == AUTH_SUCCESS) {
|
||||
if (fVerbose)
|
||||
Info("User %s logging into server %s via root passwd",
|
||||
pCLServing->acid.string,
|
||||
pCLServing->pCEwant->server.string);
|
||||
(void)endpwent();
|
||||
return 1;
|
||||
Info("User %s authenticated into server %s via root passwd", pCLServing->acid.string, pCLServing->pCEwant->server.string);
|
||||
return AUTH_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
char *wholeLine;
|
||||
@ -735,38 +875,16 @@ CheckPasswd(pCLServing, pw_string)
|
||||
this_pw = pruneSpace(this_pw);
|
||||
servers = pruneSpace(servers);
|
||||
|
||||
if (strcmp(user, "*any*") != 0 &&
|
||||
strcmp(user, username.string) != 0)
|
||||
continue;
|
||||
|
||||
if (strcmp(this_pw, "*passwd*") == 0) {
|
||||
this_pw = (char *)0;
|
||||
if ((struct passwd *)0 !=
|
||||
(pwd = getpwnam(username.string))) {
|
||||
#if HAVE_GETSPNAM
|
||||
if ('x' == pwd->pw_passwd[0] &&
|
||||
'\000' == pwd->pw_passwd[1]) {
|
||||
if ((struct spwd *)0 !=
|
||||
(spwd = getspnam(pwd->pw_name))) {
|
||||
this_pw = spwd->sp_pwdp;
|
||||
}
|
||||
} else {
|
||||
this_pw = pwd->pw_passwd;
|
||||
}
|
||||
#else
|
||||
this_pw = pwd->pw_passwd;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (this_pw == (char *)0)
|
||||
break;
|
||||
|
||||
/*
|
||||
printf
|
||||
("Got servers <%s> passwd <%s> user <%s>, want <%s>\n",
|
||||
servers, this_pw, user, pCLServing->pCEwant->server.string);
|
||||
*/
|
||||
|
||||
if (strcmp(user, "*any*") != 0 &&
|
||||
strcmp(user, username.string) != 0)
|
||||
continue;
|
||||
|
||||
/* If one is empty and the other isn't, instant failure */
|
||||
if ((*this_pw == '\000' && *pw_string != '\000') ||
|
||||
(*this_pw != '\000' && *pw_string == '\000')) {
|
||||
@ -774,18 +892,22 @@ CheckPasswd(pCLServing, pw_string)
|
||||
}
|
||||
|
||||
if ((*this_pw == '\000' && *pw_string == '\000') ||
|
||||
(strcmp(this_pw, crypt(pw_string, this_pw)) == 0)) {
|
||||
((strcmp(this_pw, "*passwd*") ==
|
||||
0) ? (CheckPass(username.string,
|
||||
pw_string) ==
|
||||
AUTH_SUCCESS) : (strcmp(this_pw,
|
||||
crypt(pw_string,
|
||||
this_pw)) == 0))) {
|
||||
server = strtok(servers, ", \t\n");
|
||||
while (server) { /* For each server */
|
||||
if (strcmp(server, "any") == 0) {
|
||||
if (fVerbose) {
|
||||
Info("User %s logging into server %s",
|
||||
Info("User %s authenticated into server %s",
|
||||
pCLServing->acid.string,
|
||||
pCLServing->pCEwant->server.string);
|
||||
}
|
||||
fclose(fp);
|
||||
(void)endpwent();
|
||||
return 1;
|
||||
return AUTH_SUCCESS;
|
||||
} else {
|
||||
char *p;
|
||||
int status;
|
||||
@ -818,14 +940,10 @@ CheckPasswd(pCLServing, pw_string)
|
||||
#endif
|
||||
if (status == 0) {
|
||||
if (fVerbose) {
|
||||
Info("User %s logging into server %s",
|
||||
pCLServing->acid.string,
|
||||
pCLServing->pCEwant->server.
|
||||
string);
|
||||
Info("User %s authenticated into server %s", pCLServing->acid.string, pCLServing->pCEwant->server.string);
|
||||
}
|
||||
fclose(fp);
|
||||
(void)endpwent();
|
||||
return 1;
|
||||
return AUTH_SUCCESS;
|
||||
}
|
||||
if (domainHack) {
|
||||
p = strchr(p, '.');
|
||||
@ -844,10 +962,9 @@ CheckPasswd(pCLServing, pw_string)
|
||||
break;
|
||||
}
|
||||
fclose(fp);
|
||||
(void)endpwent();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return AUTH_INVALID;
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -902,7 +1019,7 @@ sendRealBreak(pCLServing, pCEServing)
|
||||
{
|
||||
Debug(1, "Sending a break to %s", pCEServing->server.string);
|
||||
if (pCEServing->isNetworkConsole) {
|
||||
char haltseq[2];
|
||||
unsigned char haltseq[2];
|
||||
|
||||
haltseq[0] = IAC;
|
||||
haltseq[1] = BREAK;
|
||||
@ -926,7 +1043,8 @@ sendRealBreak(pCLServing, pCEServing)
|
||||
return;
|
||||
}
|
||||
fileWrite(pCLServing->fd, "- ", -1);
|
||||
sleep(1);
|
||||
usleep(999999);
|
||||
resetMark();
|
||||
if (-1 == ioctl(pCEServing->fdtty, TIOCCBRK, (char *)0)) {
|
||||
fileWrite(pCLServing->fd, "failed]\r\n", -1);
|
||||
return;
|
||||
@ -1241,7 +1359,8 @@ Kiddie(pGE, sfd)
|
||||
time_t lastup = time(NULL); /* last time we tried to up all downed */
|
||||
int fd;
|
||||
char cType;
|
||||
int maxfd, so;
|
||||
int maxfd;
|
||||
socklen_t so;
|
||||
fd_set rmask;
|
||||
unsigned char acOut[BUFSIZ], acIn[BUFSIZ], acInOrig[BUFSIZ];
|
||||
#if HAVE_TERMIOS_H
|
||||
@ -1298,8 +1417,8 @@ Kiddie(pGE, sfd)
|
||||
simpleSignal(SIGCHLD, FlagReapVirt);
|
||||
simpleSignal(SIGINT, FlagGoAwayAlso);
|
||||
|
||||
sprintf(acOut, "ctl_%d", pGE->port);
|
||||
buildMyString(acOut, &pGE->pCEctl->server);
|
||||
sprintf((char *)acOut, "ctl_%d", pGE->port);
|
||||
buildMyString((char *)acOut, &pGE->pCEctl->server);
|
||||
pGE->pCEctl->iend = 0;
|
||||
buildMyString((char *)0, &pGE->pCEctl->lfile);
|
||||
buildMyString("/dev/null", &pGE->pCEctl->lfile);
|
||||
@ -1348,8 +1467,7 @@ Kiddie(pGE, sfd)
|
||||
simpleSignal(SIGUSR1, FlagReUp);
|
||||
|
||||
/* on a SIGALRM we should mark log files */
|
||||
simpleSignal(SIGALRM, FlagMark);
|
||||
fSawMark = 1; /* start during first pass */
|
||||
resetMark();
|
||||
|
||||
/* the MAIN loop a group server
|
||||
*/
|
||||
@ -1377,7 +1495,7 @@ Kiddie(pGE, sfd)
|
||||
fSawReUp = 0;
|
||||
ReUp(pGE, 0);
|
||||
|
||||
if (fReopenall > 0) {
|
||||
if (fReopenall) {
|
||||
lastup = time(NULL);
|
||||
}
|
||||
}
|
||||
@ -1388,8 +1506,7 @@ Kiddie(pGE, sfd)
|
||||
}
|
||||
|
||||
/* Is it time to reup everything? */
|
||||
if ((fReopenall > 0) &&
|
||||
((time(NULL) - lastup) > (fReopenall * 60))) {
|
||||
if (fReopenall && ((time(NULL) - lastup) > (fReopenall * 60))) {
|
||||
/* Note the new lastup time only after we finish.
|
||||
*/
|
||||
ReUp(pGE, 2);
|
||||
@ -1427,19 +1544,26 @@ Kiddie(pGE, sfd)
|
||||
/* If someone was writing, they fall back to read-only */
|
||||
if (pCEServing->pCLwr != (CONSCLIENT *) 0) {
|
||||
pCEServing->pCLwr->fwr = 0;
|
||||
pCEServing->pCLwr->fwantwr = 1;
|
||||
tagLogfile(pCEServing, "%s detached",
|
||||
pCEServing->pCLwr->acid.string);
|
||||
pCEServing->pCLwr = (CONSCLIENT *) 0;
|
||||
}
|
||||
|
||||
/* Try an initial reconnect */
|
||||
Info("%s: automatic reinitialization [%s]",
|
||||
pCEServing->server.string, strtime(NULL));
|
||||
ConsInit(pCEServing, &pGE->rinit, 0);
|
||||
if (fNoautoreup) {
|
||||
ConsDown(pCEServing, &pGE->rinit);
|
||||
} else {
|
||||
/* Try an initial reconnect */
|
||||
Info("%s: automatic reinitialization [%s]",
|
||||
pCEServing->server.string, strtime(NULL));
|
||||
ConsInit(pCEServing, &pGE->rinit, 0);
|
||||
|
||||
/* If we didn't succeed, try again later */
|
||||
if (!pCEServing->fup)
|
||||
pCEServing->autoReUp = 1;
|
||||
/* If we didn't succeed, try again later */
|
||||
if (!pCEServing->fup)
|
||||
pCEServing->autoReUp = 1;
|
||||
else
|
||||
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -1506,7 +1630,7 @@ Kiddie(pGE, sfd)
|
||||
/* log it and write to all connections on this server
|
||||
*/
|
||||
if (!pCEServing->nolog) {
|
||||
(void)writeLog(pCEServing, acIn, nr);
|
||||
(void)writeLog(pCEServing, (char *)acIn, nr);
|
||||
}
|
||||
|
||||
/* output all console info nobody is attached
|
||||
@ -1537,7 +1661,7 @@ Kiddie(pGE, sfd)
|
||||
for (pCL = pCEServing->pCLon; (CONSCLIENT *) 0 != pCL;
|
||||
pCL = pCL->pCLnext) {
|
||||
if (pCL->fcon) {
|
||||
(void)fileWrite(pCL->fd, acIn, nr);
|
||||
(void)fileWrite(pCL->fd, (char *)acIn, nr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1636,7 +1760,8 @@ Kiddie(pGE, sfd)
|
||||
buildMyStringChar(acIn[i],
|
||||
&pCLServing->msg);
|
||||
if (pGE->pCEctl != pCEServing)
|
||||
fileWrite(pCLServing->fd, &acIn[i], 1);
|
||||
fileWrite(pCLServing->fd,
|
||||
(char *)&acIn[i], 1);
|
||||
} else if ((acIn[i] == '\b' || acIn[i] == 0x7f)
|
||||
&& pCLServing->msg.used > 1) {
|
||||
if (pCLServing->msg.
|
||||
@ -1767,7 +1892,8 @@ Kiddie(pGE, sfd)
|
||||
buildMyString((char *)0, &pCLServing->accmd);
|
||||
|
||||
if (('t' == pCLServing->caccess) ||
|
||||
(0 != CheckPasswd(pCLServing, ""))) {
|
||||
(CheckPasswd(pCLServing, "") ==
|
||||
AUTH_SUCCESS)) {
|
||||
goto shift_console;
|
||||
}
|
||||
fileWrite(pCLServing->fd, "passwd:\r\n", -1);
|
||||
@ -1791,9 +1917,9 @@ Kiddie(pGE, sfd)
|
||||
pCLServing->accmd.used--;
|
||||
}
|
||||
|
||||
if (0 ==
|
||||
CheckPasswd(pCLServing,
|
||||
pCLServing->accmd.string)) {
|
||||
if (CheckPasswd
|
||||
(pCLServing,
|
||||
pCLServing->accmd.string) != AUTH_SUCCESS) {
|
||||
fileWrite(pCLServing->fd, "Sorry.\r\n", -1);
|
||||
Info("%s: %s: bad passwd",
|
||||
pCLServing->pCEwant->server.string,
|
||||
@ -1878,10 +2004,11 @@ Kiddie(pGE, sfd)
|
||||
if (acIn[i] >= '0' && acIn[i] <= '7') {
|
||||
buildMyStringChar(acIn[i], &pCLServing->accmd);
|
||||
if (pCLServing->accmd.used < 4) {
|
||||
fileWrite(pCLServing->fd, &acIn[i], 1);
|
||||
fileWrite(pCLServing->fd, (char *)&acIn[i],
|
||||
1);
|
||||
continue;
|
||||
}
|
||||
fileWrite(pCLServing->fd, &acIn[i], 1);
|
||||
fileWrite(pCLServing->fd, (char *)&acIn[i], 1);
|
||||
fileWrite(pCLServing->fd, "]", 1);
|
||||
|
||||
pCLServing->accmd.string[0] =
|
||||
@ -2287,7 +2414,7 @@ Kiddie(pGE, sfd)
|
||||
pCL = pCL->pCLscan) {
|
||||
if (pGE->pCEctl == pCL->pCEto)
|
||||
continue;
|
||||
sprintf(acOut,
|
||||
sprintf((char *)acOut,
|
||||
" %-32.32s %c %-7.7s %6s ",
|
||||
pCL->acid.string,
|
||||
pCL == pCLServing ? '*' : ' ',
|
||||
@ -2296,7 +2423,8 @@ Kiddie(pGE, sfd)
|
||||
"spy") :
|
||||
"stopped",
|
||||
IdleTyme(tyme - pCL->typetym));
|
||||
fileWrite(pCLServing->fd, acOut, -1);
|
||||
fileWrite(pCLServing->fd,
|
||||
(char *)acOut, -1);
|
||||
filePrint(pCLServing->fd, "%s\r\n",
|
||||
pCL->pCEto->server.string);
|
||||
}
|
||||
@ -2363,14 +2491,20 @@ Kiddie(pGE, sfd)
|
||||
filePrint(pCLServing->fd, ",");
|
||||
if (pCL->fcon)
|
||||
filePrint(pCLServing->fd,
|
||||
"r@%s@%ld",
|
||||
"r@%s@%ld@%s",
|
||||
pCL->acid.string,
|
||||
tyme - pCL->typetym);
|
||||
tyme - pCL->typetym,
|
||||
pCL->
|
||||
fwantwr ? "rw" :
|
||||
"ro");
|
||||
else
|
||||
filePrint(pCLServing->fd,
|
||||
"s@%s@%ld",
|
||||
"s@%s@%ld@%s",
|
||||
pCL->acid.string,
|
||||
tyme - pCL->typetym);
|
||||
tyme - pCL->typetym,
|
||||
pCL->
|
||||
fwantwr ? "rw" :
|
||||
"ro");
|
||||
comma = 1;
|
||||
}
|
||||
|
||||
@ -2521,7 +2655,7 @@ Kiddie(pGE, sfd)
|
||||
for (pCE = pGE->pCElist;
|
||||
pCE != (CONSENT *) 0;
|
||||
pCE = pCE->pCEnext) {
|
||||
sprintf(acOut,
|
||||
sprintf((char *)acOut,
|
||||
" %-24.24s %c %-4.4s %-.40s\r\n",
|
||||
pCE->server.string,
|
||||
pCE == pCEServing ? '*' : ' ',
|
||||
@ -2529,8 +2663,8 @@ Kiddie(pGE, sfd)
|
||||
pCE->pCLwr ? pCE->pCLwr->acid.
|
||||
string : pCE->
|
||||
pCLon ? "<spies>" : "<none>");
|
||||
(void)fileWrite(pCLServing->fd, acOut,
|
||||
-1);
|
||||
(void)fileWrite(pCLServing->fd,
|
||||
(char *)acOut, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2548,7 +2682,7 @@ Kiddie(pGE, sfd)
|
||||
for (pCL = pCEServing->pCLon;
|
||||
(CONSCLIENT *) 0 != pCL;
|
||||
pCL = pCL->pCLnext) {
|
||||
sprintf(acOut,
|
||||
sprintf((char *)acOut,
|
||||
" %-32.32s %c %-7.7s %6s %s\r\n",
|
||||
pCL->acid.string,
|
||||
pCL == pCLServing ? '*' : ' ',
|
||||
@ -2558,8 +2692,8 @@ Kiddie(pGE, sfd)
|
||||
"stopped",
|
||||
IdleTyme(tyme - pCL->typetym),
|
||||
pCL->actym);
|
||||
(void)fileWrite(pCLServing->fd, acOut,
|
||||
-1);
|
||||
(void)fileWrite(pCLServing->fd,
|
||||
(char *)acOut, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2570,15 +2704,15 @@ Kiddie(pGE, sfd)
|
||||
for (pCE = pGE->pCElist;
|
||||
pCE != (CONSENT *) 0;
|
||||
pCE = pCE->pCEnext) {
|
||||
sprintf(acOut,
|
||||
sprintf((char *)acOut,
|
||||
" %-24.24s on %-32.32s at %5.5s%c\r\n",
|
||||
pCE->server.string,
|
||||
pCE->fvirtual ? pCE->acslave.
|
||||
string : pCE->dfile.string,
|
||||
pCE->pbaud->acrate,
|
||||
pCE->pparity->ckey);
|
||||
(void)fileWrite(pCLServing->fd, acOut,
|
||||
-1);
|
||||
(void)fileWrite(pCLServing->fd,
|
||||
(char *)acOut, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2730,7 +2864,7 @@ Kiddie(pGE, sfd)
|
||||
}
|
||||
|
||||
pGE->pCLfree->fd = fileOpenFD(fd, simpleSocket);
|
||||
if (pGE->pCLfree->fd < 0) {
|
||||
if ((CONSFILE *) 0 == pGE->pCLfree->fd) {
|
||||
Error("fileOpenFD: %s", strerror(errno));
|
||||
close(fd);
|
||||
continue;
|
||||
@ -2744,8 +2878,10 @@ Kiddie(pGE, sfd)
|
||||
fileWrite(pGE->pCLfree->fd,
|
||||
"access from your host refused\r\n", -1);
|
||||
fileClose(&pGE->pCLfree->fd);
|
||||
resetMark();
|
||||
continue;
|
||||
}
|
||||
resetMark();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2856,7 +2992,7 @@ Spawn(pGE)
|
||||
#endif
|
||||
{
|
||||
int pid, sfd;
|
||||
int so;
|
||||
socklen_t so;
|
||||
struct sockaddr_in lstn_port;
|
||||
int true = 1;
|
||||
int portInc = 0;
|
||||
@ -2940,7 +3076,7 @@ Spawn(pGE)
|
||||
exit(EX_UNAVAILABLE);
|
||||
}
|
||||
ssocket = fileOpenFD(sfd, simpleSocket);
|
||||
if (ssocket < 0) {
|
||||
if ((CONSFILE *) 0 == ssocket) {
|
||||
Error("fileOpenFD: %s", strerror(errno));
|
||||
close(sfd);
|
||||
exit(EX_UNAVAILABLE);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: group.h,v 5.23 2002-02-25 14:00:38-08 bryan Exp $
|
||||
* $Id: group.h,v 5.25 2002-09-20 23:04:45-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -34,6 +34,12 @@
|
||||
* 4. This notice may not be removed or altered.
|
||||
*/
|
||||
|
||||
/* return values used by CheckPass()
|
||||
*/
|
||||
#define AUTH_SUCCESS 0 /* ok */
|
||||
#define AUTH_NOUSER 1 /* no user */
|
||||
#define AUTH_INVALID 2 /* invalid password */
|
||||
|
||||
typedef struct grpent { /* group info */
|
||||
unsigned int id; /* uniqueue group id */
|
||||
unsigned short port; /* port group listens on */
|
||||
@ -49,13 +55,14 @@ typedef struct grpent { /* group info */
|
||||
|
||||
#if USE_ANSI_PROTO
|
||||
extern void Spawn(GRPENT *);
|
||||
extern int CheckPass(struct passwd *, char *);
|
||||
extern int CheckPass(char *, char *);
|
||||
extern const char *strtime(time_t *);
|
||||
extern void tagLogfile(const CONSENT *, const char *, ...);
|
||||
extern void cleanupBreak(short int);
|
||||
extern void destroyGroup(GRPENT *);
|
||||
extern void destroyConsent(GRPENT *, CONSENT *);
|
||||
extern void SendClientsMsg(CONSENT *, char *);
|
||||
extern void resetMark(void);
|
||||
#else
|
||||
extern void Spawn();
|
||||
extern int CheckPass();
|
||||
@ -65,4 +72,5 @@ extern void cleanupBreak();
|
||||
extern void destroyGroup();
|
||||
extern void destroyConsent();
|
||||
extern void SendClientsMsg();
|
||||
extern void resetMark();
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: main.c,v 5.94 2002-06-05 15:05:00-07 bryan Exp $
|
||||
* $Id: main.c,v 5.95 2002-09-22 09:31:54-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
int fAll = 0, fVerbose = 0, fSoftcar = 0, fNoinit = 0, fVersion =
|
||||
0, fStrip = 0, fDaemon = 0, fUseLogfile = 0, fReopen = 0, fReopenall =
|
||||
0;
|
||||
0, fNoautoreup = 0;
|
||||
|
||||
char chDefAcc = 'r';
|
||||
|
||||
@ -167,7 +167,7 @@ daemonize()
|
||||
|
||||
|
||||
static char u_terse[] =
|
||||
" [-7dDhinouvV] [-a type] [-m max] [-M addr] [-p port] [-b port] [-C config] [-P passwd] [-L logfile] [-O min]";
|
||||
" [-7dDFhinouvV] [-a type] [-m max] [-M addr] [-p port] [-b port] [-C config] [-P passwd] [-L logfile] [-O min]";
|
||||
static char *apcLong[] = {
|
||||
"7 strip the high bit of all console data",
|
||||
"a type set the default access type",
|
||||
@ -175,6 +175,7 @@ static char *apcLong[] = {
|
||||
"C config give a new config file to the server process",
|
||||
"d become a daemon, redirecting stdout/stderr to logfile",
|
||||
"D enable debug output, sent to stderr",
|
||||
"F do not automatically reinitialize failed consoles",
|
||||
"h output this message",
|
||||
"i initialize console connections on demand",
|
||||
"L logfile give a new logfile path to the server process",
|
||||
@ -368,7 +369,7 @@ main(argc, argv)
|
||||
int i;
|
||||
FILE *fpConfig;
|
||||
struct hostent *hpMe;
|
||||
static char acOpts[] = "7a:b:C:dDhiL:m:M:noO:p:P:suVv";
|
||||
static char acOpts[] = "7a:b:C:dDFhiL:m:M:noO:p:P:suVv";
|
||||
extern int optopt;
|
||||
extern char *optarg;
|
||||
struct passwd *pwd;
|
||||
@ -448,6 +449,9 @@ main(argc, argv)
|
||||
case 'D':
|
||||
fDebug++;
|
||||
break;
|
||||
case 'F':
|
||||
fNoautoreup = 1;
|
||||
break;
|
||||
case 'h':
|
||||
fprintf(stderr, "%s: usage%s\n", progname, u_terse);
|
||||
Usage(apcLong);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: main.h,v 5.33 2002-02-26 16:12:49-08 bryan Exp $
|
||||
* $Id: main.h,v 5.34 2002-09-22 09:31:43-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
extern char rcsid[];
|
||||
extern int fAll, fVerbose, fSoftcar, fNoinit, fInteractive, fStrip,
|
||||
fDaemon, fReopen, fReopenall;
|
||||
fDaemon, fReopen, fReopenall, fNoautoreup;
|
||||
extern char chDefAcc;
|
||||
extern in_addr_t bindAddr;
|
||||
extern unsigned int bindPort, bindBasePort;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: master.c,v 5.76 2002-06-05 15:05:00-07 bryan Exp $
|
||||
* $Id: master.c,v 5.79 2002-09-23 11:39:21-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -39,7 +39,6 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#if defined(USE_LIBWRAP)
|
||||
#include <syslog.h>
|
||||
@ -251,7 +250,7 @@ Master()
|
||||
unsigned short prnum = 0;
|
||||
struct hostent *hpPeer;
|
||||
char cType;
|
||||
int so;
|
||||
socklen_t so;
|
||||
fd_set rmask, rmaster;
|
||||
unsigned char acIn[1024]; /* a command to the master is limited to this */
|
||||
struct sockaddr_in master_port, response_port;
|
||||
@ -463,12 +462,12 @@ Master()
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if ((char *)0 != (pcArgs = strchr(acIn, ':'))) {
|
||||
if ((char *)0 != (pcArgs = strchr((char *)acIn, ':'))) {
|
||||
*pcArgs++ = '\000';
|
||||
} else if ((char *)0 != (pcArgs = strchr(acIn, ' '))) {
|
||||
} else if ((char *)0 != (pcArgs = strchr((char *)acIn, ' '))) {
|
||||
*pcArgs++ = '\000';
|
||||
}
|
||||
if (0 == strcmp(acIn, "help")) {
|
||||
if (0 == strcmp((char *)acIn, "help")) {
|
||||
static char *apcHelp[] = {
|
||||
"call provide port for given machine\r\n",
|
||||
"groups provide ports for group leaders\r\n",
|
||||
@ -486,17 +485,13 @@ Master()
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 == strcmp(acIn, "quit")) {
|
||||
struct passwd *pwd;
|
||||
|
||||
if (0 == strcmp((char *)acIn, "quit")) {
|
||||
if ('t' == cType) {
|
||||
fileWrite(csocket, "trusted -- terminated\r\n", -1);
|
||||
kill(parentpid, SIGTERM);
|
||||
} else if ((char *)0 == pcArgs) {
|
||||
fileWrite(csocket, "must be trusted to terminate\r\n", -1);
|
||||
} else if ((struct passwd *)0 == (pwd = getpwuid(0))) {
|
||||
fileWrite(csocket, "no root passwd?\r\n", -1);
|
||||
} else if (0 == CheckPass(pwd, pcArgs)) {
|
||||
} else if (CheckPass("root", pcArgs) != AUTH_SUCCESS) {
|
||||
fileWrite(csocket, "Sorry.\r\n", -1);
|
||||
} else {
|
||||
fileWrite(csocket, "ok -- terminated\r\n", -1);
|
||||
@ -505,12 +500,12 @@ Master()
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 == strcmp(acIn, "pid")) {
|
||||
if (0 == strcmp((char *)acIn, "pid")) {
|
||||
filePrint(csocket, "%d\r\n", parentpid);
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 == strcmp(acIn, "groups")) {
|
||||
if (0 == strcmp((char *)acIn, "groups")) {
|
||||
int iSep = 1;
|
||||
|
||||
for (pGE = pGroups; pGE != (GRPENT *) 0; pGE = pGE->pGEnext) {
|
||||
@ -523,7 +518,7 @@ Master()
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 == strcmp(acIn, "master")) {
|
||||
if (0 == strcmp((char *)acIn, "master")) {
|
||||
int iSep = 1;
|
||||
|
||||
if ((GRPENT *) 0 != pGroups) {
|
||||
@ -549,12 +544,12 @@ Master()
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 == strcmp(acIn, "version")) {
|
||||
if (0 == strcmp((char *)acIn, "version")) {
|
||||
filePrint(csocket, "version `%s\'\r\n", THIS_VERSION);
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
}
|
||||
if (0 != strcmp(acIn, "call")) {
|
||||
if (0 != strcmp((char *)acIn, "call")) {
|
||||
fileWrite(csocket, "unknown command\r\n", -1);
|
||||
fileClose(&csocket);
|
||||
exit(EX_OK);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: port.h,v 1.31 2002-01-21 02:48:33-08 bryan Exp $
|
||||
* $Id: port.h,v 1.33 2002-09-20 23:04:21-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -36,14 +36,6 @@
|
||||
* 4. This notice may not be removed or altered.
|
||||
*/
|
||||
|
||||
/* Wait for a part of a second before slapping console server.
|
||||
* Good for CISCO terminal servers that get upset when you
|
||||
* attack with intense socket connections
|
||||
*/
|
||||
#if !defined(USLEEP_FOR_SLOW_PORTS)
|
||||
# define USLEEP_FOR_SLOW_PORTS 100000
|
||||
#endif
|
||||
|
||||
/* If, when processing a logfile for replaying the last N lines,
|
||||
* we end up seeing more than MAXREPLAYLINELEN characters in a line,
|
||||
* abort processing and display the data. Why? There could be some
|
||||
@ -65,11 +57,6 @@
|
||||
# define DEFESC 'c'
|
||||
#endif
|
||||
|
||||
/* communication constants
|
||||
*/
|
||||
#define OB_SUSP 'Z' /* suspended by server */
|
||||
#define OB_DROP '.' /* dropped by server */
|
||||
|
||||
/* For legacy compile-time setting of the port...
|
||||
*/
|
||||
#if ! defined(DEFPORT)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: readcfg.c,v 5.84 2002-03-25 17:10:15-08 bryan Exp $
|
||||
* $Id: readcfg.c,v 5.87 2002-09-23 13:42:25-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -263,6 +263,7 @@ ReadCfg(pcFile, fp, master)
|
||||
static STRING acInSave = { (char *)0, 0, 0 };
|
||||
char *acStart;
|
||||
CONSENT *pCE = (CONSENT *) 0;
|
||||
CONSENT *pCEtmp = (CONSENT *) 0;
|
||||
CONSENT *pCEmatch = (CONSENT *) 0;
|
||||
REMOTE **ppRC;
|
||||
REMOTE *pRCtmp;
|
||||
@ -337,16 +338,20 @@ ReadCfg(pcFile, fp, master)
|
||||
}
|
||||
|
||||
iLine = 0;
|
||||
while ((acIn = readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) {
|
||||
while ((acIn =
|
||||
(unsigned char *)readLine(fp, &acInSave,
|
||||
&iLine)) != (unsigned char *)0) {
|
||||
char *pcLine, *pcMode, *pcLog, *pcRem, *pcStart, *pcMark, *pcBreak;
|
||||
char *pcColon;
|
||||
|
||||
acStart = pruneSpace(acIn);
|
||||
acStart = pruneSpace((char *)acIn);
|
||||
|
||||
if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) {
|
||||
break;
|
||||
}
|
||||
if ((char *)0 == strchr(acStart, ':') &&
|
||||
(char *)0 != (pcLine = strchr(acStart, '='))) {
|
||||
if ((char *)0 != (pcLine = strchr(acStart, '=')) &&
|
||||
((char *)0 == (pcColon = strchr(acStart, ':')) ||
|
||||
pcColon > pcLine)) {
|
||||
*pcLine++ = '\000';
|
||||
acStart = pruneSpace(acStart);
|
||||
pcLine = pruneSpace(pcLine);
|
||||
@ -388,6 +393,69 @@ ReadCfg(pcFile, fp, master)
|
||||
*pcLog++ = '\000';
|
||||
|
||||
acStart = pruneSpace(acStart);
|
||||
|
||||
/* before going any further, we might was well check for
|
||||
* duplicates. gotta do it somewhere, and we only need
|
||||
* the console name to do it. we have to look through
|
||||
* the pGroups and pGEstage lists. we don't look at the
|
||||
* pGroupsOld list 'cause that's where the "to be
|
||||
* reconfiged" consoles live.
|
||||
*
|
||||
* i hope this is right...and why i said what i did above:
|
||||
* in master during startup,
|
||||
* pGroupsOld = *empty*
|
||||
* pGroups = filling with groups of consoles
|
||||
* pGEstage = *empty*
|
||||
* in master during reread,
|
||||
* pGroupsOld = shrinking groups as they move to pGEstage
|
||||
* pGroups = filling with groups of new consoles
|
||||
* pGEstage = filling with groups from pGroupsOld
|
||||
* in slave during reread,
|
||||
* pGroupsOld = shrinking groups as they move to pGEstage
|
||||
* pGroups = *empty*
|
||||
* pGEstage = filling with groups from pGroupsOld
|
||||
*
|
||||
* now, pGroups in the slave during a reread may actually be
|
||||
* temporarily used to hold stuff that's moving to pGEstage.
|
||||
* in the master it might also have group stubs as well.
|
||||
* but by the end, if it has anything, it's all empty groups
|
||||
* in the slave and a mix of real (new) and empty in the master.
|
||||
*/
|
||||
for (pGEtmp = pGroups; pGEtmp != (GRPENT *) 0;
|
||||
pGEtmp = pGEtmp->pGEnext) {
|
||||
for (pCEtmp = pGEtmp->pCElist; pCEtmp != (CONSENT *) 0;
|
||||
pCEtmp = pCEtmp->pCEnext) {
|
||||
if (pCEtmp->server.used &&
|
||||
strcmp(acStart, pCEtmp->server.string) == 0) {
|
||||
if (isMaster)
|
||||
Error("%s(%d) duplicate console name `%s'", pcFile,
|
||||
iLine, acStart);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pCEtmp != (CONSENT *) 0)
|
||||
break;
|
||||
}
|
||||
if (pCEtmp != (CONSENT *) 0)
|
||||
continue;
|
||||
for (pGEtmp = pGEstage; pGEtmp != (GRPENT *) 0;
|
||||
pGEtmp = pGEtmp->pGEnext) {
|
||||
for (pCEtmp = pGEtmp->pCElist; pCEtmp != (CONSENT *) 0;
|
||||
pCEtmp = pCEtmp->pCEnext) {
|
||||
if (pCEtmp->server.used &&
|
||||
strcmp(acStart, pCEtmp->server.string) == 0) {
|
||||
if (isMaster)
|
||||
Error("%s(%d) duplicate console name `%s'", pcFile,
|
||||
iLine, acStart);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pCEtmp != (CONSENT *) 0)
|
||||
break;
|
||||
}
|
||||
if (pCEtmp != (CONSENT *) 0)
|
||||
continue;
|
||||
|
||||
pcLine = pruneSpace(pcLine);
|
||||
pcMode = pruneSpace(pcMode);
|
||||
pcLog = pruneSpace(pcLog);
|
||||
@ -749,7 +817,7 @@ ReadCfg(pcFile, fp, master)
|
||||
if (pCEmatch->isNetworkConsole != pCE->isNetworkConsole ||
|
||||
pCEmatch->fvirtual != pCE->fvirtual)
|
||||
closeMatch = 0;
|
||||
if (pCEmatch->dfile.used && pCEmatch->dfile.used) {
|
||||
if (pCEmatch->dfile.used && pCE->dfile.used) {
|
||||
if (strcmp(pCEmatch->dfile.string, pCE->dfile.string) != 0) {
|
||||
buildMyString((char *)0, &pCEmatch->dfile);
|
||||
buildMyString(pCE->dfile.string, &pCEmatch->dfile);
|
||||
@ -762,7 +830,7 @@ ReadCfg(pcFile, fp, master)
|
||||
if (!pCE->fvirtual)
|
||||
closeMatch = 0;
|
||||
}
|
||||
if (pCEmatch->lfile.used && pCEmatch->lfile.used) {
|
||||
if (pCEmatch->lfile.used && pCE->lfile.used) {
|
||||
if (strcmp(pCEmatch->lfile.string, pCE->lfile.string) != 0) {
|
||||
buildMyString((char *)0, &pCEmatch->lfile);
|
||||
buildMyString(pCE->lfile.string, &pCEmatch->lfile);
|
||||
@ -793,7 +861,7 @@ ReadCfg(pcFile, fp, master)
|
||||
}
|
||||
if (pCE->isNetworkConsole) {
|
||||
if (pCEmatch->networkConsoleHost.used &&
|
||||
pCEmatch->networkConsoleHost.used) {
|
||||
pCE->networkConsoleHost.used) {
|
||||
if (strcmp
|
||||
(pCEmatch->networkConsoleHost.string,
|
||||
pCE->networkConsoleHost.string) != 0) {
|
||||
@ -822,7 +890,7 @@ ReadCfg(pcFile, fp, master)
|
||||
}
|
||||
}
|
||||
if (pCE->fvirtual) {
|
||||
if (pCEmatch->pccmd.used && pCEmatch->pccmd.used) {
|
||||
if (pCEmatch->pccmd.used && pCE->pccmd.used) {
|
||||
if (strcmp(pCEmatch->pccmd.string, pCE->pccmd.string)
|
||||
!= 0) {
|
||||
buildMyString((char *)0, &pCEmatch->pccmd);
|
||||
@ -896,12 +964,14 @@ ReadCfg(pcFile, fp, master)
|
||||
pACList = (ACCESS *) 0;
|
||||
ppAC = &pACList;
|
||||
|
||||
while ((acIn = readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) {
|
||||
while ((acIn =
|
||||
(unsigned char *)readLine(fp, &acInSave,
|
||||
&iLine)) != (unsigned char *)0) {
|
||||
char *pcMach, *pcNext, *pcMem;
|
||||
char cType;
|
||||
int iLen;
|
||||
|
||||
acStart = pruneSpace(acIn);
|
||||
acStart = pruneSpace((char *)acIn);
|
||||
|
||||
if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) {
|
||||
break;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: util.h,v 1.22 2002-02-25 14:00:38-08 bryan Exp $
|
||||
* $Id: util.h,v 1.24 2002-09-22 14:13:47-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -12,15 +12,20 @@
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
|
||||
/* communication constants
|
||||
*/
|
||||
#define OB_SUSP 'Z' /* suspended by server */
|
||||
#define OB_DROP '.' /* dropped by server */
|
||||
|
||||
/* Struct to wrap information about a "file"...
|
||||
* This can be a socket, local file, whatever. We do this so
|
||||
* we can add encryption to sockets (and generalize I/O).
|
||||
*/
|
||||
enum consFileType {
|
||||
simpleFile,
|
||||
simpleSocket,
|
||||
simpleSocket
|
||||
#ifdef TLS_SUPPORT
|
||||
TLSSocket,
|
||||
,TLSSocket
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: version.h,v 1.36 2002-06-05 11:16:02-07 bryan Exp $
|
||||
* $Id: version.h,v 1.37 2002-09-23 13:56:45-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -14,4 +14,4 @@
|
||||
@(#) Copyright 2000 conserver.com.\n\
|
||||
All rights reserved.\n"
|
||||
|
||||
#define THIS_VERSION "conserver.com version 7.2.2"
|
||||
#define THIS_VERSION "conserver.com version 7.2.3"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: console.c,v 5.84 2002-03-11 18:10:27-08 bryan Exp $
|
||||
* $Id: console.c,v 5.85 2002-09-23 11:40:51-07 bryan Exp $
|
||||
*
|
||||
* Copyright conserver.com, 2000
|
||||
*
|
||||
@ -878,7 +878,7 @@ CallUp(s, pcMaster, pcMach, pcHow, pcUser)
|
||||
SendOut(s, acMesg, strlen(acMesg));
|
||||
(void)ReadReply(s, acMesg, sizeof(acMesg), (char *)0);
|
||||
if (0 == strcmp(acMesg, "passwd:")) {
|
||||
static STRING pass = {(char *)0,0,0};
|
||||
static STRING pass = { (char *)0, 0, 0 };
|
||||
buildMyString((char *)0, &pass);
|
||||
(void)sprintf(acMesg, "Enter %s@%s's password:", pcUser,
|
||||
pcMaster);
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: console.man,v 1.20 2002-03-11 18:06:31-08 bryan Exp $
|
||||
.\" $Id: console.man,v 1.21 2002-09-22 10:20:43-07 bryan Exp $
|
||||
.TH CONSOLE 1 "Local"
|
||||
.SH NAME
|
||||
console \- console server client program
|
||||
@ -194,8 +194,9 @@ and file descriptor for the socket connection.
|
||||
.B users-list
|
||||
The details of each user connected to the console. The details for each
|
||||
user are an `@' seperated list of `w', `r', or `s' (for read-write, read-only,
|
||||
or suspended), username, hostname the user is on, and the user's idle time.
|
||||
Each user bundle is seperated by commas.
|
||||
or suspended), username, hostname the user is on, the user's idle time,
|
||||
and (for `r' and `s' users only) ``rw'' or ``ro'' (if the user wants
|
||||
read-write mode or not). Each user bundle is seperated by commas.
|
||||
.TP
|
||||
.B state
|
||||
The state of the console. Values with either be ``up'' or ``down''.
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
%define pkg conserver
|
||||
%define ver 7.2.2
|
||||
%define ver 7.2.3
|
||||
|
||||
# define the name of the machine on which the main conserver
|
||||
# daemon will be running if you don't want to use the default
|
||||
|
@ -1,7 +1,7 @@
|
||||
PKG="conserver"
|
||||
NAME="Console server and client"
|
||||
CATEGORY="system"
|
||||
VERSION="7.2.2"
|
||||
VERSION="7.2.3"
|
||||
DESC="Console server and client"
|
||||
CLASSES=none
|
||||
ARCH=sparc
|
||||
|
Loading…
x
Reference in New Issue
Block a user