mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-15 14:46:38 +00:00
Imported from conserver-GNAC-6.08.tar.gz
This commit is contained in:
parent
f4523341de
commit
913545efcd
11
CHANGES
11
CHANGES
@ -1,28 +1,29 @@
|
||||
CHANGES
|
||||
=======
|
||||
|
||||
version 6.07:
|
||||
version 6.08:
|
||||
- Added support for Linux 2.X and IRIX 6.X
|
||||
- Fixed "suspend" code in client - it shouldn't have worked
|
||||
before, but slow connections could explain it.
|
||||
|
||||
version 6.07:
|
||||
- Porting infrastructure has been set up in ./port. Solaris
|
||||
2.5.1 and BSD/OS 3.1 successfully built.
|
||||
- Added CHANGES and README files. Wow, starting to document!
|
||||
|
||||
version 6.06:
|
||||
|
||||
- SIGUSR1 now tells the console server to try and reopen all
|
||||
currently downed consoles.
|
||||
- Cleaned up configuration file (cons.h) and Makefiles.
|
||||
|
||||
version 6.05:
|
||||
|
||||
- conserver.cf change: groups and their passwords have been
|
||||
removed and timestamp specifications have been added.
|
||||
|
||||
before version 6.05:
|
||||
|
||||
- Many, many variations. Nothing was tracked well. Bug fixes
|
||||
and enhancements of various types were applied.
|
||||
|
||||
#
|
||||
# $Id: CHANGES,v 1.3 1999-01-14 14:05:16-08 bryan Exp $
|
||||
# $Id: CHANGES,v 1.4 1999-01-15 15:36:21-08 bryan Exp $
|
||||
#
|
||||
|
4
Makefile
4
Makefile
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.3 1999-01-14 13:30:09-08 bryan Exp $
|
||||
# $Id: Makefile,v 1.4 1999-01-15 15:36:06-08 bryan Exp $
|
||||
#
|
||||
# Master Makefile
|
||||
#
|
||||
@ -29,3 +29,5 @@ config:
|
||||
fi
|
||||
|
||||
FRC:
|
||||
|
||||
SHELL=/bin/sh
|
||||
|
@ -15,10 +15,11 @@
|
||||
# name : tty[@host] : baud[parity] : device : group
|
||||
DOMAINHACK=
|
||||
LOGDIR=/tmp
|
||||
ts6-10:!ts6:10010:&:
|
||||
ts6-11:!ts6:10011:&:
|
||||
ts6-12:!ts6:10012:&:
|
||||
ts6-13:!ts6:10013:&:
|
||||
shell:|:9600p:&:
|
||||
#ts6-10:!ts6:10010:&:
|
||||
#ts6-11:!ts6:10011:&:
|
||||
#ts6-12:!ts6:10012:&:
|
||||
#ts6-13:!ts6:10013:&:
|
||||
%%
|
||||
# list of clients we allow
|
||||
# type machines
|
||||
|
@ -1 +1 @@
|
||||
cons-gnac.h
|
||||
cons-test.h
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: port.h,v 1.3 1999-01-14 13:06:13-08 bryan Exp $
|
||||
* $Id: port.h,v 1.5 1999-01-15 15:35:29-08 bryan Exp $
|
||||
*
|
||||
* GNAC, Inc., 1998
|
||||
*
|
||||
@ -40,7 +40,7 @@
|
||||
*
|
||||
* all PTX, PTX2, and PTX4 code added by gregf@sequent.com (gregf)
|
||||
*/
|
||||
#if !( defined(IBMR2) || defined(HPUX7) || defined(SUN4) || defined(SUN5) || defined(PTX2) || defined(PTX4) || defined(BSDOS3) )
|
||||
#if !( defined(SUN5) || defined(BSDOS3) || defined(LINUX2) || defined(IRIX6) )
|
||||
#error "Platform needs to be defined. See port.h"
|
||||
#endif
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(HAVE_UWAIT)
|
||||
#define HAVE_UWAIT !(defined(IBMR2)||defined(SUN5)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5)||defined(BSDOS3))
|
||||
#define HAVE_UWAIT !(defined(IBMR2)||defined(SUN5)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5)||defined(BSDOS3)||defined(IRIX6))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_WAIT3)
|
||||
@ -130,7 +130,7 @@
|
||||
/* if the encrypted passwd is in a shadow file, define HAVE_SHADOW (gregf)
|
||||
*/
|
||||
#if !defined(HAVE_SHADOW)
|
||||
#define HAVE_SHADOW (defined(PTX)||defined(SUN5))
|
||||
#define HAVE_SHADOW (defined(PTX)||defined(SUN5)||defined(IRIX6))
|
||||
#endif
|
||||
|
||||
/* we'd like to line buffer our output, if we know how
|
||||
@ -189,20 +189,20 @@
|
||||
#endif /* virtual (process on a pseudo-tty) console support */
|
||||
|
||||
#if !defined(HAVE_SETSID)
|
||||
#define HAVE_SETSID (defined(IBMR2)||defined(SUN5)||defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5))
|
||||
#define HAVE_SETSID (defined(IBMR2)||defined(SUN5)||defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3))
|
||||
#endif
|
||||
|
||||
/* should we use flock to keep multiple conservers from hurting each other?
|
||||
* PTX has lockf... should probably port code to work with this (gregf)
|
||||
*/
|
||||
#if !defined(USE_FLOCK)
|
||||
#define USE_FLOCK (!(defined(IBMR2)||defined(SUN5)||defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(PTX)))
|
||||
#define USE_FLOCK (!(defined(IBMR2)||defined(SUN5)||defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3)))
|
||||
#endif
|
||||
|
||||
/* should we try to pop streams modules off?
|
||||
*/
|
||||
#if !defined(USE_STREAMS)
|
||||
#define USE_STREAMS (defined(SUN4)||defined(SUN5)||defined(PTX)||defined(IRIX5))
|
||||
#define USE_STREAMS (defined(SUN4)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(IRIX6))
|
||||
#endif
|
||||
|
||||
/* if we do not have old style tty emulation use termios.h
|
||||
@ -211,16 +211,16 @@
|
||||
#define USE_TERMIO (defined(ETA10)||defined(V386))
|
||||
#endif
|
||||
#if !defined(USE_TERMIOS)
|
||||
#define USE_TERMIOS (defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(SUN5)||defined(PTX)||defined(IRIX5))
|
||||
#define USE_TERMIOS (defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX2)||defined(IRIX6))
|
||||
#endif
|
||||
#if !defined(USE_TCBREAK)
|
||||
#define USE_TCBREAK (defined(SUN4)||defined(PTX))
|
||||
#define USE_TCBREAK (defined(SUN4)||defined(PTX)||defined(BSDOS3))
|
||||
#endif
|
||||
|
||||
/* if we have <strings.h> define this to 1, else define to 0
|
||||
*/
|
||||
#if !defined(USE_STRINGS)
|
||||
#define USE_STRINGS (defined(SUN4)||defined(DYNIX)||defined(EPIX)||defined(IRIX5))
|
||||
#define USE_STRINGS (defined(SUN4)||defined(DYNIX)||defined(EPIX)||defined(IRIX5)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3))
|
||||
#endif
|
||||
|
||||
#if !defined(NEED_UNISTD_H)
|
||||
@ -253,6 +253,9 @@ typedef long fd_set;
|
||||
#endif
|
||||
|
||||
#if USE_TERMIOS
|
||||
#if defined(LINUX2)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#if defined(HPUX7)||defined(HPUX8)||defined(HPUX9)
|
||||
#define TCGETS _IOR('T', 16, struct termios)
|
||||
#define TCSETS _IOW('T', 17, struct termios)
|
||||
@ -276,7 +279,7 @@ typedef long fd_set;
|
||||
|
||||
/* which type signal handlers return on this machine
|
||||
*/
|
||||
#if defined(sun) || defined(NEXT2) || defined(SUN5) || defined(PTX) || defined(IRIX5) || defined(BSDOS3)
|
||||
#if defined(sun) || defined(NEXT2) || defined(SUN5) || defined(PTX) || defined(IRIX5) || defined(BSDOS3) || defined(LINUX2) || defined(IRIX6)
|
||||
#define SIGRETS void
|
||||
#else
|
||||
#define SIGRETS int
|
||||
@ -285,13 +288,13 @@ typedef long fd_set;
|
||||
/* do we have a (working) setsockopt call
|
||||
*/
|
||||
#if !defined(HAVE_SETSOCKOPT)
|
||||
#define HAVE_SETSOCKOPT (defined(sun)||defined(PTX))
|
||||
#define HAVE_SETSOCKOPT (defined(sun)||defined(PTX)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3))
|
||||
#endif
|
||||
|
||||
/* does this system have the ANSI strerror() function?
|
||||
*/
|
||||
#if !defined(HAVE_STRERROR)
|
||||
#define HAVE_STRERROR (defined(IBMR2)||defined(ETA10)||defined(V386)||defined(SUN5)||defined(NEXT2)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5))
|
||||
#define HAVE_STRERROR (defined(IBMR2)||defined(ETA10)||defined(V386)||defined(SUN5)||defined(NEXT2)||defined(HPUX8)||defined(HPUX9)||defined(PTX)||defined(IRIX5)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3))
|
||||
#endif
|
||||
#if ! HAVE_STRERROR
|
||||
extern int errno;
|
||||
@ -300,7 +303,7 @@ extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_H_ERRLIST)
|
||||
#define HAVE_H_ERRLIST (defined(SUN4)||defined(SUN3)||defined(FREEBSD)|defined(NETBSD)||defined(PTX)||defined(IRIX5))
|
||||
#define HAVE_H_ERRLIST (defined(SUN4)||defined(SUN3)||defined(FREEBSD)|defined(NETBSD)||defined(PTX)||defined(IRIX5)||defined(LINUX2)||defined(IRIX6)||defined(BSDOS3))
|
||||
#endif
|
||||
#if HAVE_H_ERRLIST
|
||||
extern int h_errno;
|
||||
@ -311,7 +314,7 @@ extern char *h_errlist[];
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_RLIMIT)
|
||||
#if (defined(SUN5)||defined(PTX4))
|
||||
#if (defined(SUN5)||defined(PTX4)||defined(LINUX2)||defined(BSDOS3)||defined(IRIX6))
|
||||
#define HAVE_RLIMIT 1
|
||||
#else
|
||||
#define HAVE_RLIMIT 0
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: version.h,v 1.8 1999-01-14 14:05:30-08 bryan Exp $
|
||||
* $Id: version.h,v 1.9 1999-01-15 16:02:17-08 bryan Exp $
|
||||
*
|
||||
* GNAC, Inc., 1998
|
||||
*
|
||||
* Maintainer/Enhancer: Bryan Stansell (bryan@gnac.com)
|
||||
*/
|
||||
|
||||
#define GNAC_VERSION "GNAC version 6.07"
|
||||
#define GNAC_VERSION "GNAC version 6.08"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: console.c,v 5.22 1999-01-13 11:48:38-08 bryan Exp $
|
||||
* $Id: console.c,v 5.23 1999-01-15 15:35:19-08 bryan Exp $
|
||||
*
|
||||
* GNAC, Inc., 1998
|
||||
*
|
||||
@ -77,7 +77,7 @@ extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
static char rcsid[] =
|
||||
"$Id: console.c,v 5.22 1999-01-13 11:48:38-08 bryan Exp $";
|
||||
"$Id: console.c,v 5.23 1999-01-15 15:35:19-08 bryan Exp $";
|
||||
static char *progname =
|
||||
rcsid;
|
||||
int fVerbose = 0, fReplay = 0, fRaw = 0;
|
||||
@ -634,6 +634,56 @@ int sig;
|
||||
++SawUrg;
|
||||
}
|
||||
|
||||
void
|
||||
processUrgentData(s)
|
||||
int s;
|
||||
{
|
||||
static char acCmd[64];
|
||||
|
||||
SawUrg = 0;
|
||||
#if defined(SIGURG)
|
||||
(void)signal(SIGURG, oob);
|
||||
#endif
|
||||
|
||||
/* get the pending urgent message
|
||||
*/
|
||||
while (recv(s, acCmd, 1, MSG_OOB) < 0) {
|
||||
switch (errno) {
|
||||
case EWOULDBLOCK:
|
||||
/* clear any pending input to make room */
|
||||
(void)read(s, acCmd, sizeof(acCmd));
|
||||
CSTROUT(1, ".");
|
||||
continue;
|
||||
case EINVAL:
|
||||
default:
|
||||
fprintf(stderr, "%s: recv: %d: %s\r\n", progname, s, strerror(errno));
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
switch (acCmd[0]) {
|
||||
case OB_SUSP:
|
||||
#if defined(SIGSTOP)
|
||||
CSTROUT(1, "stop]");
|
||||
c2cooked();
|
||||
(void)kill(getpid(), SIGSTOP);
|
||||
c2raw();
|
||||
CSTROUT(1, "[press any character to continue");
|
||||
#else
|
||||
CSTROUT(1, "stop not supported -- press any character to continue");
|
||||
#endif
|
||||
break;
|
||||
case OB_DROP:
|
||||
CSTROUT(1, "dropped by server]\r\n");
|
||||
c2cooked();
|
||||
exit(1);
|
||||
/*NOTREACHED*/
|
||||
default:
|
||||
fprintf(stderr, "%s: unknown out of band command `%c\'\r\n", progname, acCmd[0]);
|
||||
(void)fflush(stderr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* interact with a group server (ksb)
|
||||
*/
|
||||
@ -808,60 +858,16 @@ char *pcMaster, *pcMach, *pcHow, *pcUser;
|
||||
FD_SET(s, &rinit);
|
||||
FD_SET(0, &rinit);
|
||||
for (;;) {
|
||||
if ( SawUrg ) {
|
||||
processUrgentData(s);
|
||||
}
|
||||
/* reset read mask and select on it
|
||||
*/
|
||||
rmask = rinit;
|
||||
while (-1 == select(sizeof(rmask)*8, &rmask, (fd_set *)0, (fd_set *)0, (struct timeval *)0)) {
|
||||
static char acCmd[64];
|
||||
|
||||
rmask = rinit;
|
||||
|
||||
/* if we were suspened, try again */
|
||||
if (EINTR != errno || !SawUrg) {
|
||||
continue;
|
||||
}
|
||||
SawUrg = 0;
|
||||
#if defined(SIGURG)
|
||||
(void)signal(SIGURG, oob);
|
||||
#endif
|
||||
|
||||
/* get the pending urgent message
|
||||
*/
|
||||
while (recv(s, acCmd, 1, MSG_OOB) < 0) {
|
||||
switch (errno) {
|
||||
case EWOULDBLOCK:
|
||||
/* clear any pending input to make room */
|
||||
(void)read(s, acCmd, sizeof(acCmd));
|
||||
CSTROUT(1, ".");
|
||||
continue;
|
||||
case EINVAL:
|
||||
default:
|
||||
fprintf(stderr, "%s: recv: %d: %s\r\n", progname, s, strerror(errno));
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
switch (acCmd[0]) {
|
||||
case OB_SUSP:
|
||||
#if defined(SIGSTOP)
|
||||
CSTROUT(1, "stop]");
|
||||
c2cooked();
|
||||
(void)kill(getpid(), SIGSTOP);
|
||||
c2raw();
|
||||
CSTROUT(1, "[press any character to continue");
|
||||
#else
|
||||
CSTROUT(1, "stop not supported -- press any character to continue");
|
||||
#endif
|
||||
break;
|
||||
case OB_DROP:
|
||||
CSTROUT(1, "dropped by server]\r\n");
|
||||
c2cooked();
|
||||
exit(1);
|
||||
/*NOTREACHED*/
|
||||
default:
|
||||
fprintf(stderr, "%s: unknown out of band command `%c\'\r\n", progname, acCmd[0]);
|
||||
(void)fflush(stderr);
|
||||
break;
|
||||
if ( SawUrg ) {
|
||||
processUrgentData(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
8
port/Linux2
Normal file
8
port/Linux2
Normal file
@ -0,0 +1,8 @@
|
||||
# $Id: Linux2,v 1.1 1999-01-14 22:25:08-08 bryan Exp $
|
||||
#
|
||||
'CC=gcc'
|
||||
'INSTALL=/usr/bin/install'
|
||||
'INCLUDE='
|
||||
'DEBUG=-O'
|
||||
'CDEFS=-DLINUX2'
|
||||
'LIBS=-lcrypt'
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: system,v 1.2 1999-01-14 13:44:59-08 bryan Exp $
|
||||
# $Id: system,v 1.4 1999-01-15 15:35:44-08 bryan Exp $
|
||||
#
|
||||
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb
|
||||
@ -9,8 +9,10 @@ s=`uname -s`
|
||||
r=`uname -r`
|
||||
|
||||
case "$s-$r" in
|
||||
SunOS-5.*) p="SunOS5" ;;
|
||||
BSD/OS-3.*) p="BSDOS3" ;;
|
||||
SunOS-5.*) p="SunOS5" ;;
|
||||
BSD/OS-3.*) p="BSDOS3" ;;
|
||||
Linux-2.*) p="Linux2" ;;
|
||||
IRIX-6.*) p="IRIX6" ;;
|
||||
*) p="" ;;
|
||||
esac
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user