Index: Build
===================================================================
RCS file: Build
diff -N Build
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Build	23 Feb 2005 17:03:37 -0000	1.2
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+source ../../Config.sh
+
+pp_do "$@"
Index: Makefile
===================================================================
RCS file: /srv/CVS/pplinux/mgetty/Makefile,v
retrieving revision 1.1.317.1
retrieving revision 1.3
diff -u -r1.1.317.1 -r1.3
--- Makefile	3 Feb 2005 09:28:45 -0000	1.1.317.1
+++ Makefile	23 Feb 2005 17:03:37 -0000	1.3
@@ -1,10 +1,12 @@
+include ../../Config.mk
+
 # Makefile for the mgetty fax package
 #
-# SCCS-ID: $Id: Makefile,v 4.56 2002/12/16 13:08:23 gert Exp $ (c) Gert Doering
+# SCCS-ID: $Id: Makefile,v 1.1.17.2 2004/03/09 10:30:49 rwa Exp $ (c) Gert Doering
 #
 # this is the C compiler to use (on SunOS, the standard "cc" does not
 # grok my code, so please use gcc there. On ISC 4.0, use "icc".).
-CC=gcc
+#CC=gcc
 #CC=cc
 #
 #### C Compiler Flags ####
@@ -107,7 +109,7 @@
 # prompt first. Don't forget to activate the /AutoPPP/ line in login.config!
 #
 #CFLAGS=-Wall -O2 -pipe -DSECUREWARE -DUSE_POLL
-CFLAGS=-O2 -Wall -pipe
+CFLAGS=$(FW_CFLAGS_3RDPARTY) -Wall -DAUTO_PPP
 #CFLAGS=-O -DSVR4
 #CFLAGS=-O -DSVR4 -DSVR42
 #CFLAGS=-O -DUSE_POLL
@@ -148,7 +150,7 @@
 # 	"utmp.o: unresolved symbod _login"
 # For Linux, add "-lutil" if the linker complains about "updwtmp".
 #
-LDFLAGS=
+LDFLAGS=$(FW_LDFLAGS_3RDPARTY)
 LIBS=
 #LIBS=-lprot -lsocket				# SCO Unix
 #LIBS=-lsocket
@@ -169,7 +171,7 @@
 #
 # if your systems doesn't have one, use the shell script that I provide
 # in "inst.sh" (taken from X11R5). Needed on IRIX5.2
-INSTALL=install -c -o bin -g bin
+#INSTALL=install -c -o bin -g bin
 #INSTALL=install -c -o root -g wheel		# NeXT/BSD
 #INSTALL=/usr/ucb/install -c -o bin -g bin	# AIX, Solaris 2.x
 #INSTALL=installbsd -c -o bin -g bin		# OSF/1, AIX 4.1, 4.2
@@ -177,7 +179,7 @@
 #
 # prefix, where most (all?) of the stuff lives, usually /usr/local or /usr
 #
-prefix=/usr/local
+prefix=/
 #
 # prefix for all the spool directories (usually /usr/spool or /var/spool)
 #
@@ -197,7 +199,7 @@
 #
 # where the configuration files (*.config, aliases, fax.allow/deny) go to
 #
-CONFDIR=$(prefix)/etc/mgetty+sendfax
+CONFDIR=/etc/mgetty+sendfax
 #CONFDIR=/etc/default/
 #
 #
@@ -314,7 +316,7 @@
      faxlib.o faxsend.o faxrecp.o class1.o class1lib.o faxhng.o \
      io.o tio.o getdisk.o config.o conf_sf.o goodies.o
 
-all:	bin-all doc-all
+all:	bin-all
 
 bin-all: mgetty sendfax newslock subdirs call-back 
 
@@ -421,7 +423,7 @@
 	chmod 700 sedscript
 
 mksed: mksed.c policy.h Makefile 
-	$(CC) $(CFLAGS) -DBINDIR=\"$(BINDIR)\" -DSBINDIR=\"$(SBINDIR)\" \
+	gcc -O2 -DBINDIR=\"$(BINDIR)\" -DSBINDIR=\"$(SBINDIR)\" \
 		-DLIBDIR=\"$(LIBDIR)\" \
 		-DCONFDIR=\"$(CONFDIR)\" \
 		-DFAX_SPOOL=\"$(FAX_SPOOL)\" \
@@ -581,88 +583,12 @@
 	cd bindist; gtar cvvfz mgetty$(MR).$(SR)-bin.tgz *
 
 
-install: install.bin install.doc
+install: install.bin
 
-install.bin: mgetty sendfax newslock \
-		login.config mgetty.config sendfax.config 
-#
-# binaries
-#
-	-test -d $(BINDIR)  || ( ./mkidirs $(BINDIR)  ; chmod 755 $(BINDIR)  )
-	$(INSTALL) -m 755 newslock $(BINDIR)
-
-	-test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
-	-mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
-	-mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old
-	$(INSTALL) -s -m 700 mgetty $(SBINDIR)
-	$(INSTALL) -s -m 755 sendfax $(SBINDIR)
-#
-# data files + directories
-#
-	test -d $(LIBDIR)  || \
-		( ./mkidirs $(LIBDIR) ; chmod 755 $(LIBDIR) )
-	test -d $(CONFDIR) || \
-		( ./mkidirs $(CONFDIR); chmod 755 $(CONFDIR))
-	test -f $(CONFDIR)/login.config || \
-		$(INSTALL) -o root -m 600 login.config $(CONFDIR)/
-	test -f $(CONFDIR)/mgetty.config || \
-		$(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
-	test -f $(CONFDIR)/sendfax.config || \
-		$(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
-	test -f $(CONFDIR)/dialin.config || \
-		$(INSTALL) -o root -m 600 dialin.config $(CONFDIR)/
-	test -f $(CONFDIR)/faxrunq.config || \
-		$(INSTALL) -o root -m 644 faxrunq.config $(CONFDIR)/
-#
-# test for outdated stuff
-#
-	-@if test -f $(LIBDIR)/mgetty.login ; \
-	then \
-	    echo "WARNING: the format of $(LIBDIR)/mgetty.login has " ;\
-	    echo "been changed. Because of this, to avoid confusions, it's called " ;\
-	    echo "$(CONFDIR)/login.config now." ;\
-	    echo "" ;\
-	fi
-#
-# fax spool directories
-#
-	test -d $(spool) || \
-		( mkdir $(spool) ; chmod 755 $(spool) )
-	test -d $(FAX_SPOOL) || \
-		( mkdir $(FAX_SPOOL) ; \
-		  chown $(FAX_OUT_USER) $(FAX_SPOOL) ; \
-		  chmod 755 $(FAX_SPOOL) )
-	test -d $(FAX_SPOOL_IN) || \
-		( mkdir $(FAX_SPOOL_IN) ; chmod 755 $(FAX_SPOOL_IN) )
-	test -d $(FAX_SPOOL_OUT) || \
-		( mkdir $(FAX_SPOOL_OUT) ; \
-		  chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT) ; \
-		  chmod 755 $(FAX_SPOOL_OUT) )
-#
-# g3 tool programs
-#
-	cd g3 ; $(MAKE) install INSTALL="$(INSTALL)" \
-				BINDIR=$(BINDIR) \
-				LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
-#
-# fax programs / scripts / font file
-#
-	cd fax ; $(MAKE) install INSTALL="$(INSTALL)" \
-				FAX_OUT_USER=$(FAX_OUT_USER) \
-				BINDIR=$(BINDIR) SBINDIR=$(SBINDIR) \
-				LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
-#
-# compatibility
-#
-	if [ ! -z "$(INSTALL_MECHO)" ] ; then \
-	    cd compat ; \
-	    $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \
-	    $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \
-	fi
+install.bin: mgetty
+	$(INSTALL) -d $(DESTDIR)$(SBINDIR)
+	$(INSTALL) -m 755 mgetty $(DESTDIR)$(SBINDIR)
 
-#
-# documentation
-#
 install.doc:
 	cd doc ; $(MAKE) install INSTALL="$(INSTALL)" \
 				MAN1DIR=$(MAN1DIR) \
Index: login.c
===================================================================
RCS file: /srv/CVS/pplinux/mgetty/login.c,v
retrieving revision 1.1.317.1
retrieving revision 1.2
diff -u -r1.1.317.1 -r1.2
--- login.c	3 Feb 2005 09:28:45 -0000	1.1.317.1
+++ login.c	3 Feb 2005 10:35:39 -0000	1.2
@@ -1,4 +1,4 @@
-#ident "$Id: login.c,v 4.18 2002/03/12 11:12:23 gert Exp $ Copyright (C) 1993 Gert Doering"
+#ident "$Id: login.c,v 1.1.17.2 2004/03/09 10:30:49 rwa Exp $ Copyright (C) 1993 Gert Doering"
 
 
 /* login.c
@@ -143,6 +143,7 @@
 	goto fallthrough;
     }
 
+#if 0
     /* permission check */
     if ( st.st_uid != 0 || ( ( st.st_mode & 0077 ) != 0 ) )
     {
@@ -150,6 +151,7 @@
 	lprintf( L_FATAL, "login: '%s' ignored, wrong permissions. Must be owned by 'root' and have mode '0600'", cfg_file );
 	goto fallthrough;
     }
+#endif
 
     /* go for it! */
     if ( (fp = fopen( cfg_file, "r" )) == NULL )
Index: policy.h
===================================================================
RCS file: policy.h
diff -N policy.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ policy.h	3 Feb 2005 10:35:39 -0000	1.1
@@ -0,0 +1,603 @@
+#ident "$Id: policy.h-dist,v 1.1.17.1 2002/07/02 13:26:57 rwa Exp $ Copyright (c) Gert Doering"
+
+/* this is the file where all configuration defaults for mgetty / sendfax
+ * are specified.
+ *
+ * defaults are used if no values are given in the config file(s).
+ * config file values can be overridden by command line options.
+ *
+ * see mgetty.texi/mgetty.info for a description of the configuration files.
+ */
+
+/* main mgetty configuration file
+ */
+#define MGETTY_CONFIG "mgetty.config"
+
+/* sendfax configuration file
+ *
+ * if path doesn't start with "/", it's relative to CONFDIR (Makefile)
+ * if not defined, no configuration file is read (saves a few kbytes)
+ */
+#define SENDFAX_CONFIG "sendfax.config"
+
+
+/* login dispatcher config file (for mgetty)
+ *
+ * In this file, you can configure which "login" program (default /bin/login)
+ * to call for what user name.
+ *
+ * You could use it to call "uucico" for all users starting with "U*"
+ * (works only with Taylor UUCP 1.04 with my patch), or to call a fido
+ * mailer for fido calls (only if -DFIDO defined)...
+ * See the samples in the example login.config file (built from login.cfg.in).
+ *
+ * WARNING: make sure that this file isn't world-accessable (SECURITY!)
+ *
+ * If you want to call /bin/login in any case, do not define this
+ *
+ * If this doesn't start with "/", it's relative to CONFDIR.
+ */
+#define LOGIN_CFG_FILE "login.config"
+
+/* default login program
+ *
+ * If LOGIN_CFG_FILE is not defined, or does not exist, or doesn't
+ * have a default entry, this program is called for user logins.
+ * Normally, this is "/bin/login", just a few systems put "login"
+ * elsewhere (e.g. Free/NetBSD in "/usr/bin/login").
+ */
+#define DEFAULT_LOGIN_PROGRAM "/bin/login"
+
+
+/* callback config file
+ *
+ * this file controls the operation of the optional "callback" program.
+ * how callback works, is explained in detail in mgetty.texi. You need
+ * to set LOGIN_CFG_FILE (see above) to use callback from mgetty. 
+ *
+ * If this path does not start with "/", it's relative to CONFDIR.
+ */
+#define CALLBACK_CONFIG "callback.config"
+
+
+/* if this file exists, it can be used to control what callers
+ * are allowed in.  If undefined, the functionality is omitted.
+ * It will work only if your modem supports it. Check the modem manual.
+ * For Rockwell-Based modems, add #CID=1 to MODEM_INIT_STRING, for
+ * ZyXELs use S40.2=1.
+ * If the path doesn't start with "/", it's relative to CONFDIR.
+ */
+#define CNDFILE "dialin.config"
+
+
+/* If you want to use /etc/gettydefs to set tty flags, define this
+ * I recommend against it, I suspect some bugs lingering in that code
+ * (and one doesn't really need it in a normal setup anyway).
+ */
+/* #define USE_GETTYDEFS */
+
+/* Name of the "gettydefs" file (used only if USE_GETTYDEFS is set)
+ */
+#define GETTYDEFS "/etc/gettydefs"
+
+/* If no gettydefs "tag" is specified on the command line, use
+ * this setting (from GETTYDEFS) as default (only if compiled with
+ * USE_GETTYDEFS set)
+ */
+#define GETTYDEFS_DEFAULT_TAG "n"
+
+
+/* access modes */
+
+/* user id of the "uucp" user. The tty device will be owned by this user,
+ * so parallel dial-out of uucico will be possible
+ */
+#define DEVICE_OWNER	"uucp"
+/* group id that the device is chown()ed to. If not defined, the
+ * primary group of "DEVICE_OWNER" is used.
+ */
+#define DEVICE_GROUP	"uucp"
+
+/* access mode for the line while getty has it - it should be accessible
+ * by uucp / uucp, but not by others (imagine someone dialing into your
+ * system and using another modem to dial to another country...)
+ */
+#define FILE_MODE 0660
+
+/* security: optionally, mgetty can system() this, to kill any dangling
+ * processes on the current tty. A %s is replaced with the tty device.
+ * 
+ * Under most circumstances, this is not needed.  You might want
+ * to use it if you offer dial-in services with shell accounts to people
+ * that you don't trust (they might try to abuse your modems, and this
+ * will stop a number of attacks).
+ */
+/* #define EXEC_FUSER "exec fuser -k -f %s >/dev/null 2>&1" */
+
+
+/* logging */
+
+/* system console - if a severe error happens at startup, mgetty writes
+ * a message to this file and aborts
+ * On SCO, this may be /dev/syscon!
+ */
+#define CONSOLE "/dev/console"
+
+/* Name of the mgetty log file
+ * e.g. "/usr/spool/log/mgetty.log.%s" or "/tmp/log_mg.%s"
+ * a "%s" will be replaced by the device name, e.g. "tty2a"
+ *
+ * if the directory does not exist, the log file goes to CONSOLE (!)
+ */
+#define LOG_PATH "/var/log/mgetty.log.%s"
+
+/* Default log error level threshold. Possible error levels are
+ * L_FATAL, L_ERROR, L_AUDIT, L_WARN, L_MESG, L_NOISE, L_JUNK (see mgetty.h)
+ */
+#define LOG_LEVEL L_MESG
+
+/* Whether "\n"s in the modem response should start a new line
+ * in the logfile
+ */
+/* #define LOG_CR_NEWLINE */
+
+/* System administrator - if a severe error happens (lprintf called
+ * with log_level L_FATAL) and writing to CONSOLE is not possible,
+ * the logfile will be mailed to him
+ */
+#define ADMIN	"root"
+
+/* Syslog
+ *
+ * If you want logging messages of type L_AUDIT, L_ERROR and L_FATAL
+ * to go to the "syslog", define this.
+ * mgetty will use the facility "LOG_AUTH", and the priorities
+ * LOG_NOTICE, LOG_ERR and LOG_ALERT, respectively.
+ */
+#define SYSLOG
+
+/* Syslog facility
+ *
+ * This is the facility mgetty uses for logging. Ususally, this will be
+ * LOG_AUTH, but on some systems, this may not exist, try LOG_DAEMON
+ * instead (or look into the syslog manpage for available options)
+ * Note that LOG_AUTH is deprecated where LOG_AUTHPRIV is defined.
+ */
+#ifdef LOG_AUTHPRIV
+#define SYSLOG_FC LOG_AUTHPRIV
+#else
+#define SYSLOG_FC LOG_AUTH
+#endif
+
+/* login stuff */
+
+/* System name - printed at login prompt
+ * If you do not define this, the uname() call will be used
+ */
+/* #define SYSTEM	"greenie" */
+
+/* Login prompt
+ * The "@", "\\D" and "\\T" escapes will be replaced by SYSTEM, the
+ * current date and time, respectively.
+ * override with "-p <prompt>" switch
+ * Modified to match the defaults for mingetty and login.
+ */
+#define LOGIN_PROMPT	"@ login: "
+
+/* On SVR4, maybe on other systems too, you can cause the 'login' program
+ * to prompt with the same string as mgetty did, instead of the standard
+ * "login:" prompt. The string will be passed to the 'login' program
+ * in the environment variable TTYPROMPT.
+ * This is done by putting "login" into a special (brain-dead) "ttymon"-
+ * compatibility mode. In that mode, mgetty doesn't ask for a login name
+ * at all, so mgetty won't work if you enable that feature and your
+ * login program doesn't support it. (You can see if it doesn't work
+ * if the user gets a double login prompt or none at all).
+ *
+ * This feature automatically disables FIDO and AutoPPP support!
+ *
+ * To use this feature, define ENV_TTYPROMPT.
+ */
+/* #define ENV_TTYPROMPT */
+
+/* Some very old terminals can only generate UPPERCASE letters.
+ * Traditional getty variants detect this, and then set the
+ * corresponding termio(s) flags to convert upper/lower case letters
+ * "on the fly".  Mgetty can do it, but since this is hardly
+ * needed nowadays, the default is off.
+ */
+/* #define DO_LCUC_MAP */
+
+/* Maximum time before login name has to be entered (in seconds)
+ * (after that time a warning will be issued, after that, the call is
+ * dropped). To disable that feature, do not define it.
+ */
+#define MAX_LOGIN_TIME	240
+
+/* nologin file
+ *
+ * If that file exists, a ringing phone won't be answered (see manual).
+ * "%s" will be replaced by the device name.
+ */
+#define NOLOGIN_FILE "/etc/nologin.%s"
+
+
+/* misc */
+
+
+/* Path for the lock files. A %s will be replaced with the device name,
+ * e.g. tty2a -> /usr/spool/uucp/LCK..tty2a
+ * Make sure that this is the same file that your uucico uses for
+ * locking!
+ */
+
+/* for a few systems, you can just take those defaults and be happy */
+#if defined (SVR4) || defined(sunos4)
+# define LOCK_PATH "/var/spool/locks"
+# define LOCK      "/var/spool/locks/LCK..%s"
+#else
+# ifdef sgi
+#  define LOCK	"/usr/spool/locks/LCK..%s"
+# endif
+# ifdef _AIX
+#  define LOCK	"/etc/locks/LCK..%s"
+# endif
+# ifdef NeXT
+#  define LOCK "/usr/spool/uucp/LCK/LCK..%s"
+# endif
+# ifdef linux
+#  define LOCK	"/var/lock/LCK..%s"
+# endif
+# if defined(__FreeBSD__) || defined(__NetBSD__)
+#  define LOCK "/var/spool/lock/LCK..%s"
+# endif 
+#endif
+
+/* if your system isn't listed above, change that line here */
+#ifndef LOCK
+#define LOCK "/var/spool/uucp/LCK..%s"
+#endif
+  
+/* Set this to "1" if your system uses binary lock files (i.e., the pid
+ * as four byte integer in host byte order written to the lock file)
+ * If it is "0", HDB locking will be used - the PID will be written as
+ * 10 byte ascii, with a trailing newline
+ * (Just check "LOCK" while uucico or pcomm or ... are running to find
+ * out what lock files are used on your system)
+ * On NeXT systems, you must set this to "1".
+ */
+#define LOCKS_BINARY 0
+
+/* Lower case locks - change the last character of the device name
+ *                    to lowercase for locking purposes.
+ *
+ * If you're using a SCO Unix system with those "tty1a/tty1A" device
+ * pairs, you'll have to define this.
+ */
+/* #define LOCKS_LOWERCASE */
+
+/* Change _all_ characters to lowercase (currently no system uses this) */
+/* #define LOCKS_ALL_LOWERCASE */
+
+
+/* the default speed used by mgetty - override it with "-s <speed>"
+ *
+ * WARNING: this is a bit tricky, since some modems insist on going to
+ * 19200 bps when in fax mode. So, if fax receiving with a port speed of
+ * something else doesn't work, try experimenting with FAX_RECV_SWITCHBD,
+ * and if that doesn't help, try DEFAULT_PORTSPEED 19200
+ *
+ * WARNING2: Speeds higher than 38400 aren't supported on all platforms,
+ * and sometimes you have to use "50" to get 57600 or so!
+ */
+#define DEFAULT_PORTSPEED	38400
+
+/* the modem initialization string
+ *
+ * the default string should set up most hayes compatible modems into a
+ * fairly sane state (echo on, verbose reports on, quiet off, reset on
+ * DTR toggle on), but it doesn't set any flow control options (because
+ * that's done differently on each modem, look into your manual for commands
+ * like &H3, &K4, \Q6 or similar things) or protocols.
+ *
+ * You can change the initialization sequence with the "init-chat" keyword
+ * in "mgetty.config".
+ *
+ * If you need delays, specify them as "\\d", if you want to send a
+ * backslash ('\'), give it as "\\\\".
+ *
+ * Very IMPORTANT: make sure that the modem assigns the DCD line properly,
+ * usually this is done with the AT&C1 command!
+ *
+ * The modem must answer with "OK" (!!!) - otherwise, use "init-chat".
+ */
+#define MODEM_INIT_STRING	"ATS0=0Q0&D3&C1"
+
+/* command termination string
+ *
+ * for most modems, terminating the AT... command with "\r" is
+ * sufficient and "\r\n" also works without doing harm.
+ * Unfortunately, for the Courier HST, you've to use *only* \r,
+ * otherwise ATA won't work (immediate NO CARRIER), and for some
+ * (old) ZyXELs, you have to use \r\n (no OK otherwise).
+ * So, try one, and if it doesn't work, try the other.
+ */
+#define MODEM_CMD_SUFFIX "\r"
+
+/* "keep alive"
+ *
+ * mgetty can periodically check whether the modem is still alive
+ * by issueing an "AT\r" command and checking for the "OK"
+ * Define here, in seconds, how often mgetty should check. For normal
+ * reliable modems, once an hour should be sufficient...
+ * If you use "-1", or don't define this at all, mgetty won't check.
+ */
+#define MODEM_CHECK_TIME 3600
+
+
+/* modem mode
+ *
+ * DEFAULT_MODEMTYPE specifies the default way mgetty+sendfax handle a
+ * faxmodem. You have four choices:
+ *   "data" - data only, no faxing available (for sendfax, equal to "auto")
+ *   "cls2" - use AT+FCLASS=2
+ *   "c2.0" - use AT+FCLASS=2.0
+ *   "auto" - try "2.0", then "2", then fall to "data".
+ *
+ * Normally, you can leave this to "auto", but if you have a modem that
+ * can do class 2.0 and class 2, and 2.0 doesn't work, then you could try
+ * setting it to "cls2".
+ * You can override this define with the "-C <mode>" switch.
+ */
+#define DEFAULT_MODEMTYPE "auto"
+
+
+/* some modems are a little bit slow - after sending a response (OK)
+ * to the host, it will take some time before they can accept the next
+ * command - specify the amount needed in data mode here (in
+ * milliseconds). Normally, 50 ms should be sufficient. (On a slow
+ * machine it may even work without any delay at all)
+ *
+ * Be warned: if your machine isn't able to sleep for less than one
+ * second, this may cause problems.
+ */
+#define DO_CHAT_SEND_DELAY 50
+ /* and this is the delay before sending each command while in fax mode
+  */
+#define FAX_COMMAND_DELAY 50
+
+/* incoming faxes will be chown()ed to this uid and gid.
+ * if FAX_IN_GROUP is undefined, the group of ...OWNER is used.
+ */
+#define FAX_IN_OWNER	"uucp"
+/* #define FAX_IN_GROUP	"root" */
+
+/* incoming faxes will be chmod()ed to this mode
+ * (if you do not define this, the file mode will be controlled by
+ * mgetty's umask)
+ */
+#define FAX_FILE_MODE 0660
+
+/* FLOW CONTROL
+ *
+ * There are basically two types of flow control:
+ * - hardware flow control: pull the RTS/CTS lines low to stop the other
+ *   side from spilling out data too fast
+ * - sofware flow control: send an Xoff-Character to tell the other
+ *   side to stop sending, send an Xon to restart
+ * obviously, use of Xon/Xoff has the disadvantage that you cannot send
+ * those characters in your data anymore, but additionally, hardware flow
+ * control is normally faster and more reliable
+ *
+ * mgetty can use multiple flow control variants:
+ * FLOW_NONE  - no flow control at all (absolutely not recommended)
+ * FLOW_HARD  - use RTS/CTS flow control (if available on your machine)
+ * FLOW_SOFT  - use Xon/Xoff flow control, leave HW lines alone
+ * FLOW_BOTH  - use both types simultaneously, if possible
+ *
+ * Note that few operating systems allow both types to be used together.
+ *
+ * mgetty won't (cannot!) notice if your settings don't work, but you'll
+ * see it yourself: you'll experience character losses, garbled faxes,
+ * low data throughput,..., if the flow control settings are wrong
+ *
+ * If in doubt what to use, try both and compare results.
+ * (if you use FAS or SAS with the recommended settings, FLOW_HARD is a
+ * "don't care" since the driver will use RTS/CTS anyway)
+ *
+ * If you use an atypical system, check whether tio_set_flow_control in
+ * tio.c does the right thing for your system.
+ */
+
+/* This is the flow control used for normal data (login) connections
+ * Set it to FLOW_HARD except in very special cases.
+ */
+#define DATA_FLOW	FLOW_HARD
+
+/* This is the flow control used for incoming fax connections
+ * Wrong settings will result in missing lines or erroneous lines
+ * in most of the received faxes.
+ * Most faxmodems expect Xon/Xoff, few honour the RTS line.
+ */
+#define FAXREC_FLOW	FLOW_HARD | FLOW_SOFT
+
+/* And this is for sending faxes
+ *
+ * Wrong settings here will typically result in that the first few
+ * centimeters of a transmitted fax look perfect, and then (the buffer
+ * has filled up), the rest is more or less illegible junk.
+ * For most faxes, this has to be FLOW_SOFT, though the Supra and ZyXEL
+ * modems will (sometimes) do hardware flow control, too. Try it.
+ *
+ * If you see a large number of [11] and [13] characters in the sendfax
+ * log file, your modem is propably doing software flow control - and
+ * you've definitely set FAXSEND_FLOW to FLOW_HARD...
+ *
+ * Some versions of SCO Unix have a "weird" serial driver that will only
+ * do half duplex hardware flow control. You will then run into the problem
+ * that fax sending will time out after the first page sent (no ACK received)
+ * and fail if FLOW_HARD is used. Use FLOW_SOFT instead.
+ */
+#define FAXSEND_FLOW	FLOW_HARD | FLOW_SOFT
+ 
+/* if your faxmodem switches port bit rate just after sending the "+FCON"
+ * message to the host, define this to contain the baudrate used. (Not
+ * important if you have the portspeed set to this value anyway).
+ *
+ * Most Rockwell-based modems need FAX_RECV_SWITCHBD 19200.
+ * ZyXELs do *not* need this, except if explicitely told to do so.
+ *
+ * You can see if this is set wrong if mgetty gets the "+FCON" response,
+ * starts the fax receiver, and times out waiting for OK, receiving
+ * nothing or just junk.
+ */
+/* #define FAX_RECV_SWITCHBD 19200 */
+
+/* some genius at US Robotics obviously decided that the above method
+ * of switching baud rates is broken, and came up with something new
+ * --- broken as well (why bother switching rates at all?) --- this
+ * and other USR Courier Fax follies will be handled by enabling the
+ * following define (if you have an USR faxmodem that does *not* need
+ * this, please send me a mail!)
+ * It seems as if the newest V.34 modems do not need this anymore, please
+ * try it out...
+ */
+/* #define FAX_USRobotics */
+
+/* name of the logfile for outgoing faxes (e.g. /var/log/sendfax.log)
+ */
+#define FAX_LOG		"/var/log/sendfax.log"
+
+/* local station ID (your fax number)
+ * 20 character string, most faxmodem allow all ascii characters 32..127,
+ * but some do only allow digits and blank
+ * AT+FLID=? should tell you what's allowed and what not.
+ */
+#define FAX_STATION_ID	"49 115 xxxxxxxx"
+
+/* ------ sendfax-specific stuff follows here -------- */
+
+/* the baudrate used for *sending* faxes. ZyXELs can handle 38400,
+ * SUPRAs (and many other rockwell-based faxmodems) can not.
+ * I recommend 38400, since 19200 may be to slow for 14400 bps faxmodems!
+ */
+#define FAX_SEND_BAUD 38400
+
+/* switch baud rate after +FCLASS=2
+ *
+ * some weird modems require that you initialize the modem with one
+ * baud rate (e.g. 2400 or 9600 for cheap 2400+fax modems, or `smart'
+ * modems that insist on staying locked to 38400 (ELSA!)), but switch
+ * to another baud rate, typically 19200, immediately after receiving
+ * the "AT+FCLASS=2" command.
+ *
+ * If the following is defined, sendfax will switch to the speed given
+ * here after sending AT+FCLASS=2.
+ *
+ * Only try fiddling with this if sendfax times out during modem
+ * initialization, receiving junk instead of "OK" or "ERROR" (logfile!)
+ */
+/* #define FAX_SEND_SWITCHBD 19200 */
+
+/* this is the command to set the modem to use the desired flow control.
+ * For hardware handshake, this could be AT&H3 for the ZyXEL, &K3 for
+ * Rockwell-Based modems or AT\\Q3&S0 for Exar-Based Modems (i.e. some GVC's)
+ * If you don't want extra initalization, do not define it.
+ * Don't forget the "AT"!
+ */
+/* #define FAX_MODEM_HANDSHAKE "AT&H3" */
+
+/* This is the modem command used for dialing. The phone number will
+ * get appended right after the string. Normally, "ATD" or "ATDP" should
+ * suffice, but in some situations (company telephone systems) you might
+ * need something like "ATx0DT0wP" (switch of dial-tone recognition, tone-
+ * dial a "0", wait for dial-tone, pulse dial the rest)
+ */
+#define FAX_DIAL_PREFIX "ATD"
+
+/* When sending a fax, if the other side says "page bad, retrain
+ * requested", sendfax will retry the page. Specifiy here the maximum
+ * number of retries (I recommend 3) before hanging up.
+ *
+ * If you set it to "0", sendfax will *never* retransmit a page (only
+ * do this if you know that your modem returns +FPTS:2 even if the
+ * page arrived properly, but be warned - you wont' be able to react
+ * properly to transmission errors!)
+ *
+ * See also the description of the "max-tries" and "max-tries-continue"
+ * settings in the sendfax config file.
+ */
+#define FAX_SEND_MAX_TRIES 3
+
+/* the device(s) used for faxing
+ * multiple devices can be separated by ":", e.g. "tty1a:tty2a"
+ * (with or without leading /dev/)
+ * If you don't adapt this for your needs, sendfax won't run (you can
+ * set it from the sendfax.config file, though)!
+ * We have no way of knowing.  Punt.
+ */
+#define FAX_MODEM_TTYS	"modem"
+
+/* Xon or not?
+ *
+ * the first issues of the class 2 drafts required that the program waits
+ * for an Xon character before sending the page data. Later versions
+ * removed that. Sendfax can do both, default is to wait for it.
+ *
+ * If you get an error message "... waiting for XON" when trying to
+ * send a fax, try this one. Some ELSA modems are know to need it.
+ *
+ * ** THIS OPTION IS OBSOLETE **  
+ * ** use "modem-quirks 0x08" in sendfax.config instead **
+ */
+
+
+/* define mailer that accepts destination on command line and mail text
+ * on stdin. For mailers with user friendly interfaces, (such as mail,
+ * mailx, elm), include an appropriate subject line in the command
+ * definition. If using a mail agent (such as sendmail), that reads
+ * mail headers, define NEED_MAIL_HEADERS.
+ */
+#ifdef SVR4
+# define MAILER		"/usr/bin/mailx -s 'Incoming facsimile message'"
+#else
+# ifdef _AIX
+#  define MAILER	"/usr/sbin/sendmail"
+#  define NEED_MAIL_HEADERS
+# endif
+# ifdef M_UNIX		/* SCO */
+#  define MAILER	"/usr/lib/mail/execmail"
+#  define NEED_MAIL_HEADERS
+# endif
+#endif
+
+#ifndef MAILER
+# define MAILER		"/usr/lib/sendmail"
+# define NEED_MAIL_HEADERS
+#endif
+
+/* where to send notify mail about incoming faxes to
+ * (remember to create an mail alias if no such user exists!)
+ */
+#define MAIL_TO		"faxadmin"
+
+/* after a fax has arrived, mgetty can call a program for further
+ * processing of this fax.
+ *
+ * (e.g.: printing of the fax, sending as MIME mail, displaying in an X
+ * window (the latter one could be tricky) ...)
+ *
+ * It will be called as:
+ * <program> <result code> "<sender_id>" <#pgs> <pg1> <pg2>...
+ * 
+ * Define the name of this program here
+ * If you don't want this type of service, do not define it at all
+ * Absolute path name has to be used here!
+ */
+#define FAX_NOTIFY_PROGRAM "/etc/mgetty+sendfax/new_fax"
+
+/* default minimum space required on spooling partition for receiving a FAX
+ * (in KILObytes)
+ */
+#define	MINFREESPACE 1024
+
Index: policy.h-dist
===================================================================
RCS file: /srv/CVS/pplinux/mgetty/policy.h-dist,v
retrieving revision 1.1.317.1
retrieving revision 1.2
diff -u -r1.1.317.1 -r1.2
--- policy.h-dist	3 Feb 2005 09:28:45 -0000	1.1.317.1
+++ policy.h-dist	3 Feb 2005 10:35:39 -0000	1.2
@@ -1,4 +1,4 @@
-#ident "$Id: policy.h,v 4.19 2002/12/05 11:52:42 gert Exp $ Copyright (c) Gert Doering"
+#ident "$Id: policy.h-dist,v 1.1.17.2 2004/03/09 10:30:49 rwa Exp $ Copyright (c) Gert Doering"
 
 /* this is the file where all configuration defaults for mgetty / sendfax
  * are specified.
@@ -67,7 +67,7 @@
  * ZyXELs use S40.2=1.
  * If the path doesn't start with "/", it's relative to CONFDIR.
  */
-/* #define CNDFILE "dialin.config" */
+#define CNDFILE "dialin.config"
 
 
 /* If you want to use /etc/gettydefs to set tty flags, define this
@@ -96,7 +96,7 @@
 /* group id that the device is chown()ed to. If not defined, the
  * primary group of "DEVICE_OWNER" is used.
  */
-#define DEVICE_GROUP	"modem"
+#define DEVICE_GROUP	"uucp"
 
 /* access mode for the line while getty has it - it should be accessible
  * by uucp / uucp, but not by others (imagine someone dialing into your
@@ -129,7 +129,7 @@
  *
  * if the directory does not exist, the log file goes to CONSOLE (!)
  */
-#define LOG_PATH "/var/log/mgetty.%s"
+#define LOG_PATH "/var/log/mgetty.log.%s"
 
 /* Default log error level threshold. Possible error levels are
  * L_FATAL, L_ERROR, L_AUDIT, L_WARN, L_MESG, L_NOISE, L_JUNK (see mgetty.h)
@@ -154,15 +154,20 @@
  * mgetty will use the facility "LOG_AUTH", and the priorities
  * LOG_NOTICE, LOG_ERR and LOG_ALERT, respectively.
  */
-/* #define SYSLOG */
+#define SYSLOG
 
 /* Syslog facility
  *
  * This is the facility mgetty uses for logging. Ususally, this will be
  * LOG_AUTH, but on some systems, this may not exist, try LOG_DAEMON
  * instead (or look into the syslog manpage for available options)
+ * Note that LOG_AUTH is deprecated where LOG_AUTHPRIV is defined.
  */
+#ifdef LOG_AUTHPRIV
+#define SYSLOG_FC LOG_AUTHPRIV
+#else
 #define SYSLOG_FC LOG_AUTH
+#endif
 
 /* login stuff */
 
@@ -175,8 +180,9 @@
  * The "@", "\\D" and "\\T" escapes will be replaced by SYSTEM, the
  * current date and time, respectively.
  * override with "-p <prompt>" switch
+ * Modified to match the defaults for mingetty and login.
  */
-#define LOGIN_PROMPT	"@!login: "
+#define LOGIN_PROMPT	"@ login: "
 
 /* On SVR4, maybe on other systems too, you can cause the 'login' program
  * to prompt with the same string as mgetty did, instead of the standard
@@ -249,7 +255,7 @@
 
 /* if your system isn't listed above, change that line here */
 #ifndef LOCK
-#define LOCK "/usr/spool/uucp/LCK..%s"
+#define LOCK "/var/spool/uucp/LCK..%s"
 #endif
   
 /* Set this to "1" if your system uses binary lock files (i.e., the pid
@@ -532,8 +538,9 @@
  * (with or without leading /dev/)
  * If you don't adapt this for your needs, sendfax won't run (you can
  * set it from the sendfax.config file, though)!
+ * We have no way of knowing.  Punt.
  */
-#define FAX_MODEM_TTYS	"tty4c:tty4d"
+#define FAX_MODEM_TTYS	"modem"
 
 /* Xon or not?
  *
@@ -591,7 +598,7 @@
  * If you don't want this type of service, do not define it at all
  * Absolute path name has to be used here!
  */
-#define FAX_NOTIFY_PROGRAM "/usr/local/lib/mgetty+sendfax/new_fax"
+#define FAX_NOTIFY_PROGRAM "/etc/mgetty+sendfax/new_fax"
 
 /* default minimum space required on spooling partition for receiving a FAX
  * (in KILObytes)
Index: voice/include/paths.h
===================================================================
RCS file: /srv/CVS/pplinux/mgetty/voice/include/paths.h,v
retrieving revision 1.1.317.1
retrieving revision 1.2
diff -u -r1.1.317.1 -r1.2
--- voice/include/paths.h	3 Feb 2005 09:28:45 -0000	1.1.317.1
+++ voice/include/paths.h	3 Feb 2005 10:35:39 -0000	1.2
@@ -4,7 +4,7 @@
  * This file contains the position of the configuration file and of
  * the logfiles. Change this for your installation.
  *
- * $Id: paths.h,v 1.4 1998/09/09 21:06:36 gert Exp $
+ * $Id: paths.h,v 1.1.17.1 2002/07/02 13:26:58 rwa Exp $
  *
  */
 
@@ -16,10 +16,10 @@
 
 /*
  * Filename of the logfile for vgetty. The "%s" will be replaced by
- * the device name.
+ * the device name.  We match the pattern used by mgetty for the name.
  */
 
-#define VGETTY_LOG_PATH "/var/log/vgetty.%s"
+#define VGETTY_LOG_PATH "/var/log/vgetty.log.%s"
 
 /*
  * Filename of the logfile for vm.
