1 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/support/pop ./conf/makefiles/support/pop
2 --- ../mh-6.8-dist/conf/makefiles/support/pop Sat Dec 25 16:57:49 1993
3 +++ ./conf/makefiles/support/pop Sat Jul 16 18:05:55 1994
11 xpopd: popd.o popser.o syslog.o \
20 xpopaka: popaka.o $(LIBES1)
21 $(LD) $(LDFLAGS) -o $@ popaka.o $(LDLIBS1)
29 xpopauth: popauth.o $(LIBES1)
30 $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2)
38 xpopwrd: popwrd.o $(LIBES1)
39 $(LD) $(LDFLAGS) -o $@ popwrd.o $(LDLIBS1)
47 xsmtpd: smtpd.o syslog.o
48 $(LD) $(LDFLAGS) -o $@ smtpd.o syslog.o
49 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/uip ./conf/makefiles/uip
50 --- ../mh-6.8-dist/conf/makefiles/uip Sat Dec 25 16:57:50 1993
51 +++ ./conf/makefiles/uip Sat Jul 16 18:05:55 1994
59 xali: ali.o aliasbr.o $(LIBES)
60 $(LD) $(LDFLAGS) -o $@ ali.o aliasbr.o $(LDLIBS)
68 xanno: anno.o annosbr.o $(LIBES)
69 $(LD) $(LDFLAGS) -o $@ anno.o annosbr.o $(LDLIBS)
77 xap: ap.o trmsbr.o $(LIBES)
78 $(LD) $(LDFLAGS) -o $@ ap.o trmsbr.o $(LDLIBS) $(LDCURSES)
86 xbbc: bbc.o $(PSHLIB) $(LIBES)
87 $(LD) $(LDFLAGS) -o $@ bbc.o $(PSHLIB) $(LDLIBS)
96 $(LD) $(LDFLAGS) -o $@ bbl.o $(LDLIBS)
104 xburst: burst.o $(LIBES)
105 $(LD) $(LDFLAGS) -o $@ burst.o $(LDLIBS)
113 xcipher: cipher.o $(TMALIB) $(LIBES)
114 $(LD) $(LDFLAGS) -o $@ cipher.o $(TMALIB) $(LDLIBS)
116 -@ls -l $(BINDIR)/comp
122 xcomp: comp.o whatnowproc.o \
123 whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
129 +conflict: xconflict;
131 xconflict: conflict.o aliasbr.o $(LIBES)
132 $(LD) $(LDFLAGS) -o $@ conflict.o aliasbr.o $(LDLIBS)
138 +decipher: xdecipher;
140 xdecipher: decipher.o $(TMALIB) $(LIBES)
141 $(LD) $(LDFLAGS) -o $@ decipher.o $(TMALIB) $(LDLIBS)
149 xdist: dist.o whatnowproc.o \
150 whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
158 xdp: dp.o trmsbr.o $(LIBES)
159 $(LD) $(LDFLAGS) -o $@ dp.o trmsbr.o $(LDLIBS) $(LDCURSES)
167 xfmtdump: fmtdump.o trmsbr.o $(LIBES)
168 $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS)
178 xfolder: folder.o $(LIBES)
179 $(LD) $(LDFLAGS) -o $@ folder.o $(LDLIBS)
187 xforw: forw.o whatnowproc.o \
188 whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
196 xinc: inc.o scansbr.o dropsbr.o trmsbr.o \
197 $(POPLIB) $(TMALIB) $(LIBES)
202 -install-mh: xinstall-mh
203 +install-mh: xinstall-mh;
205 xinstall-mh: install-mh.o $(LIBES)
206 $(LD) $(LDFLAGS) -o $@ install-mh.o $(LDLIBS)
214 xkdsc: kdsc.o $(KDSLIB) $(LIBES)
215 $(LD) $(LDFLAGS) -o $@ kdsc.o $(KDSLIB) $(LDLIBS)
223 xmark: mark.o $(LIBES)
224 $(LD) $(LDFLAGS) -o $@ mark.o $(LDLIBS)
233 mhlsbr.o trmsbr.o $(LIBES)
241 xmhmail: mhmail.o $(LIBES)
242 $(LD) $(LDFLAGS) -o $@ mhmail.o $(LDLIBS)
250 xmhn: mhn.o ftpsbr.o trmsbr.o $(LIBES)
251 $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \
259 xmhparam: mhparam.o trmsbr.o $(LIBES)
260 $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES)
268 xmhpath: mhpath.o $(LIBES)
269 $(LD) $(LDFLAGS) -o $@ mhpath.o $(LDLIBS)
277 xmsgchk: msgchk.o $(POPLIB) $(LIBES)
278 $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \
286 xmsh: msh.o mshcmds.o vmhsbr.o \
287 picksbr.o scansbr.o dropsbr.o mhlsbr.o trmsbr.o \
295 xpackf: packf.o dropsbr.o $(LIBES)
296 $(LD) $(LDFLAGS) -o $@ packf.o dropsbr.o $(LDLIBS)
304 xpick: pick.o picksbr.o $(LIBES)
305 $(LD) $(LDFLAGS) -o $@ pick.o picksbr.o $(LDLIBS)
313 xpopi: popi.o $(POPLIB) trmsbr.o $(LIBES)
314 $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \
323 aliasbr.o $(MTSBRS) $(TMALIB) $(LIBES)
329 +prompter: xprompter;
331 xprompter: prompter.o $(LIBES)
332 $(LD) $(LDFLAGS) -o $@ prompter.o $(LDLIBS)
340 xrcvdist: rcvdist.o distsbr.o $(LIBES)
341 $(LD) $(LDFLAGS) -o $@ rcvdist.o distsbr.o $(LDLIBS)
349 xrcvpack: rcvpack.o dropsbr.o $(LIBES)
350 $(LD) $(LDFLAGS) -o $@ rcvpack.o dropsbr.o $(LDLIBS)
356 +rcvstore: xrcvstore;
358 xrcvstore: rcvstore.o $(LIBES)
359 $(LD) $(LDFLAGS) -o $@ rcvstore.o $(LDLIBS)
367 xrcvtty: rcvtty.o scansbr.o trmsbr.o \
376 xrefile: refile.o $(LIBES)
377 $(LD) $(LDFLAGS) -o $@ refile.o $(LDLIBS)
385 xrepl: repl.o replsbr.o whatnowproc.o \
386 whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
394 xrmail: rmail.o $(LIBES)
395 $(LD) $(LDFLAGS) -o $@ rmail.o $(LDLIBS)
396 @@ -1009,7 +1009,7 @@
404 $(LD) $(LDFLAGS) -o $@ rmf.o $(LDLIBS)
405 @@ -1026,7 +1026,7 @@
413 $(LD) $(LDFLAGS) -o $@ rmm.o $(LDLIBS)
414 @@ -1043,7 +1043,7 @@
422 scansbr.o trmsbr.o $(LIBES)
423 @@ -1063,7 +1063,7 @@
431 sendsbr.o annosbr.o distsbr.o $(LIBES)
432 @@ -1089,9 +1089,9 @@
444 mhlsbr.o trmsbr.o $(LIBES)
445 @@ -1118,7 +1118,7 @@
450 +sbboards: xsbboards;
452 xsbboards: sbboards.o dropsbr.o $(LIBES)
453 $(LD) $(LDFLAGS) -o $@ sbboards.o dropsbr.o $(LDLIBS)
454 @@ -1135,7 +1135,7 @@
461 xslocal: slocal.o aliasbr.o dropsbr.o $(LIBES)
462 $(LD) $(LDFLAGS) -o $@ slocal.o aliasbr.o dropsbr.o $(LDLIBS)
463 @@ -1152,7 +1152,7 @@
470 xsortm: sortm.o $(LIBES)
471 $(LD) $(LDFLAGS) -o $@ sortm.o $(LDLIBS)
472 @@ -1172,7 +1172,7 @@
479 xspop: spop.o dropsbr.o $(LIBES)
480 $(LD) $(LDFLAGS) -o $@ spop.o dropsbr.o $(LDLIBS)
481 @@ -1193,7 +1193,7 @@
488 xspost: spost.o aliasbr.o $(LIBES)
489 $(LD) $(LDFLAGS) -o $@ spost.o aliasbr.o $(LDLIBS)
490 @@ -1213,7 +1213,7 @@
491 -@echo "Don't forget to: ln -s /usr/lib/sendmail $@"
495 +sendmail: xsendmail;
497 xsendmail: sendmail.o $(LIBES)
498 $(LD) $(LDFLAGS) -o $@ sendmail.o $(LDLIBS)
499 @@ -1230,7 +1230,7 @@
506 xtma: tma.o $(TMALIB) $(LIBES)
507 $(LD) $(LDFLAGS) -o $@ tma.o $(TMALIB) $(LDLIBS)
508 @@ -1247,7 +1247,7 @@
515 xumhook: umhook.o $(LIBES)
516 $(LD) $(LDFLAGS) -o $@ umhook.o $(LDLIBS) $(LDCURSES)
517 @@ -1264,7 +1264,7 @@
524 xvmh: vmh.o vmhsbr.o $(LIBES)
525 $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS)
526 @@ -1285,7 +1285,7 @@
533 xwhatnow: whatnow.o \
534 whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
535 @@ -1305,7 +1305,7 @@
542 xwhom: whom.o distsbr.o $(LIBES)
543 $(LD) $(LDFLAGS) -o $@ whom.o distsbr.o $(LDLIBS)
544 @@ -1322,7 +1322,7 @@
551 xwmh: wmh.o vmhsbr.o $(LIBES)
552 ${CC} $(LDFLAGS) -o $@ wmh.o vmhsbr.o $(LDLIBS) \
553 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/h/strings.h ./h/strings.h
554 --- ../mh-6.8-dist/h/strings.h Sat Dec 25 16:57:50 1993
555 +++ ./h/strings.h Sat Jul 16 18:05:55 1994
559 #define bcmp(b1,b2,length) memcmp(b1, b2, length)
561 #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length)
563 #define bcpy(b1,b2,length) memcmp (b1, b2, length)
564 #define bzero(b,length) (void) memset (b, 0, length)
566 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/discard.c ./sbr/discard.c
567 --- ../mh-6.8-dist/sbr/discard.c Sat Dec 25 16:57:51 1993
568 +++ ./sbr/discard.c Sat Jul 16 18:11:18 1994
573 +#ifdef _STDIO_USES_IOSTREAM
574 + io -> _IO_write_ptr = io -> _IO_write_base;
576 if (io -> _ptr = io -> _base)
579 +#endif /* _STDIO_USES_IOSTREAM */
581 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/m_getfld.c ./sbr/m_getfld.c
582 --- ../mh-6.8-dist/sbr/m_getfld.c Sat Dec 25 16:57:51 1993
583 +++ ./sbr/m_getfld.c Sat Jul 16 18:10:23 1994
584 @@ -244,22 +244,40 @@
586 cp = name; i = NAMESZ - 1;
588 +#ifdef _STDIO_USES_IOSTREAM
589 + bp = sp = (unsigned char *) iob->_IO_read_ptr - 1;
590 + j = (cnt = ((long) iob->_IO_read_end - (long) iob->_IO_read_ptr) + 1) < i?
593 bp = sp = (unsigned char *) iob->_ptr - 1;
594 j = (cnt = iob->_cnt+1) < i ? cnt : i;
596 while ((c = *bp++) != ':' && c != '\n' && --j >= 0)
600 if ((cnt -= j) <= 0) {
601 +#ifdef _STDIO_USES_IOSTREAM
602 + iob->_IO_read_ptr = iob->_IO_read_end;
603 + if (__underflow(iob) == EOF) {
605 if (_filbuf(iob) == EOF) {
608 advise (NULLCP, "eof encountered in field \"%s\"",
612 +#ifdef _STDIO_USES_IOSTREAM
613 + iob->_IO_read_ptr++; /* NOT automatic in __underflow()! */
616 +#ifdef _STDIO_USES_IOSTREAM
617 + iob->_IO_read_ptr = bp + 1;
625 @@ -298,16 +316,27 @@
627 cp = buf; i = bufsz-1;
629 +#ifdef _STDIO_USES_IOSTREAM
630 + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
631 + bp = (unsigned char *) --iob->_IO_read_ptr;
633 cnt = iob->_cnt++; bp = (unsigned char *) --iob->_ptr;
635 c = cnt < i ? cnt : i;
636 while (ep = locc( c, bp, '\n' )) {
638 * if we hit the end of this field, return.
640 if ((j = *++ep) != ' ' && j != '\t') {
641 +#ifdef _STDIO_USES_IOSTREAM
642 + j = ep - (unsigned char *) iob->_IO_read_ptr;
643 + (void) bcopy( iob->_IO_read_ptr, cp, j);
644 + iob->_IO_read_ptr = ep;
646 j = ep - (unsigned char *) iob->_ptr;
647 (void) bcopy( iob->_ptr, cp, j);
648 iob->_ptr = ep; iob->_cnt -= j;
653 @@ -317,12 +346,21 @@
655 * end of input or dest buffer - copy what we've found.
657 +#ifdef _STDIO_USES_IOSTREAM
658 + c += bp - (unsigned char *) iob->_IO_read_ptr;
659 + (void) bcopy( iob->_IO_read_ptr, cp, c);
661 c += bp - (unsigned char *) iob->_ptr;
662 (void) bcopy( iob->_ptr, cp, c);
666 /* the dest buffer is full */
667 +#ifdef _STDIO_USES_IOSTREAM
668 + iob->_IO_read_ptr += c;
670 iob->_cnt -= c; iob->_ptr += c;
675 @@ -333,11 +371,22 @@
676 * this is the end of the field. Otherwise loop.
679 +#ifdef _STDIO_USES_IOSTREAM
680 + *cp++ = j = *(iob->_IO_read_ptr + c);
681 + iob->_IO_read_ptr = iob->_IO_read_end;
682 + c = __underflow(iob);
683 + iob->_IO_read_ptr++; /* NOT automatic! */
685 *cp++ = j = *(iob->_ptr + c);
688 if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') {
690 +#ifdef _STDIO_USES_IOSTREAM
691 + --iob->_IO_read_ptr;
693 --iob->_ptr, ++iob->_cnt;
699 * the output buffer and we don't add an eos.
701 i = (bufsz < 0) ? -bufsz : bufsz-1;
702 +#ifdef _STDIO_USES_IOSTREAM
703 + bp = (unsigned char *) --iob->_IO_read_ptr;
704 + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
706 bp = (unsigned char *) --iob->_ptr; cnt = ++iob->_cnt;
708 c = (cnt < i ? cnt : i);
709 if (msg_style != MS_DEFAULT && c > 1) {
714 (void) bcopy( bp, buf, c );
715 +#ifdef _STDIO_USES_IOSTREAM
716 + iob->_IO_read_ptr += c;
724 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/support/pop/popd.c ./support/pop/popd.c
725 --- ../mh-6.8-dist/support/pop/popd.c Sat Dec 25 16:57:51 1993
726 +++ ./support/pop/popd.c Sat Jul 16 18:05:56 1994
730 extern char *sys_errlist[];
732 extern char *sys_siglist[];
740 (void) signal (SIGCHLD, chldser);
743 +/* No limit on the number of connections? this seems wrong... */
746 (void) listen (sd, SOMAXCONN);
749 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/inc.c ./uip/inc.c
750 --- ../mh-6.8-dist/uip/inc.c Sat Dec 25 16:57:51 1993
751 +++ ./uip/inc.c Sat Jul 16 18:05:56 1994
752 @@ -384,17 +384,23 @@
757 - return_gid = getegid(); /* Save effective gid, assuming we'll use it */
758 - setgid(getgid()); /* Turn off extraordinary privileges */
759 -#endif /* MAILGROUP */
764 if (from || !host || rpop <= 0)
765 (void) setuid (getuid ());
769 + * 93/12/17 bsa@kf8nh.wariat.org relocated: with MAILGROUP and POP both defined
770 + * the setgid() call ran as root, and saved gid would be lost. If the setuid()
771 + * call above then ran, inc would be unable to reestablish its setgid state.
774 + return_gid = getegid(); /* Save effective gid, assuming we'll use it */
775 + setgid(getgid()); /* Turn off extraordinary privileges */
776 +#endif /* MAILGROUP */
781 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/popi.c ./uip/popi.c
782 --- ../mh-6.8-dist/uip/popi.c Sat Dec 25 16:57:51 1993
783 +++ ./uip/popi.c Sat Jul 16 18:05:57 1994
787 static int dselect (d)
789 +register struct dirent *d;
791 register struct direct *d;
799 static int dcompar (d1, d2)
815 + struct dirent **namelist;
817 struct direct **namelist;
820 if (chdir (bulksw) == NOTOK)
821 adios (bulksw, "unable to change directory to");
825 for (i = 0; i < n; i++) {
827 + register struct dirent *d = namelist[i];
829 register struct direct *d = namelist[i];
833 if (rp_isbad (retval = sm_init (NULLCP, host, 1, 1, snoop)))
834 @@ -630,13 +647,21 @@
839 + struct dirent **newlist;
841 struct direct **newlist;
844 while ((l = scandir (".", &newlist, dselect, dcompar)) > OK) {
847 for (j = 0; j < l; j++) {
849 + register struct dirent *d = newlist[j];
851 register struct direct *d = newlist[j];
854 for (i = 0; i < n; i++)
855 if (strcmp (d -> d_name, namelist[i] -> d_name) == 0)
856 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/sbboards.c ./uip/sbboards.c
857 --- ../mh-6.8-dist/uip/sbboards.c Sat Dec 25 16:57:51 1993
858 +++ ./uip/sbboards.c Sat Jul 16 18:05:57 1994
865 +/* FIXME - who should be doing this? With what option? */
866 +#include <sys/types.h>
871 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/scansbr.c ./uip/scansbr.c
872 --- ../mh-6.8-dist/uip/scansbr.c Sat Dec 25 16:57:51 1993
873 +++ ./uip/scansbr.c Sat Jul 16 18:10:56 1994
874 @@ -238,14 +238,25 @@
877 while (state == BODY) {
878 +#ifdef _STDIO_USES_IOSTREAM
879 + if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
881 if (scnout->_cnt <= 0) {
883 if (fflush(scnout) == EOF)
884 adios (scnmsg, "write error on");
886 +#ifdef _STDIO_USES_IOSTREAM
887 + state = m_getfld(state, name, scnout->_IO_write_ptr,
888 + (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end,
890 + scnout->_IO_write_ptr += msg_count;
892 state = m_getfld( state, name, scnout->_ptr,
893 -(scnout->_cnt), inb );
894 scnout->_cnt -= msg_count;
895 scnout->_ptr += msg_count;
900 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/spop.c ./uip/spop.c
901 --- ../mh-6.8-dist/uip/spop.c Sat Dec 25 16:57:51 1993
902 +++ ./uip/spop.c Sat Jul 16 18:05:57 1994
908 +/* FIXME - who should be doing this? With what option? */
909 +#include <sys/types.h>
914 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/vmh.c ./uip/vmh.c
915 --- ../mh-6.8-dist/uip/vmh.c Sat Dec 25 16:57:52 1993
916 +++ ./uip/vmh.c Sat Jul 16 18:05:57 1994
918 * means "AT&T line discipline" (termio, not sgttyb), whereas terminfo
919 * is quite a separate issue.
927 Pass signals to client during execution
929 #if !defined(SYS5) && !defined(BSD44)
931 #endif /* not SYS5 */
933 +static int _putchar (c) int c; { putchar (c); }
938 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/zotnet/mts/lock.c ./zotnet/mts/lock.c
939 --- ../mh-6.8-dist/zotnet/mts/lock.c Sat Dec 25 16:57:52 1993
940 +++ ./zotnet/mts/lock.c Sat Jul 16 18:05:57 1994
942 #include <sys/types.h>
943 #include <sys/stat.h>