1 --- mgetty-1.1.30.orig/doc/faxrunqd.8in
2 +++ mgetty-1.1.30/doc/faxrunqd.8in
4 behaviour, you can send it the following signals:
12 remove lock file, remove pid file, terminate immediately.
16 +finish all fax jobs that are currently being sent, then terminate (this
17 +is used to signal faxrunqd "I want you to terminate" without disturbing
18 +the normal flow of operation - SIGINT/TERM etc. can lead to some faxes being
23 close, roll, and re-open log file.
27 -finish all fax jobs that are currently being sent, then terminate (this
28 -is used to signal faxrunqd "I want you to terminate" without disturbing
29 -the normal flow of operation - SIGHUP etc. can lead to some faxes being
31 +dump current modem success/failure statistics to log file.
35 --- mgetty-1.1.30.orig/doc/mgetty.8in
36 +++ mgetty-1.1.30/doc/mgetty.8in
39 Use the given string to prompt users for their login names. Various
40 tokens are allowed in this string. These tokens are: @ for the system
41 -name, \\n, \\r, \\g, \\v, \\f, \\t for newline, carriage return, bell,
42 -vertical tab, form feed, and tab, respectively. \\P and \\L will expand to
43 -the tty name ("ttyS0"). \\I will give the "CONNECT foobar" string returned
44 +name, \\n, \\r, \\g, \\b, \\v, \\f, \\t for newline, carriage return, bell,
45 +backspace, vertical tab, form feed, and tab, respectively.
46 +\\P and \\L will expand to the tty name ("ttyS0"). \\Y will give the Caller
47 +ID, \\I the "CONNECT foobar" string returned
48 by the modem, and \\S will output the port speed.
49 +\\s, \\m, \\V, \\R represent the operating system, the hardware name,
50 +the OS version, the OS release.
51 \\N and \\U give the number of users currently logged in.
52 \\C will be changed into the result of ctime(), and \\D and \\T will
53 output the date and time, respectively. Finally, \\<digit> will use digit
54 --- mgetty-1.1.30.orig/doc/mgetty.texi-in
55 +++ mgetty-1.1.30/doc/mgetty.texi-in
57 \input texinfo @c -*-texinfo-*-
59 -@c $Id: mgetty.texi-in,v 4.58 2002/11/17 21:19:45 gert Exp $ (c) 1993-2000 Gert Doering and Klaus Weidner
60 +@c $Id: mgetty.texi-in,v 4.59 2003/04/06 14:09:09 gert Exp $ (c) 1993-2000 Gert Doering and Klaus Weidner
61 @setfilename mgetty.info
62 @settitle mgetty + sendfax
65 @samp{/etc/issue}. Some special characters are substituted by connect
66 speed, date, etc. - see below (login-prompt) for a list.
68 +Note: maximum line length after substitution is 300 characters, so be
69 +careful with ASCII art banners with lots of color settings and such.
71 @item @code{prompt-waittime} @var{msecs}
73 This specifies how long @code{mgetty} will wait for modem and line to
74 @@ -1117,6 +1120,10 @@
75 @item \b backspace (ascii 010)
76 @item \f form feed (ascii 013)
78 +@item \s operating system (OS)
79 +@item \m hardware name
82 @item \P (and \L) port name (e.g. ttyS0)
83 @item \C date and time, in "ctime()" format
84 @item \I Connection string (e.g. 2400/REL)
86 @item \@var{digit} character with the specified octal code
89 -The maximum lenght of the login prompt is limited to 140 characters (after
90 +The maximum lenght of the login prompt is limited to 300 characters (after
93 @item @code{login-time} @var{secs}
94 @@ -3039,11 +3046,22 @@
95 implemented since Linux 2.4.10, or in earlier Versions with Jan
97 (http://www.stud.uni-karlsruhe.de/~uslk/i4l-callednumber.tar.gz).
98 +(@strong{NOTE}: This doesn't seem to work for at least Linux 2.4.20
99 +as shipped by RedHat 8.0 - anyone with some details??!)
101 Alternatively, you can set @code{ATS23.0=1}. This will make i4l signal
102 -the dialed MSN number as @code{RING/12345}. Unfortunately, it will be
103 -recognized by mgetty as caller ID, not destination MSN, so you might need
104 -to do some fiddling with 'ring.c' to get this fixed.
105 +the dialed MSN number as @code{RING/12345}. This was problematic in the
106 +past, as lots of other modems have a similar format to report the Caller ID
107 +(like @code{RING;4321} in ELSA modems) but recent mgetty versions handle
108 +this properly. With this, you can run a single mgetty instance for all
109 +your telephone numbers: just set @code{AT&L*} in your init string - this
110 +tells isnd4linux that @strong{all} incoming calls are to be signalled
111 +to mgetty, not only specific MSN.
113 +@c init-chat "" ATZ OK AT&L* OK ATS23.0=1S23.2=1S0=0 OK
118 For the full list of available AT commands, consult the i4l docs
119 (for example in @file{/usr/src/linux/Documentation/isdn/README}.
120 @@ -3063,8 +3081,9 @@
122 There's a small catch: modem autodetection will make mgetty think that
123 your ttyI device doesn't support fax (because most cards can't do it). So
124 -you need to set @code{modem-type c2.0} in @file{mgetty.config} and/or
125 -@file{sendfax.config} to force class 2.0 mode.
126 +you need to set @code{modem-type cls} in @file{mgetty.config} and/or
127 +@file{sendfax.config} to force class 2 mode. Class 2.0 mode is not
130 Voice support with @code{vgetty} should work (use your ttyI device
131 as an answering machine, etc.). I have not tried it yet - talk to the
132 --- mgetty-1.1.30.orig/fax/faxspool.in
133 +++ mgetty-1.1.30/fax/faxspool.in
135 # faxspool - sample script how to spool fax input data to a spool
136 # directory, creating jobs to be run by faxrunq
138 -# sccsid: $Id: faxspool.in,v 4.22 2002/11/23 15:14:57 gert Exp $ (c) Gert Doering
139 +# sccsid: $Id: faxspool.in,v 4.25 2003/06/28 20:44:04 gert Exp $ (c) Gert Doering
141 # syntax: faxspool [flags] <phone-number> <job(s)>
144 # 3.10.93: use "hp2hig3" for hp-pcl4-files (cl)
145 # 19.10.93: phone directories (caz)
146 # $Log: faxspool.in,v $
147 +# Revision 4.25 2003/06/28 20:44:04 gert
148 +# reset umask after creating temp directory
150 +# Revision 4.24 2003/04/09 21:05:14 gert
151 +# fix case of "faxing without header" (-h -) - wasn't copying G3 files
153 +# Revision 4.23 2003/01/21 13:27:12 gert
154 +# abort if input file names contain whitespace or quote characters
156 # Revision 4.22 2002/11/23 15:14:57 gert
157 # revert 4.14 -> 4.15 change: faxqueue_done is now back in $FAX_SPOOL_OUT
158 # (new permission concept, faxrunq/faxrunqd no longer running as root)
159 @@ -577,11 +586,15 @@
163 -# check, if all the files exist & are readable
164 +# check, if all the file names are "clean", that the files exist & are readable
169 + if [ `echo "$file" | tr -d ' \011\012\015\047\140"' ` != "$file" ]
171 + $echo "$0: invalid characters in file name '$file'!" >&2 ; exit 5
173 if [ ! -r $file -a x$file != x- ]
175 $echo "$0: cannot open '$file'!" >&2 ; exit 5
176 @@ -617,12 +630,14 @@
178 spooldir=${TMP:-/tmp}/$new_seq.$$.`date +%S`
182 if mkdir $spooldir ; then
183 $echo "spooling to $spooldir (->$new_seq)..."
185 $echo "ERROR: can't create work dir '$spooldir', giving up" >&2 ; exit 6
190 # process all input files
191 @@ -847,22 +862,23 @@
195 -# concatenate header with pages
196 +# concatenate header with pages (optionally) and copy over to spool dir
198 -if [ -z "$FAX_HEADER" ]
199 +if [ -n "$FAX_HEADER" ]
201 - finalpg="$pages" # don't :)
203 $echo "\nPutting Header lines on top of pages..."
205 hdrfont=$PBMFONT_HEADER_F
206 test -z "$normal_res" || hdrfont=$PBMFONT_HEADER_N
217 + if [ -n "$FAX_HEADER" ]
219 cat $FAX_HEADER | sed -e "s;@T@;$phone;g" -e "s;@P@;$nr;g" \
220 -e "s;@M@;$maxnr;g" -e "s;@U@;$USER;g" \
221 -e "s;@N@;$FULLNAME;g" \
224 $FAXQ_HELPER input $new_seq f$nr.g3 \
228 + $FAXQ_HELPER input $new_seq f$nr.g3 \
231 finalpg="$finalpg f$nr.g3"
233 -fi # end "if ! -z $FAX_HEADER"
236 if [ -z "$finalpg" -a -z "$poll_req" ]
238 --- mgetty-1.1.30.orig/fax/faxrunqd.in
239 +++ mgetty-1.1.30/fax/faxrunqd.in
242 # initial version: Feb 17, 1997
244 -$rcs_id='RCS: $Id: faxrunqd.in,v 1.63 2002/11/23 16:52:18 gert Exp $';
245 +$rcs_id='RCS: $Id: faxrunqd.in,v 1.65 2003/01/14 14:16:09 gert Exp $';
249 # $Log: faxrunqd.in,v $
250 +# Revision 1.65 2003/01/14 14:16:09 gert
251 +# include "total success" counter in the per_phone_statistics
253 +# Revision 1.64 2003/01/07 14:48:52 gert
254 +# If a job is re-queued, heavily penalize previously used modem.
255 +# This way, a defective modem (or a modem that has problems connecting to
256 +# just a few destination numbers) has less impact on overall stability.
258 # Revision 1.63 2002/11/23 16:52:18 gert
259 # make messages more clear, print warning if running as root
262 # - no other job for this phone number already queued
263 # - this modem must be allowed for that job
264 # - if multiple queues allowed, take the shortest one
265 +# - the modem used previously is heavily penalized
267 # called whenever a job's $queue{$job}->{status} changes to 'active'
270 @{$queue{$j}->{ttys}} : @standard_ttys;
272 # find tty with the shortest queue (among those that are allowed)
274 + # the previously used modem always gets a queue len of "9998", and is
275 + # thus only used if no other modem is available
277 my $min_t = $ttys[0];
283 - if ( $mq_length{$t}+$mq_badness{$t} < $min_l )
284 + my $this_q_len = ( $t eq $queue{$j}->{last_modem} ) ? 9998 :
285 + $mq_length{$t}+$mq_badness{$t};
287 + if ( $this_q_len < $min_l )
289 - $min_l = $mq_length{$t}+$mq_badness{$t}; $min_t = $t;
290 + $min_l = $this_q_len; $min_t = $t;
295 $queue{$j}->{weight} = 1 + scalar( @{$queue{$j}->{pages}} );
296 $mq_length{$min_t} += $queue{$j}->{weight};
298 - print LOG "$j: possible ttys: " . join( ':', @ttys ) . " -> queue selected: $min_t (l: $min_l->" . $mq_length{$min_t} . ")\n" if $opt_d;
299 + print LOG "$j: possible ttys: " . join( ':', @ttys ) . " last: ". $queue{$j}->{last_modem} . " -> queue selected: $min_t (l: $min_l->" . $mq_length{$min_t} . ")\n" if $opt_d;
301 # rotate @standard_ttys, to distribute load more evenly among modems
302 push @standard_ttys, (shift @standard_ttys);
306 $queue{$job}->{'tries'} = $queue{$job}->{'tries_c'} = 0;
307 + $queue{$job}->{'last_modem'} = 'unknown';
311 @@ -1264,15 +1281,13 @@
312 $tty_statistics{$t}{total}++;
313 $tty_statistics{$t}{$ex}++;
315 - # and, in case of errors, for per-remote-phone statistics
318 + # and for per-remote-phone statistics
319 my $ph = $queue{$j}->{'phone'};
320 - if ( ! defined( $per_phone_statistics{$ph} ) ||
321 - ! defined( $per_phone_statistics{$ph}{$ex} ) )
322 + if ( ! defined( $per_phone_statistics{$ph} ) )
323 + { $per_phone_statistics{$ph}{0} = 0; }
324 + if ( ! defined( $per_phone_statistics{$ph}{$ex} ) )
325 { $per_phone_statistics{$ph}{$ex} = 0; }
326 $per_phone_statistics{$ph}{$ex}++;
329 # now handle return codes. This is tricky if multiple jobs have been
330 # combined into one sendfax call - might have failed in the middle...
331 @@ -1443,6 +1458,9 @@
332 my $fstr = ( $ex<10 )? "failed" : "FATAL FAILURE";
333 &wstat( $j, "Status " . localtime() . " $fstr, exit($ex): $verb_ex\n");
335 + # remember tty used (try to get another one for next call)
336 + $queue{$j}->{last_modem} = $tty;
339 &wacct($j, "fail $ex: $verb_ex");
341 @@ -1704,7 +1722,7 @@
342 foreach $t (keys %tty_statistics)
344 print LOG "modem statistics for tty '$t'\n";
345 - print LOG " total faxes sent: ${tty_statistics{$t}{'total'}}\n";
346 + print LOG " total fax calls : ${tty_statistics{$t}{'total'}}\n";
347 print LOG " total success : ${tty_statistics{$t}{'0'}}\n";
348 foreach (sort(keys %{$tty_statistics{$t}}))
350 @@ -1719,8 +1737,10 @@
351 foreach $t (sort (keys %per_phone_statistics))
353 print LOG "error statistics for remote number '$t'\n";
354 + print LOG " total success : ${per_phone_statistics{$t}{'0'}}\n";
355 foreach (sort(keys %{$per_phone_statistics{$t}}))
357 + next if ( $_ eq '0' );
358 printf LOG " error code %-2d : %d [%s]\n",
359 $_, $per_phone_statistics{$t}{$_},
361 --- mgetty-1.1.30.orig/fax/faxrm.in
362 +++ mgetty-1.1.30/fax/faxrm.in
364 # There are still a lot rough edges - but it works, and should give you an
365 # idea how to improve it
367 -# SCCS: $Id: faxrm.in,v 4.5 2002/11/16 22:16:51 gert Exp $ Copyright (C) 1994 Gert Doering
368 +# SCCS: $Id: faxrm.in,v 4.6 2003/02/04 16:46:36 gert Exp $ Copyright (C) 1994 Gert Doering
370 FAX_SPOOL=@FAX_SPOOL@
371 FAX_SPOOL_OUT=@FAX_SPOOL_OUT@
375 # helper program for privileged queue access
376 -FAXQ_HELPER=/usr/local/lib/mgetty+sendfax/faxq-helper
377 +FAXQ_HELPER=@LIBDIR@/faxq-helper
380 if [ ! -d $FAX_SPOOL_OUT ]
381 --- mgetty-1.1.30.orig/fax/faxq-helper.c
382 +++ mgetty-1.1.30/fax/faxq-helper.c
384 int fax_out_uid; /* user ID to chown() fax jobs to */
385 int fax_out_gid; /* group ID ... */
387 +#define ROOT_UID 0 /* root's user ID - override checks */
389 #define FAX_SEQ_FILE ".Sequence"
390 #define FAX_SEQ_LOCK "LCK..seq"
396 - if ( *p != '.' && *p != ':' && ! isalnum(*p) )
397 + if ( *p == '/' || *p == '\\' || isspace(*p) || !isprint(*p) )
399 eout( "invalid char. '%c' in file name '%s', abort\n",
403 sprintf( pathbuf, "%s/%s", dir1, outfilename );
405 - fd = open( pathbuf, O_WRONLY | O_CREAT | O_EXCL, 0600 );
406 + fd = open( pathbuf, O_WRONLY | O_CREAT | O_EXCL, 0644 );
409 eout( "can't open '%s' for writing: %s\n", pathbuf, strerror(errno));
412 sprintf( buf, "%s/JOB", dir1 );
414 + /* the JOB file has to be world-readable, relax umask */
417 /* TODO: check if this portably catches symlinks to non-existant files! */
418 if ( ( fd = open( buf, O_WRONLY | O_CREAT | O_EXCL, 0644 ) ) < 0 )
422 if ( strncmp(buf, "user ", 5) == 0 )
424 - if ( strcmp( buf+5, real_user_name ) != 0 )
425 + if ( real_user_id != ROOT_UID &&
426 + strcmp( buf+5, real_user_name ) != 0 )
428 eout( "user name mismatch (%s <-> %s)\n", buf+5, real_user_name );
432 if ( strncmp(buf, "user ", 5) == 0 )
434 - if ( strcmp( buf+5, real_user_name ) != 0 )
435 + if ( real_user_id != ROOT_UID &&
436 + strcmp( buf+5, real_user_name ) != 0 )
438 fprintf( stderr, "%s: not your job, can't do anything (%s <-> %s)\n", jfile, buf+5, real_user_name );
442 /* common things to check and prepare */
444 - /* directories and JOB files have to be readable */
446 + /* make sure people do not play umask tricks on us - the only
447 + * bits that are accepted in a user umask are "044" - permit/prevent
448 + * read access by group/other. Write access is always denied.
450 + umask( ( umask(0) & 0044 ) | 0022 );
452 /* get numeric uid/gid for fax user */
453 pw = getpwnam( FAX_OUT_USER );
454 --- mgetty-1.1.30.orig/TODO
455 +++ mgetty-1.1.30/TODO
457 246) fix "RING/<msn>" handling for i4l
459 248) include script to rotate/move log files on a regular basis
460 + (base on contrib/mvlog, move to tools/, run through sedscript for
461 + location and naming for the log files)
463 250) move prototype for time() to mgetty.h, remove everywhere else
467 257) generalize calling $(MAKE) in subdirs - put all $(MAKE) arguments
468 in one common variable
470 +261) faxrunqd: don't count "modem locked" as "failure" for a given job
471 + (but *do* delay by a certain time)
472 + (hmmm - maybe not. If all modems are locked for a long period of
473 + time, it might be useful to flag the fax as "failed" to get people to
474 + notice. Combine with 259 - should resolve problem)
476 +262) faxrunqd: smarter algorithm for "modem is broken"
477 + (locked = doesn't count, can't init = +1, NO CARRIER = +0.2)
479 +263) faxspool.rules: add sample mappings for PDF (via acroread, xpdf,
480 + recent ghostscript versions)
482 +264) faxrunqd: timeout on "hanging" sendfax processes
483 + (timeout > 15 min + 5 minutes * number of pages, or something like that)
485 +265) faxrunqd: write tty to acct.log (format change / WEB gui)
487 +260) faxrunqd: bump up priority of "exit 12" jobs
488 +266) faxunrqd: if a job fails half-way through (12), increase priority
489 + to re-send missing parts quickly
491 +267) faxrunqd: sort per-modem statistics numerically (watchout: "total")
493 +268) faxrunq+faxrunqd: have configurable counters for
494 + "send-a-warning after <x> tries, fail after <y>"
495 + have separate counter for "modem-locked"
496 + costing-failures tries-except-modem-locked total-tries
500 +269) faxrunqd: have configurable threshold for "everything is broken"
501 + -> if that threshold is reached, generate STOP file, warning e-mail,
502 + and suspend itself (like "the local in-house PABX is broken")
503 --- mgetty-1.1.30.orig/Makefile
504 +++ mgetty-1.1.30/Makefile
506 # Makefile for the mgetty fax package
508 -# SCCS-ID: $Id: Makefile,v 4.56 2002/12/16 13:08:23 gert Exp $ (c) Gert Doering
509 +# SCCS-ID: $Id: Makefile,v 4.58 2003/06/12 07:52:51 gert Exp $ (c) Gert Doering
511 # this is the C compiler to use (on SunOS, the standard "cc" does not
512 # grok my code, so please use gcc there. On ISC 4.0, use "icc".).
514 FAX_SPOOL_OUT=$(FAX_SPOOL)/outgoing
516 # the user that owns the "outgoing fax queue" (FAX_SPOOL_OUT)
517 +# this user must exist in the system, otherwise faxspool will not work!
519 # faxrunq and faxrunqd should run under this user ID, and nothing else.
520 # This user needs access to the modems of course.
522 # Nothing to change below this line ---------------------------------!
531 OBJS=mgetty.o logfile.o do_chat.o locks.o utmp.o logname.o login.o \
533 ssh home.leo.org -l doering 'cd $$HOME ; ./beta'
535 # send to Marc and Knarf
536 - head -30 ChangeLog |mail -s "mgetty$(MR).$(SR).tar.gz on greenie/alpha" knarf@camelot.de marc marcs
537 + head -30 ChangeLog |mail -s "mgetty$(MR).$(SR).tar.gz on greenie/alpha" mgetty@knarf.de marc marcs
538 # -./ftp.sh $(MR).$(SR) ftp.camelot.de /pub/incoming
539 # -./ftp.sh $(MR).$(SR) poseidon.thphy.uni-duesseldorf.de /incoming
542 # data files + directories
544 test -d $(LIBDIR) || \
545 - ( ./mkidirs $(LIBDIR) ; chmod 755 $(LIBDIR) )
546 + ( ./mkidirs $(LIBDIR) && chmod 755 $(LIBDIR) )
547 test -d $(CONFDIR) || \
548 - ( ./mkidirs $(CONFDIR); chmod 755 $(CONFDIR))
549 + ( ./mkidirs $(CONFDIR) && chmod 755 $(CONFDIR))
550 test -f $(CONFDIR)/login.config || \
551 $(INSTALL) -o root -m 600 login.config $(CONFDIR)/
552 test -f $(CONFDIR)/mgetty.config || \
553 @@ -627,17 +628,17 @@
554 # fax spool directories
556 test -d $(spool) || \
557 - ( mkdir $(spool) ; chmod 755 $(spool) )
558 + ( mkdir $(spool) && chmod 755 $(spool) )
559 test -d $(FAX_SPOOL) || \
560 - ( mkdir $(FAX_SPOOL) ; \
561 - chown $(FAX_OUT_USER) $(FAX_SPOOL) ; \
562 + ( mkdir $(FAX_SPOOL) && \
563 + chown $(FAX_OUT_USER) $(FAX_SPOOL) && \
564 chmod 755 $(FAX_SPOOL) )
565 test -d $(FAX_SPOOL_IN) || \
566 - ( mkdir $(FAX_SPOOL_IN) ; chmod 755 $(FAX_SPOOL_IN) )
567 + ( mkdir $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
568 test -d $(FAX_SPOOL_OUT) || \
569 - ( mkdir $(FAX_SPOOL_OUT) ; \
570 - chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT) ; \
571 - chmod 755 $(FAX_SPOOL_OUT) )
572 + mkdir $(FAX_SPOOL_OUT)
573 + chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT)
574 + chmod 755 $(FAX_SPOOL_OUT)
578 --- mgetty-1.1.30.orig/voice/libutil/access.c
579 +++ mgetty-1.1.30/voice/libutil/access.c
581 * exactly one unnested call to voice_desimpersonify() for each
582 * voice_impersonify() because of the static umask below.
584 - * $Id: access.c,v 1.2 1999/07/04 07:15:52 marcs Exp $
585 + * $Id: access.c,v 1.3 2003/04/23 08:49:16 gert Exp $
593 - lprintf(L_WARN, "%s: cannot set effective GID to %d",
594 - program_name, gid);
595 + lprintf(L_WARN, "%s: cannot set effective GID to %d: %s",
596 + program_name, gid, strerror(errno));
601 - lprintf(L_WARN, "%s: cannot set effective UID to %d",
602 - program_name, uid);
603 + lprintf(L_WARN, "%s: cannot set effective UID to %d: %s",
604 + program_name, uid, strerror(errno));
610 int voice_desimpersonify(void) {
611 if (seteuid(getuid())) {
612 - lprintf(L_WARN, "%s: cannot switch back to effective UID %d",
613 - program_name, getuid());
614 + lprintf(L_WARN, "%s: cannot switch back to effective UID %d: %s",
615 + program_name, getuid(), strerror(errno));
619 if (setegid(getgid())) {
620 - lprintf(L_WARN, "%s: cannot switch back to effective GID %d",
621 - program_name, getgid());
622 + lprintf(L_WARN, "%s: cannot switch back to effective GID %d: %s",
623 + program_name, getgid(), strerror(errno));
627 --- mgetty-1.1.30.orig/voice/libvoice/V253modem.c
628 +++ mgetty-1.1.30/voice/libvoice/V253modem.c
630 Hint: Recorded voice files are in .ub format (refer to the sox manpage about this) except the header.
631 So you can use this files with sox.
633 - * $Id: V253modem.c,v 1.6 2002/11/25 21:14:51 gert Exp $
634 + * $Id: V253modem.c,v 1.7 2003/01/08 22:03:18 gert Exp $
640 /* Only verifies the RMD name */
641 #define V253modem_RMD_NAME "V253modem"
642 -#define ELSA_RMD_NAME "ELSA"
643 +#define ELSA_RMD_NAME "Elsa"
644 int V253_check_rmd_adequation(char *rmd_name)
646 return !strncmp(rmd_name,
647 --- mgetty-1.1.30.orig/faxrecp.c
648 +++ mgetty-1.1.30/faxrecp.c
651 #ifdef SHORT_FILENAMES
652 sprintf(temp, "%s/f%c%07x%s.%02d", directory,
653 - fax_par_d.vr == 0? 'n': 'f',
654 + (fax_par_d.vr == 0 || fax_par_d.vr == 8) ? 'n': 'f',
655 (int) call_start & 0xfffffff,
658 /* include sender's fax id - if present - into filename */
659 sprintf(temp, "%s/f%c%07x%s-", directory,
660 - fax_par_d.vr == 0? 'n': 'f',
661 + (fax_par_d.vr == 0 || fax_par_d.vr == 8) ? 'n': 'f',
662 (int) call_start & 0xfffffff,
665 --- mgetty-1.1.30.orig/logfile.c
666 +++ mgetty-1.1.30/logfile.c
672 -# if !defined(NeXT) || defined(NEXTSGTTY)
673 -# include <varargs.h>
676 -# include <stdarg.h>
678 #include <sys/types.h>
685 +/* this must be included after ugly.h (sets USE_VARARGS on non-ANSI cc's) */
687 +# if !defined(NeXT) || defined(NEXTSGTTY)
688 +# include <varargs.h>
691 +# include <stdarg.h>
697 --- mgetty-1.1.30.orig/faxlib.c
698 +++ mgetty-1.1.30/faxlib.c
701 if ( line[ix+1] == ',' && /* +FPS:s,lc,blc */
703 - (modem_type==Mt_class2_0)?"%x,%x,%x,%x"
705 + ( modem_type == Mt_class2 ||
706 + (modem_quirks & MQ_FPS_NOT_HEX) )
709 &fhs_lc, &fhs_blc, &fhs_cblc, &fhs_lbc ) >= 2 )
711 lprintf( L_NOISE, "%d lines received, %d lines bad, %d bytes lost", fhs_lc, fhs_blc, fhs_lbc );
714 lprintf( L_MESG, "USR Courier/Sportster v32bis detected (buggy fax implementation)" );
715 modem_type=Mt_class2_0;
716 - modem_quirks |= MQ_USR_FMINSP;
717 + modem_quirks |= MQ_USR_FMINSP | MQ_FPS_NOT_HEX;
721 @@ -645,17 +647,20 @@
723 lprintf( L_MESG, "USR Courier/Sportster V.34(+) detected" );
724 modem_type=Mt_class2_0;
725 + modem_quirks |= MQ_FPS_NOT_HEX;
726 mis = mdm_get_idstring( "ATI3", 1, fd );
730 lprintf( L_MESG, "USR Courier/Sportster 56k detected" );
731 modem_type=Mt_class2_0;
732 + modem_quirks |= MQ_FPS_NOT_HEX;
733 mis = mdm_get_idstring( "ATI3", 1, fd );
736 lprintf( L_MESG, "USR I-Modem detected" );
737 modem_type=Mt_class2_0;
738 + modem_quirks |= MQ_FPS_NOT_HEX;
739 mis = mdm_get_idstring( "ATI3", 1, fd );
744 lprintf( L_MESG, "USR Courier/Sportster V90 (national variant?) detected" );
745 modem_type=Mt_class2_0;
746 + modem_quirks |= MQ_FPS_NOT_HEX;
747 mis = mdm_get_idstring( "ATI3", 1, fd );
749 /* grrr, another one of those - Bill Nugent <whn@topelo.lopi.com> */
751 modem_type=Mt_class2;
752 modem_quirks |= MQ_NEED2;
754 + else if ( strncmp( l, "LT V.92", 7 ) == 0 ) /* gert */
756 + lprintf( L_MESG, "Multitech MT5634ZBA-V92 detected" );
757 + modem_type=Mt_class2_0;
758 + modem_quirks |= MQ_FPS_NOT_HEX;
763 --- mgetty-1.1.30.orig/faxrec.c
764 +++ mgetty-1.1.30/faxrec.c
766 fprintf( pipe_fp, "\nModem device: %s\n", Device );
767 fprintf( pipe_fp, "\nCommunication parameters: %s\n", fax_param );
768 fprintf( pipe_fp, " Resolution : %s\n",
769 - fax_par_d.vr == 0? "normal" :"fine");
770 + (fax_par_d.vr == 0 || fax_par_d.vr == 8) ? "normal" :"fine");
771 fprintf( pipe_fp, " Bit Rate : %d\n", ( fax_par_d.br+1 ) * 2400 );
772 fprintf( pipe_fp, " Page Width : %d pixels\n", fax_par_d.wd == 0? 1728:
773 ( fax_par_d.wd == 1 ? 2048: 2432 ) );
774 --- mgetty-1.1.30.orig/logname.c
775 +++ mgetty-1.1.30/logname.c
778 char * ln_escape_prompt _P1( (ep), char * ep )
780 -#define MAX_PROMPT_LENGTH 140
781 +#define MAX_PROMPT_LENGTH 300
782 static char * p = NULL;
784 static struct utsname un;
789 - lprintf( L_WARN, "buffer overrun - input prompt too long" );
790 + lprintf( L_WARN, "ln_escape_prompt: input line too long - data truncated" );
794 --- mgetty-1.1.30.orig/README.1st
795 +++ mgetty-1.1.30/README.1st
798 Generic questions ("it doesn't work") should go to the mgetty mailing list
799 (mgetty@muc.de), because I just don't have time to explain it all again
801 +and again. (Un-)Subscription is done via mgetty-request@muc.de.
803 And... please do not forget that I'm doing this kind of support entirely
804 in my spare time - sometimes my answers will be very short, or it may
805 --- mgetty-1.1.30.orig/ugly.h
806 +++ mgetty-1.1.30/ugly.h
811 +/* <stdarg.h> and function(fmt,...) is incompatible with K&R protoypes */
813 +# define USE_VARARGS
818 --- mgetty-1.1.30.orig/ChangeLog
819 +++ mgetty-1.1.30/ChangeLog
821 +Wed Aug 20 12:39:53 MEST 2003 Gert Doering (gert@greenie.muc.de)
823 + * fax/faxrunqd.in: change signal handling - use HUP for graceful
824 + exit, and dump statistics to logfile upon receipt of USR2
826 +Sat Jun 28 22:14:35 MEST 2003 Gert Doering (gert@greenie.muc.de)
828 + * fax/faxq-helper.c: honour user umask when spooling G3 files
829 + (user decides whether group/other can read faxes)
831 + * fax/faxspoool.in: reset umask after creating tmpdir (with umask 077)
833 + * fax/faxq-helper.c: file name validation was overly strict -
834 + accept anything that's printable, not a space, '/' or '\'
836 +Thu Jun 12 16:56:44 MEST 2003 Gert Doering (gert@greenie.muc.de)
838 + * faxlib.c: Multitech and USR return class 2.0/2.1 +FPS:<x>,<lc>
839 + values in decimal, not hex -> change +FPS: parser to do decimal
840 + for those modems (via modem_quirks |= MQ_FPS_NOT_HEX)
842 + * fax_lib.h: add MQ_FPS_NOT_HEX modem quirk bit
844 + * faxrec.c, faxrecp.c: understand VR=8 for "normal mode" (200x100 dpi)
846 +Mon Apr 28 19:41:14 MEST 2003 Gert Doering (gert@greenie.muc.de)
848 + * logname: make "buffer overrun" error message more precise
850 +Wed Apr 23 10:49:25 MEST 2003 John R. Jackson <jrj@purdue.edu>
852 + * voice/libutil/access.c: more verbose error reporting
854 +Wed Apr 9 23:05:23 MEST 2003 Gert Doering (gert@greenie.muc.de)
856 + * fax/faxspool.in: fix spooling without header line (-h -)
858 +Sun Apr 6 16:09:14 MEST 2003 Andreas Barth <aba@not.so.argh.org>
860 + * mgetty.8in, mgetty.texi-in: document escape sequences for
861 + /etc/issue and login prompt.
863 +Wed Mar 5 21:37:38 MET 2003 Gert Doering (gert@greenie.muc.de)
865 + * Makefile: abort "make install" before installing faxspool
866 + if fax user does not exist
868 + * Makefile: unconditionally chown $FAX_SPOOL_OUT to fax user
870 +Tue Feb 4 17:46:45 MET 2003 Gert Doering (gert@greenie.muc.de)
872 + * fax/faxq-helper.c: uid=0 overrides access permission checks
874 + * fax/faxrm.in: bugfix: get faxq-helper path from sedscript
876 +Tue Jan 21 14:27:39 MET 2003 Gert Doering (gert@greenie.muc.de)
878 + * fax/faxspool.in: abort with a proper error message on input file
879 + names containing white space or quote characters
881 +Tue Jan 14 14:30:42 MET 2003 Gert Doering (gert@greenie.muc.de)
883 + * fax/faxrunqd.in: include "success" counter in per_phone_statistics
885 + * ugly.h: #define USE_VARARGS for non-Ansi C compilers
887 + * logfile.c: change #include<> sequence to catch USE_VARARGS def.
889 +Wed Jan 8 23:03:26 MET 2003 Gert Doering (gert@greenie.muc.de)
891 + * fax/faxrunqd.in: if a fax job fails, reschedule on different
892 + modem (if possible)
894 + * voice/libvoice/V253modem.c: fix ELSA_RMD_NAME (used for
895 + V.253 modem <-> other modem RMD equivalency checks)
897 Mon Dec 16 14:08:06 MET 2002 Gert Doering (gert@greenie.muc.de)
900 --- mgetty-1.1.30.orig/version.h
901 +++ mgetty-1.1.30/version.h
903 -char * mgetty_version = "experimental test release 1.1.30-Dec16";
904 +char * mgetty_version = "experimental test release 1.1.31-Sep23";
905 --- mgetty-1.1.30.orig/fax_lib.h
906 +++ mgetty-1.1.30/fax_lib.h
908 #define MQ_NO_XON 0x08 /* do not wait for XON char when sending */
909 #define MQ_USR_FMINSP 0x20 /* USR: +FCC=1,<max> sets MIN speed instead */
910 #define MQ_SHOW_NSF 0x40 /* set AT+FNR=1,1,1,1 (with NSFs) */
911 +#define MQ_FPS_NOT_HEX 0x80 /* +FPS:<status>,<lc> reported as decimal */
913 +/* note: 0x100 and 0x200 currently used for teergrubing - faxrecp.c */