aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2001-10-16 23:51:18 +0000
committerMikhail Teterin <mi@FreeBSD.org>2001-10-16 23:51:18 +0000
commit1d8175b261ef042fb0f1fb93b505d60c5dbf90ff (patch)
tree0d6ddacb1af53f8f66cee6de50cfca7e78409d9f /comms
parent141a5778f16721355d0f8f63b91e80acf57d24a8 (diff)
downloadports-1d8175b261ef042fb0f1fb93b505d60c5dbf90ff.tar.gz
ports-1d8175b261ef042fb0f1fb93b505d60c5dbf90ff.zip
Notes
Diffstat (limited to 'comms')
-rw-r--r--comms/hylafax/Makefile38
-rw-r--r--comms/hylafax/distinfo3
-rw-r--r--comms/hylafax/files/patch-0014
-rw-r--r--comms/hylafax/files/patch-aa73
-rw-r--r--comms/hylafax/files/patch-ab48
-rw-r--r--comms/hylafax/files/patch-ac12
-rw-r--r--comms/hylafax/files/patch-ad260
-rw-r--r--comms/hylafax/files/patch-ae135
-rw-r--r--comms/hylafax/files/patch-af12
-rw-r--r--comms/hylafax/files/patch-ag69
-rw-r--r--comms/hylafax/files/patch-ai12
-rw-r--r--comms/hylafax/files/patch-aj345
-rw-r--r--comms/hylafax/files/patch-sec122
-rw-r--r--comms/hylafax/pkg-message3
-rw-r--r--comms/hylafax/pkg-plist243
15 files changed, 155 insertions, 1134 deletions
diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index 1e4fa64185a7..ccc7b13ca281 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -6,15 +6,9 @@
#
PORTNAME= hylafax
-PORTVERSION= 4.1.b2
-PORTREVISION= 2
+PORTVERSION= 4.1
CATEGORIES= comms
MASTER_SITES= ftp://ftp.hylafax.org/source/
-DISTNAME= ${PORTNAME}-4.1beta2
-
-PATCH_SITES= http://www.hylafax.org/patches/
-PATCHFILES= tiff-3.5-interfaces.patch cvtDateTime.patch
-PATCH_DIST_STRIP= -p0
MAINTAINER= ports@FreeBSD.org
@@ -32,20 +26,29 @@ CONFIGURE_ARGS= --with-INSTALL="" \
--with-LIBTIFF="-L${LOCALBASE}/lib -ltiff -ljpeg" \
--with-ZLIB=no --with-LIBZ=-lz --with-ZLIBINC=none \
--with-TIFFINC="${LOCALBASE}/include" \
+ --with-GCOPTS=" " --with-GCXXOPTS=" " \
--with-REGEX=no --with-LIBREGEX='' --with-REGEXINC=none
+.ifdef PACKAGE_BUILDING
+CONFIGURE_ARGS+=--nointeractive
+.endif
+MAKE_ARGS+= OPTIMIZER="" -EOPTIMIZER
+
HAS_CONFIGURE= yes
CONFIGURE_ENV= ENVOPTS="${CFLAGS}"
-MAN1= hylafax.1 faxalter.1 faxcover.1 faxmail.1 faxrm.1 faxstat.1 sendfax.1 \
+MAN1= hylafax-client.1 faxalter.1 faxcover.1 faxmail.1 \
+ faxrm.1 faxstat.1 sendfax.1 \
sendpage.1 sgi2fax.1 textfmt.1
MAN5= pagesizes.5f typerules.5f hosts.hfaxd.5f xferfaxlog.5f \
- hylafax.5f cid.5f config.5f destctrls.5f dialrules.5f info.5f \
- log.5f pagermap.5f recvq.5f sendq.5f shutdown.5f status.5f tsi.5f
+ cid.5f doneq.5f hylafax-config.5f destctrls.5f dialrules.5f \
+ hylafax-info.5f hylafax-log.5f pagermap.5f recvq.5f sendq.5f \
+ hylafax-server.5f hylafax-shutdown.5f status.5f tsi.5f
MAN8= cqtest.8c choptest.8c dialtest.8c faxabort.8c faxaddmodem.8c \
faxadduser.8c faxanswer.8c faxconfig.8c faxdeluser.8c faxmodem.8c \
faxstate.8c faxcron.8c faxgetty.8c faxinfo.8c faxq.8c faxqclean.8c \
faxquit.8c faxrcvd.8c faxsend.8c faxsetup.8c faxwatch.8c hfaxd.8c \
- mkcover.8c notify.8c pagesend.8c pollrcvd.8c ps2fax.8c recvstats.8c \
+ mkcover.8c notify.8c pagesend.8c pdf2fax.8c pollrcvd.8c ps2fax.8c \
+ recvstats.8c \
tagtest.8c tiff2fax.8c tiffcheck.8c tsitest.8c wedged.8c \
xferfaxstats.8c
@@ -55,12 +58,21 @@ SUID_EXES= ${PREFIX}/sbin/faxgetty ${PREFIX}/sbin/faxq \
post-extract:
${RM} -rf ${WRKSRC}/zlib ${WRKSRC}/regex
+.if ${LOCALBASE} != "/usr/local"
+post-patch:
+ ${PERL} -pi -e 's^/usr/local^${LOCALBASE}^g' \
+ `find work/hylafax-4.1 -type f -print0 | \
+ xargs -0 fgrep -l --mmap /usr/local`
+.endif
+
post-install:
${CHOWN} uucp ${SUID_EXES}
${CHMOD} 4555 ${SUID_EXES}
@if [ ! -f ${PREFIX}/etc/rc.d/hylafax.sh.sample ]; then \
- ${CP} ${FILESDIR}/hylafax.sh.sample ${PREFIX}/etc/rc.d; \
+ ${SED} 's^/usr/local^${PREFIX}^g' \
+ < ${FILESDIR}/hylafax.sh.sample \
+ > ${PREFIX}/etc/rc.d/hylafax.sh.sample; \
fi
- ${CAT} ${PKGMESSAGE}
+ @${SED} 's^/usr/local^${PREFIX}^g' < ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/comms/hylafax/distinfo b/comms/hylafax/distinfo
index dac7d83400c1..dfa83575d1a6 100644
--- a/comms/hylafax/distinfo
+++ b/comms/hylafax/distinfo
@@ -1,3 +1,4 @@
-MD5 (hylafax/hylafax-4.1beta2.tar.gz) = d8560726e4f75093b9d6c7d1403694ce
+MD5 (hylafax/hylafax-4.1.tar.gz) = d8a60dcddb4bcfd67c494aee89d036e7
MD5 (hylafax/tiff-3.5-interfaces.patch) = c1d2847c9967a10961bb7fe123ecd8e6
MD5 (hylafax/cvtDateTime.patch) = 57b2d1218e83504c85cf31c1e3746e4e
+MD5 (hylafax/rings-cid-passing.patch) = ade1d9adc9dd236e45176b7a0e3b5d78
diff --git a/comms/hylafax/files/patch-00 b/comms/hylafax/files/patch-00
deleted file mode 100644
index b3c630169190..000000000000
--- a/comms/hylafax/files/patch-00
+++ /dev/null
@@ -1,14 +0,0 @@
---- etc/faxsetup.sh.in.ORI Wed Jul 19 21:05:13 2000
-+++ etc/faxsetup.sh.in Wed Jul 19 21:06:23 2000
-@@ -1671,8 +1671,8 @@
- true
- fi
- else
-- $FAXQ_SERVER=0
-- $HFAXD_SERVER=0
-+ FAXQ_SERVER=0
-+ HFAXD_SERVER=0
- fi
- if [ -f "$INETDCONF" -a $HFAXD_SERVER -eq 0 ]; then
- E="hylafax stream tcp nowait $FAX $DIR_LIBEXEC/hfaxd hfaxd -I"
-
diff --git a/comms/hylafax/files/patch-aa b/comms/hylafax/files/patch-aa
deleted file mode 100644
index 714f015fe18f..000000000000
--- a/comms/hylafax/files/patch-aa
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -ruN config/skel.orig config/skel
---- config/skel.orig Sun Jan 10 01:09:38 1999
-+++ config/skel Mon Jun 12 21:59:13 2000
-@@ -41,8 +41,8 @@
- SessionTracing: 11 # log server-related operations
- RecvFileMode: 0600 # recvd facsimile are not public
- LogFileMode: 0600 # private log files
--DeviceMode: 0600 # device is accessible only to uucp/fax
--GettyArgs: "-h %l dx_%s" # requires modem to auto-detect fax/data
-+DeviceMode: 0660 # device is accessible only to uucp/fax
-+GettyArgs: "std.%s" # requires modem to auto-detect fax/data
- QualifyTSI: "" # do not restrict inbound facsimile
- SpeakerVolume: off # machine's are already too loud
- RingsBeforeAnswer: 1 # answer on first ring
-diff -ruN configure.orig configure
---- configure.orig Mon Jul 26 07:57:29 1999
-+++ configure Mon Jun 12 22:07:43 2000
-@@ -247,7 +247,7 @@
- test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
- test -d /usr/contrib/bin && PATH=$PATH:/usr/contrib/bin # BSDi
- test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
--test -d /usr/local/bin && PATH=/usr/local/bin:$PATH # for GNU stuff
-+test -d /usr/local/bin && PATH=$PATH:/usr/local/bin # for GNU stuff
- PATH=$PATH:$OPATH
-
- POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions
-@@ -2312,6 +2312,8 @@
- case $TARGET in
- # XXX fill in for busted systems
- *-univel-*) CONFIG_SOCKARGLENTYPE=size_t;;
-+ *-freebsd4*) CONFIG_SOCKARGLENTYPE=u_int32_t;;
-+ *-freebsd5*) CONFIG_SOCKARGLENTYPE=u_int32_t;;
- *sysv4.2uw2*) CONFIG_SOCKARGLENTYPE=size_t;;
- *-UnixWare*) CONFIG_SOCKARGLENTYPE=size_t;;
- *-aix4*) CONFIG_SOCKARGLENTYPE=size_t;;
-@@ -2865,7 +2867,7 @@
- printf("old include files: version %u\n", TIFFLIB_VERSION);
- exit(-1);
- }
-- if (strncmp(TIFFGetVersion(), "LIBTIFF, Version 3.4", 20) != 0) {
-+ if (strncmp(TIFFGetVersion(), "LIBTIFF, Version 3.5", 20) != 0) {
- printf("old library: version %s\n", TIFFGetVersion());
- exit(-1);
- } else
-@@ -3591,10 +3593,14 @@
- return 0
- }
-
--if [ -z "$FONTMAP" ]; then
-- FONTMAP=`getGSFonts`
--fi
--Note "Setting the Fontmap path to $FONTMAP"
-+case $TARGET in
-+ *-freebsd*) PATH_AFM=/usr/local/lib/afm ;;
-+ *) if [ -z "$FONTMAP" ]; then
-+ FONTMAP=`getGSFonts`;
-+ fi
-+ Note "Setting the Fontmap path to $FONTMAP";;
-+esac
-+
-
- #
- # Location of Adobe Font Metric files.
-@@ -4044,7 +4050,8 @@
- printConfig
- checkForExecutable $PATH_SENDMAIL
- checkForExecutable $PATH_GETTY
-- prompt "Are these ok [yes]?"; read ok
-+ #prompt "Are these ok [yes]?"; read ok
-+ ok=yes
- test -z "$ok" && ok=yes
- case "$ok" in
- [1-9]|1[0-6]) promptForParameter $ok;;
diff --git a/comms/hylafax/files/patch-ab b/comms/hylafax/files/patch-ab
deleted file mode 100644
index 971ec8648ad8..000000000000
--- a/comms/hylafax/files/patch-ab
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -ruN etc/faxsetup.sh.in.orig etc/faxsetup.sh.in
---- etc/faxsetup.sh.in.orig Thu Aug 5 04:11:42 1999
-+++ etc/faxsetup.sh.in Mon Jun 12 21:52:46 2000
-@@ -1660,7 +1660,7 @@
- #
- if onServer; then
- signalINETD=no
-- if [ -f $SYSVINIT ]; then
-+ if [ -f "$SYSVINIT" ]; then
- # started by init at boot time
- if [ $FAXQ_SERVER -eq 0 ]; then
- cat <<EOF
-@@ -1674,7 +1674,7 @@
- $FAXQ_SERVER=0
- $HFAXD_SERVER=0
- fi
-- if [ -f $INETDCONF -a $HFAXD_SERVER -eq 0 ]; then
-+ if [ -f "$INETDCONF" -a $HFAXD_SERVER -eq 0 ]; then
- E="hylafax stream tcp nowait $FAX $DIR_LIBEXEC/hfaxd hfaxd -I"
- editInetdConf()
- {
-@@ -1753,7 +1753,7 @@
- isOK "$x" && editInetdConf
- fi
- fi
-- elif [ ! -f $INETDCONF -a $HFAXD_SERVER -eq 0 ]; then
-+ elif [ ! -f "$INETDCONF" -a $HFAXD_SERVER -eq 0 ]; then
- cat<<EOF
-
-
-@@ -1775,7 +1775,7 @@
- #
- if onServer; then
- x=`(ypcat -k aliases) 2>/dev/null | $GREP -i '^faxmaster'` 2>/dev/null
-- if [ -z "$x" -a -f $ALIASES ]; then
-+ if [ -z "$x" -a -f "$ALIASES" ]; then
- x=`$GREP -i '^faxmaster' $ALIASES`
- fi
- if [ -z "$x" ]; then
-@@ -2160,7 +2160,7 @@
- prompt "Should I restart the HylaFAX server processes [yes]?"; read x
- if isOK "$x"; then
- echo ""
-- if [ -x $SYSVINIT ]; then
-+ if [ -x "$SYSVINIT" ]; then
- echo $SYSVINIT start
- $SYSVINIT start
- else
diff --git a/comms/hylafax/files/patch-ac b/comms/hylafax/files/patch-ac
deleted file mode 100644
index 5cdf85ba2edd..000000000000
--- a/comms/hylafax/files/patch-ac
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN faxalter/faxalter.c++.orig faxalter/faxalter.c++
---- faxalter/faxalter.c++.orig Sun Jun 13 00:40:58 1999
-+++ faxalter/faxalter.c++ Mon Jun 12 21:52:37 2000
-@@ -185,7 +185,7 @@
- va_list ap;
- va_start(ap, fmt0);
- char fmt[1024];
-- sprintf(fmt, "%s %s\n", groups ? "JGPARM" : "JPARM", fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s %s\n", groups ? "JGPARM" : "JPARM", fmt0);
- script.append(fxStr::vformat(fmt, ap));
- va_end(ap);
- }
diff --git a/comms/hylafax/files/patch-ad b/comms/hylafax/files/patch-ad
deleted file mode 100644
index 4b89dab9bf90..000000000000
--- a/comms/hylafax/files/patch-ad
+++ /dev/null
@@ -1,260 +0,0 @@
-diff -ruN faxd/ClassModem.c++.orig faxd/ClassModem.c++
---- faxd/ClassModem.c++.orig Sun Jun 13 00:41:02 1999
-+++ faxd/ClassModem.c++ Mon Jun 12 21:52:37 2000
-@@ -169,7 +169,7 @@
- {
- protoTrace("DIAL %s", number);
- char buf[256];
-- sprintf(buf, (const char*) conf.dialCmd, number);
-+ snprintf(buf, sizeof(buf), (const char*) conf.dialCmd, number);
- emsg = "";
- CallStatus cs = (atCmd(buf, AT_NOTHING) ? dialResponse(emsg) : FAILURE);
- if (cs != OK && emsg == "")
-diff -ruN faxd/FaxMachineLog.c++.orig faxd/FaxMachineLog.c++
---- faxd/FaxMachineLog.c++.orig Mon Oct 12 13:47:49 1998
-+++ faxd/FaxMachineLog.c++ Mon Jun 12 21:52:37 2000
-@@ -75,9 +75,13 @@
- int oerrno = errno; // save errno on entry
- char buf[16*1024];
- timeval tv;
-+ int len;
-+
- (void) gettimeofday(&tv, 0);
- strftime(buf, sizeof (buf), "%h %d %T", localtime((time_t*) &tv.tv_sec));
-- sprintf(buf+strlen(buf), ".%02u: [%5d]: ", tv.tv_usec / 10000, pid);
-+ len = strlen(buf);
-+ snprintf(buf+len, sizeof(buf) - len, ".%02u: [%5d]: ",
-+ tv.tv_usec / 10000, pid);
- /*
- * Copy format string into a local buffer so
- * that we can substitute for %m, a la syslog.
-@@ -96,6 +100,7 @@
- fmt.put(fp[0]);
- }
- fmt.put('\n'); fmt.put('\0');
-- vsprintf(buf+strlen(buf), (const char*) fmt, ap);
-+ len = strlen(buf);
-+ vsnprintf(buf+len, sizeof(buf) - len, (const char*) fmt, ap);
- (void) Sys::write(fd, buf, strlen(buf));
- }
-diff -ruN faxd/FaxRecv.c++.orig faxd/FaxRecv.c++
---- faxd/FaxRecv.c++.orig Sun Jun 13 00:41:03 1999
-+++ faxd/FaxRecv.c++ Mon Jun 12 21:52:37 2000
-@@ -139,7 +139,7 @@
- * number file to reflect the allocation.
- */
- (void) flock(ftmp, LOCK_EX|LOCK_NB);
-- sprintf(line, "%u", seqnum);
-+ snprintf(line, sizeof(line), "%u", seqnum);
- (void) lseek(fseqf, 0, SEEK_SET);
- if (Sys::write(fseqf, line, strlen(line)) != strlen(line) ||
- ftruncate(fseqf,strlen(line))) {
-diff -ruN faxd/FaxRequest.c++.orig faxd/FaxRequest.c++
---- faxd/FaxRequest.c++.orig Sun Jun 13 00:41:03 1999
-+++ faxd/FaxRequest.c++ Mon Jun 12 21:52:38 2000
-@@ -679,7 +679,8 @@
- FaxRequest::error(const char* fmt0 ...)
- {
- char fmt[128];
-- sprintf(fmt, "%s: line %u: %s", (const char*) qfile, (u_int) lineno, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: line %u: %s", (const char*) qfile,
-+ (u_int) lineno, fmt0);
- va_list ap;
- va_start(ap, fmt0);
- vlogError(fmt, ap);
-diff -ruN faxd/Getty.c++.orig faxd/Getty.c++
---- faxd/Getty.c++.orig Sun Jun 13 00:41:03 1999
-+++ faxd/Getty.c++ Mon Jun 12 21:54:22 2000
-@@ -218,7 +218,7 @@
- // NB: this is executed in the parent
- fxStr device = fxStr::format("%s/" | line, _PATH_DEV);
- Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
-- Sys::chmod(device, 0600); // reset protection
-+ Sys::chmod(device, 0660); // reset protection
- }
-
- extern void vlogError(const char* fmt, va_list ap);
-diff -ruN faxd/ModemServer.c++.orig faxd/ModemServer.c++
---- faxd/ModemServer.c++.orig Sun Jun 13 00:41:04 1999
-+++ faxd/ModemServer.c++ Mon Jun 12 21:52:38 2000
-@@ -324,7 +324,7 @@
- if (seteuid(0) >= 0) { // must be done as root
- const SchedInfo& si = schedInfo[s];
- pcinfo_t pcinfo;
-- strcpy(pcinfo.pc_clname, si.clname);
-+ strlcpy(pcinfo.pc_clname, si.clname, sizeof(pcinfo.pc_clname));
- if (priocntl((idtype_t)0, 0, PC_GETCID, (caddr_t)&pcinfo) >= 0) {
- pcparms_t pcparms;
- pcparms.pc_cid = pcinfo.pc_cid;
-@@ -604,7 +604,7 @@
- } while (ftmp < 0 && errno == EEXIST && --ntry >= 0);
- umask(omask);
- if (ftmp >= 0) {
-- sprintf(line, "%u", seqnum);
-+ snprintf(line, sizeof(line), "%u", seqnum);
- (void) lseek(fseqf, 0, SEEK_SET);
- if (Sys::write(fseqf, line, strlen(line)) != strlen(line) ||
- ftruncate(fseqf,strlen(line)))
-@@ -806,7 +806,7 @@
- va_list ap;
- va_start(ap, fmt0);
- char fmt[256];
-- sprintf(fmt, "MODEM %s", fmt0);
-+ snprintf(fmt, sizeof(fmt), "MODEM %s", fmt0);
- vtraceStatus(FAXTRACE_MODEMOPS, fmt, ap);
- va_end(ap);
- }
-diff -ruN faxd/ServerConfig.c++.orig faxd/ServerConfig.c++
---- faxd/ServerConfig.c++.orig Sun Jun 13 00:41:04 1999
-+++ faxd/ServerConfig.c++ Mon Jun 12 21:52:38 2000
-@@ -373,9 +373,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogError(fmt, ap);
- }
-
-@@ -384,9 +384,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogWarning(fmt, ap);
- }
-
-diff -ruN faxd/UUCPLock.c++.orig faxd/UUCPLock.c++
---- faxd/UUCPLock.c++.orig Sun Jun 13 00:41:05 1999
-+++ faxd/UUCPLock.c++ Mon Jun 12 21:56:52 2000
-@@ -37,6 +37,7 @@
- }
- #endif
- #include <pwd.h>
-+#include <grp.h>
-
- /*
- * UUCP Device Locking Support.
-@@ -148,6 +149,13 @@
- UUCPuid = pwd->pw_uid;
- UUCPgid = pwd->pw_gid;
- endpwent(); // paranoia
-+
-+
-+ const group *grp = getgrnam("dialer");
-+ if (!grp)
-+ faxApp::fatal("Can not deduce identity of DIALER");
-+ UUCPgid = grp->gr_gid;
-+ endgrent(); // paranoia
- }
- }
- uid_t UUCPLock::getUUCPUid() { setupIDs(); return UUCPuid; }
-diff -ruN faxd/faxApp.c++.orig faxd/faxApp.c++
---- faxd/faxApp.c++.orig Sun Jun 13 00:41:05 1999
-+++ faxd/faxApp.c++ Mon Jun 12 21:52:39 2000
-@@ -231,7 +231,7 @@
- logError("fcntl: %m");
- }
- char msg[4096];
-- vsprintf(msg, fmt, ap);
-+ vsnprintf(msg, sizeof(msg), fmt, ap);
- u_int len = strlen(msg)+1;
- if (Sys::write(faxqfifo, msg, len) != len) {
- if (errno == EBADF || errno == EPIPE) // reader expired
-@@ -263,7 +263,7 @@
- faxApp::sendModemStatus(const char* devid, const char* fmt0 ...)
- {
- char fmt[2*1024];
-- sprintf(fmt, "+%s:%s", devid, fmt0);
-+ snprintf(fmt, sizeof(fmt), "+%s:%s", devid, fmt0);
- va_list ap;
- va_start(ap, fmt0);
- bool ok = vsendQueuer(fmt, ap);
-@@ -278,7 +278,7 @@
- faxApp::sendJobStatus(const char* jobid, const char* fmt0 ...)
- {
- char fmt[2*1024];
-- sprintf(fmt, "*%s:%s", jobid, fmt0);
-+ snprintf(fmt, sizeof(fmt), "*%s:%s", jobid, fmt0);
- va_list ap;
- va_start(ap, fmt0);
- bool ok = vsendQueuer(fmt, ap);
-@@ -293,7 +293,7 @@
- faxApp::sendRecvStatus(const char* devid, const char* fmt0 ...)
- {
- char fmt[2*1024];
-- sprintf(fmt, "@%s:%s", devid, fmt0);
-+ snprintf(fmt, sizeof(fmt), "@%s:%s", devid, fmt0);
- va_list ap;
- va_start(ap, fmt0);
- bool ok = vsendQueuer(fmt, ap);
-diff -ruN faxd/faxQueueApp.c++.orig faxd/faxQueueApp.c++
---- faxd/faxQueueApp.c++.orig Sat Jul 10 07:23:05 1999
-+++ faxd/faxQueueApp.c++ Mon Jun 12 21:52:39 2000
-@@ -971,10 +971,10 @@
- * -m <maxpages> max pages to generate
- * -1|-2 1d or 2d encoding
- */
-- char rbuf[20]; sprintf(rbuf, "%u", params.verticalRes());
-- char wbuf[20]; sprintf(wbuf, "%u", params.pageWidth());
-- char lbuf[20]; sprintf(lbuf, "%d", params.pageLength());
-- char mbuf[20]; sprintf(mbuf, "%u", dci.getMaxSendPages());
-+ char rbuf[20]; snprintf(rbuf, sizeof(rbuf), "%u", params.verticalRes());
-+ char wbuf[20]; snprintf(wbuf, sizeof(wbuf), "%u", params.pageWidth());
-+ char lbuf[20]; snprintf(lbuf, sizeof(lbuf), "%d", params.pageLength());
-+ char mbuf[20]; snprintf(mbuf, sizeof(mbuf), "%u", dci.getMaxSendPages());
- const char* argv[30];
- int ac = 0;
- switch (req.op) {
-@@ -2726,9 +2726,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogError(fmt, ap);
- }
-
-@@ -2737,9 +2737,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogWarning(fmt, ap);
- }
-
-diff -ruN faxd/trigtest.c++.orig faxd/trigtest.c++
---- faxd/trigtest.c++.orig Sun Jun 13 00:41:08 1999
-+++ faxd/trigtest.c++ Mon Jun 12 21:52:39 2000
-@@ -296,7 +296,7 @@
- int fd, n;
- char msg[256];
-
-- sprintf(fifoName, "client/%u", getpid());
-+ snprintf(fifoName, sizeof(fifoname), "client/%u", getpid());
- if (Sys::mkfifo(fifoName, 0666) < 0 && errno != EEXIST) {
- perror("mkfifo");
- exit(-1);
-@@ -309,7 +309,7 @@
- unlink(fifoName);
- exit(-1);
- }
-- sprintf(msg, "T%s:N%s", fifoName, trigger);
-+ snprintf(msg, sizeof(msg), "T%s:N%s", fifoName, trigger);
- send(msg, strlen(msg)+1);
- for (;;) {
- FD_ZERO(&rd);
diff --git a/comms/hylafax/files/patch-ae b/comms/hylafax/files/patch-ae
deleted file mode 100644
index 489c4eb290e1..000000000000
--- a/comms/hylafax/files/patch-ae
+++ /dev/null
@@ -1,135 +0,0 @@
-diff -ruN hfaxd/HylaFAXServer.c++.orig hfaxd/HylaFAXServer.c++
---- hfaxd/HylaFAXServer.c++.orig Sun Jun 13 00:41:13 1999
-+++ hfaxd/HylaFAXServer.c++ Mon Jun 12 21:52:40 2000
-@@ -161,9 +161,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogError(fmt, ap);
- }
-
-@@ -172,9 +172,9 @@
- {
- char fmt[128];
- if (module != NULL)
-- sprintf(fmt, "%s: Warning, %s.", module, fmt0);
-+ snprintf(fmt, sizeof(fmt), "%s: Warning, %s.", module, fmt0);
- else
-- sprintf(fmt, "Warning, %s.", fmt0);
-+ snprintf(fmt, sizeof(fmt), "Warning, %s.", fmt0);
- vlogWarning(fmt, ap);
- }
-
-@@ -530,7 +530,7 @@
- filename, line);
- seqnum = 1;
- }
-- sprintf(line, "%u", NEXTSEQNUM(seqnum+count));
-+ snprintf(line, sizeof(line), "%u", NEXTSEQNUM(seqnum+count));
- lseek(fd, 0, SEEK_SET);
- if (Sys::write(fd, line, strlen(line)) != strlen(line) ||
- ftruncate(fd,strlen(line))) {
-diff -ruN hfaxd/Jobs.c++.orig hfaxd/Jobs.c++
---- hfaxd/Jobs.c++.orig Sun Jun 13 00:41:14 1999
-+++ hfaxd/Jobs.c++ Mon Jun 12 21:52:40 2000
-@@ -1646,7 +1646,8 @@
- fprintf(fd, fspec, (const char*) job.company);
- break;
- case 'D':
-- sprintf(tmpbuf, "%2u:%-2u", job.totdials, job.maxdials);
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%2u:%-2u", job.totdials,
-+ job.maxdials);
- fprintf(fd, fspec, tmpbuf);
- break;
- case 'E':
-@@ -1683,7 +1684,8 @@
- fprintf(fd, fspec, "N "[job.useccover]);
- break;
- case 'P':
-- sprintf(tmpbuf, "%2u:%-2u", job.npages, job.totpages);
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%2u:%-2u", job.npages,
-+ job.totpages);
- fprintf(fd, fspec, tmpbuf);
- break;
- case 'Q':
-@@ -1696,11 +1698,12 @@
- fprintf(fd, fspec, (const char*) job.sender);
- break;
- case 'T':
-- sprintf(tmpbuf, "%2u:%-2u", job.tottries, job.maxtries);
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%2u:%-2u", job.tottries,
-+ job.maxtries);
- fprintf(fd, fspec, tmpbuf);
- break;
- case 'U':
-- sprintf(tmpbuf, "%.1f", job.chopthreshold);
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%.1f", job.chopthreshold);
- fprintf(fd, fspec, tmpbuf);
- break;
- case 'V':
-diff -ruN hfaxd/OldProtocol.c++.orig hfaxd/OldProtocol.c++
---- hfaxd/OldProtocol.c++.orig Sun Jun 13 00:41:15 1999
-+++ hfaxd/OldProtocol.c++ Mon Jun 12 21:52:40 2000
-@@ -352,8 +352,8 @@
- OldProtocolServer::vsendClient(const char* tag, const char* fmt, va_list ap)
- {
- char buf[2048];
-- sprintf(buf, "%s:", tag);
-- vsprintf(strchr(buf,'\0'), fmt, ap);
-+ snprintf(buf, sizeof(buf), "%s:", tag);
-+ vsnprintf(strchr(buf,'\0'), sizeof(buf) - (strchr(buf,'\0') - buf), fmt, ap);
- fprintf(stdout, "%s\n", buf);
- if (TRACE(PROTOCOL))
- logDebug("%s", buf);
-@@ -472,19 +472,19 @@
- buf[0] = '\0';
- if (pwd->pw_gecos) {
- if (pwd->pw_gecos[0] == '&') {
-- strcpy(buf, pwd->pw_name);
-- strcat(buf, pwd->pw_gecos+1);
-+ strlcpy(buf, pwd->pw_name, sizeof(buf));
-+ strlcat(buf, pwd->pw_gecos+1, sizeof(buf));
- if (islower(buf[0]))
- buf[0] = toupper(buf[0]);
- } else
-- strcpy(buf, pwd->pw_gecos);
-+ strlcpy(buf, pwd->pw_gecos, sizeof(buf));
- if ((cp = strchr(buf,',')) != 0)
- *cp = '\0';
- /* see FaxClient::setupUserIdentity; strip SysV junk */
- if ((cp = strchr(buf,'(')) != 0)
- *cp = '\0';
- } else
-- strcpy(buf, pwd->pw_name);
-+ strlcpy(buf, pwd->pw_name, sizeof(buf));
- if (TRACE(PROTOCOL)) {
- if (*buf)
- logDebug("%s user: \"%s\"", pwd->pw_name, buf);
-diff -ruN hfaxd/Status.c++.orig hfaxd/Status.c++
---- hfaxd/Status.c++.orig Sun Jun 13 00:41:16 1999
-+++ hfaxd/Status.c++ Mon Jun 12 21:52:40 2000
-@@ -260,16 +260,16 @@
- break;
- case 'r':
- if (config.maxRecvPages == (u_int) -1)
-- strcpy(tmpbuf, "INF");
-+ strlcpy(tmpbuf, "INF", sizeof(tmpbuf));
- else
-- sprintf(tmpbuf, "%u", config.maxRecvPages);
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%u", config.maxRecvPages);
- fprintf(fd, fspec, config.maxRecvPages);
- break;
- case 's':
- fprintf(fd, fspec, (const char*) config.status);
- break;
- case 't':
-- sprintf(tmpbuf, "%05x:%05x",
-+ snprintf(tmpbuf, sizeof(tmpbuf), "%05x:%05x",
- config.tracingLevel&0xfffff,
- config.logTracingLevel&0xfffff);
- fprintf(fd, fspec, tmpbuf);
diff --git a/comms/hylafax/files/patch-af b/comms/hylafax/files/patch-af
deleted file mode 100644
index d1f01109a497..000000000000
--- a/comms/hylafax/files/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN man/config.4f.orig man/config.4f
---- man/config.4f.orig Mon Jan 4 23:48:18 1999
-+++ man/config.4f Mon Jun 12 21:52:41 2000
-@@ -1446,7 +1446,7 @@
- The command to place a phone call.
- The string is assumed to be suitable for use
- as a parameter to the
--.IR sprintf (3S)
-+.IR snprintf (3S)
- function; so the ``%'' character should be escaped as ``%%''.
- The dial command must include a single ``%s'' where the number
- that is to be dialed is to be substituted.
diff --git a/comms/hylafax/files/patch-ag b/comms/hylafax/files/patch-ag
deleted file mode 100644
index e9f3537998b6..000000000000
--- a/comms/hylafax/files/patch-ag
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -ruN port/syslog.c.orig port/syslog.c
---- port/syslog.c.orig Mon Oct 12 13:47:50 1998
-+++ port/syslog.c Mon Jun 12 21:52:41 2000
-@@ -88,7 +88,7 @@
- register int cnt;
- register char *p;
- time_t now, time();
-- int fd, saved_errno;
-+ int fd, saved_errno, n;
- char tbuf[2048], fmt_cpy[1024], *stdp, *ctime();
-
- /* check for invalid bits or no priority set */
-@@ -104,21 +104,21 @@
-
- /* build the message */
- (void)time(&now);
-- (void)sprintf(tbuf, "<%d>%.15s ", pri, ctime(&now) + 4);
-- for (p = tbuf; *p; ++p);
-+ (void)snprintf(tbuf, sizeof(tbuf), "<%d>%.15s ", pri, ctime(&now) + 4);
-+ for (p = tbuf; *p; ++p, n++);
- if (LogStat & LOG_PERROR)
- stdp = p;
- if (LogTag) {
-- (void)strcpy(p, LogTag);
-+ (void)strlcpy(p, LogTag, sizeof(tbuf) - n);
- for (; *p; ++p);
- }
- if (LogStat & LOG_PID) {
-- (void)sprintf(p, "[%d]", getpid());
-+ (void)snprintf(p, sizeof(tbuf) - n, "[%d]", getpid());
- for (; *p; ++p);
- }
- if (LogTag) {
-- *p++ = ':';
-- *p++ = ' ';
-+ *p++ = ':'; n++;
-+ *p++ = ' '; n++;
- }
-
- /* substitute error message for %m */
-@@ -137,7 +137,7 @@
- *t1 = '\0';
- }
-
-- (void)vsprintf(p, fmt_cpy, ap);
-+ (void)vsnprintf(p, sizeof(tbuf) - n, fmt_cpy, ap);
-
- cnt = strlen(tbuf);
-
-@@ -170,7 +170,7 @@
- * is the one from the syslogd failure.
- */
- if ((fd = open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) {
-- (void)strcat(tbuf, "\r\n");
-+ (void)strlcat(tbuf, "\r\n", sizeof(tbuf));
- cnt += 2;
- p = index(tbuf, '>') + 1;
- (void)write(fd, p, cnt - (p - tbuf));
-diff -ruN port/vsyslog.c.orig port/vsyslog.c
---- port/vsyslog.c.orig Mon Oct 12 13:47:50 1998
-+++ port/vsyslog.c Mon Jun 12 21:52:41 2000
-@@ -49,6 +49,6 @@
- *cp++ = c;
- *cp = '\0';
- }
-- (void) vsprintf(tbuf, fmt_cpy, ap);
-+ (void) vnsprintf(tbuf, sizeof(tbuf), fmt_cpy, ap);
- (void) syslog(pri, "%s", tbuf);
- }
diff --git a/comms/hylafax/files/patch-ai b/comms/hylafax/files/patch-ai
deleted file mode 100644
index 2d7cd13321ee..000000000000
--- a/comms/hylafax/files/patch-ai
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN sgi2fax/imgtofax.c.orig sgi2fax/imgtofax.c
---- sgi2fax/imgtofax.c.orig Mon Oct 12 13:47:50 1998
-+++ sgi2fax/imgtofax.c Mon Jun 12 21:52:42 2000
-@@ -214,7 +214,7 @@
- TIFFSetField(tif, TIFFTAG_PAGENUMBER, pn, npages);
- TIFFSetField(tif, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
- { char buf[1024];
-- sprintf(buf, "Ditherered B&W version of %s", input);
-+ snprintf(buf, sizeof(buf), "Ditherered B&W version of %s", input);
- TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, buf);
- }
- TIFFSetField(tif, TIFFTAG_SOFTWARE, "sgi2fax");
diff --git a/comms/hylafax/files/patch-aj b/comms/hylafax/files/patch-aj
deleted file mode 100644
index 85961957e85e..000000000000
--- a/comms/hylafax/files/patch-aj
+++ /dev/null
@@ -1,345 +0,0 @@
-diff -ruN util/Class2Params.c++.orig util/Class2Params.c++
---- util/Class2Params.c++.orig Sun Jun 13 00:41:19 1999
-+++ util/Class2Params.c++ Mon Jun 12 21:52:43 2000
-@@ -59,14 +59,15 @@
- }
-
- static char*
--addParam(char* cp, u_int v)
-+addParam(char* cp, u_int v, int *maxn)
- {
- if (v != (u_int)-1) {
-- sprintf(cp, ",%u", v);
-- while (*cp != '\0') cp++;
-+ snprintf(cp, *maxn, ",%u", v);
-+ while (*cp != '\0') { cp++; (*maxn)++; }
- } else {
- *cp++ = ',';
- *cp = '\0';
-+ (*maxn)++;
- }
- return (cp);
- }
-@@ -76,18 +77,19 @@
- {
- char buf[1024];
- char* cp = buf;
-+ int n = sizeof(buf);
-
- if (vr != (u_int) -1) {
-- sprintf(cp, "%u", vr);
-- while (*cp != '\0') cp++;
-+ snprintf(cp, n, "%u", vr);
-+ while (*cp != '\0') { cp++; n--; }
- }
-- cp = addParam(cp, br);
-- cp = addParam(cp, wd);
-- cp = addParam(cp, ln);
-- cp = addParam(cp, df);
-- cp = addParam(cp, ec);
-- cp = addParam(cp, bf);
-- cp = addParam(cp, st);
-+ cp = addParam(cp, br, &n);
-+ cp = addParam(cp, wd, &n);
-+ cp = addParam(cp, ln, &n);
-+ cp = addParam(cp, df, &n);
-+ cp = addParam(cp, ec, &n);
-+ cp = addParam(cp, bf, &n);
-+ cp = addParam(cp, st, &n);
- return fxStr(buf);
- }
-
-diff -ruN util/FaxClient.c++.orig util/FaxClient.c++
---- util/FaxClient.c++.orig Thu Jun 17 04:05:38 1999
-+++ util/FaxClient.c++ Mon Jun 12 21:52:43 2000
-@@ -623,7 +623,7 @@
- traceServer("-> ADMIN XXXX");
- } else {
- char buf[128];
-- sprintf(buf, "-> %s", fmt);
-+ snprintf(buf, sizeof(buf), "-> %s", fmt);
- vtraceServer(buf, ap);
- }
- }
-diff -ruN util/PageSize.c++.orig util/PageSize.c++
---- util/PageSize.c++.orig Sun Jun 13 00:41:23 1999
-+++ util/PageSize.c++ Mon Jun 12 21:52:43 2000
-@@ -72,7 +72,7 @@
- PageSizeInfo::readPageInfoFile()
- {
- char file[1024];
-- sprintf(file, "%s/%s", FAX_LIBDATA, FAX_PAGESIZES);
-+ snprintf(file, sizeof(file), "%s/%s", FAX_LIBDATA, FAX_PAGESIZES);
- PageInfoArray* info = new PageInfoArray;
- FILE* fp = fopen(file, "r");
- u_int lineno = 0;
-diff -ruN util/SNPPClient.c++.orig util/SNPPClient.c++
---- util/SNPPClient.c++.orig Sun Jun 13 00:41:24 1999
-+++ util/SNPPClient.c++ Mon Jun 12 21:52:43 2000
-@@ -638,7 +638,7 @@
- traceServer("-> LOGI XXXX");
- else {
- char buf[128];
-- sprintf(buf, "-> %s", fmt);
-+ snprintf(buf, sizeof(buf), "-> %s", fmt);
- vtraceServer(buf, ap);
- }
- }
-diff -ruN util/StackBuffer.c++.orig util/StackBuffer.c++
---- util/StackBuffer.c++.orig Fri Jan 1 20:12:43 1999
-+++ util/StackBuffer.c++ Mon Jun 12 21:52:44 2000
-@@ -105,7 +105,7 @@
- fxStackBuffer::vput(const char* fmt, va_list ap)
- {
- char buf[8*1024];
-- vsprintf(buf, fmt, ap);
-+ vsnprintf(buf, sizeof(buf), fmt, ap);
- put(buf);
- }
-
-diff -ruN util/Str.c++.orig util/Str.c++
---- util/Str.c++.orig Sun Jun 13 00:41:25 1999
-+++ util/Str.c++ Mon Jun 12 21:52:44 2000
-@@ -91,7 +91,7 @@
- {
- char buffer[NUMBUFSIZE];
- if (!format) format = "%d";
-- sprintf(buffer,format,a);
-+ snprintf(buffer,sizeof(buffer),format,a);
- slength = strlen(buffer) + 1;
- data = (char*) malloc(slength);
- memcpy(data,buffer,slength);
-@@ -101,7 +101,7 @@
- {
- char buffer[NUMBUFSIZE];
- if (!format) format = "%ld";
-- sprintf(buffer,format,a);
-+ snprintf(buffer,sizeof(buffer),format,a);
- slength = strlen(buffer) + 1;
- data = (char*) malloc(slength);
- memcpy(data,buffer,slength);
-@@ -111,7 +111,7 @@
- {
- char buffer[NUMBUFSIZE];
- if (!format) format = "%g";
-- sprintf(buffer,format,a);
-+ snprintf(buffer,sizeof(buffer),format,a);
- slength = strlen(buffer) + 1;
- fxAssert(slength>1, "Str::Str(float): bogus conversion");
- data = (char*) malloc(slength);
-@@ -122,7 +122,7 @@
- {
- char buffer[NUMBUFSIZE];
- if (!format) format = "%lg";
-- sprintf(buffer,format,a);
-+ snprintf(buffer,sizeof(buffer),format,a);
- slength = strlen(buffer) + 1;
- fxAssert(slength>1, "Str::Str(double): bogus conversion");
- data = (char*) malloc(slength); // XXX assume slength>1
-@@ -141,7 +141,7 @@
- char buf[4096];
- va_list ap;
- va_start(ap, fmt);
-- vsprintf(buf, fmt, ap);
-+ vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
- return fxStr(buf);
- }
-@@ -150,7 +150,7 @@
- fxStr::vformat(const char* fmt, va_list ap)
- {
- char buf[4096];
-- vsprintf(buf, fmt, ap);
-+ vsnprintf(buf, sizeof(buf), fmt, ap);
- return fxStr(buf);
- }
-
-diff -ruN util/Str.h.orig util/Str.h
---- util/Str.h.orig Sun Jun 13 00:41:25 1999
-+++ util/Str.h Mon Jun 12 21:52:44 2000
-@@ -93,8 +93,8 @@
- fxStr(const fxTempStr&);
- ~fxStr();
-
-- static fxStr format(const char* fmt ...); // sprintf sort of
-- static fxStr vformat(const char* fmt, va_list ap); // vsprintf sort of
-+ static fxStr format(const char* fmt ...); // snprintf sort of
-+ static fxStr vformat(const char* fmt, va_list ap); // vsnprintf sort of
- static fxStr null; // null string for general use
- /////////////////////////////////////////////////////
- u_long hash() const;
-diff -ruN util/faxadduser.c.orig util/faxadduser.c
---- util/faxadduser.c.orig Wed Aug 11 04:59:28 1999
-+++ util/faxadduser.c Mon Jun 12 21:52:44 2000
-@@ -81,7 +81,7 @@
- }
- hf = fopen(hostfile, "a+");
- if (hf == NULL) {
-- sprintf(buff, "Error - cannot open hosts file: %s", hostfile);
-+ snprintf(buff, sizeof(buff), "Error - cannot open hosts file: %s", hostfile);
- perror(buff);
- return 0;
- }
-diff -ruN util/faxconfig.c.orig util/faxconfig.c
---- util/faxconfig.c.orig Fri Jan 1 20:04:28 1999
-+++ util/faxconfig.c Mon Jun 12 21:52:45 2000
-@@ -81,12 +81,12 @@
- }
- if (devid != NULL) {
- if (devid[0] == FAX_FIFO[0])
-- strcpy(fifoname, devid);
-+ strlcpy(fifoname, devid, sizeof(fifoname));
- else
-- sprintf(fifoname, "%s.%.*s", FAX_FIFO,
-+ snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
- sizeof (fifoname) - sizeof (FAX_FIFO), devid);
- } else
-- strcpy(fifoname, FAX_FIFO);
-+ strlcpy(fifoname, FAX_FIFO, sizeof(fifoname));
- for (cp = fifoname; cp = strchr(cp, '/'); *cp++ = '_')
- ;
- if (chdir(spooldir) < 0)
-@@ -99,6 +99,8 @@
- do {
- int quote;
- char *cmd;
-+ int len;
-+
-
- if (argc - optind < 2)
- fatal("Missing value for \"%s\" parameter.\n", argv[optind]);
-@@ -109,12 +111,13 @@
- quote = (*cp != '\0');
- } else
- quote = 1;
-- cmd = malloc(strlen(argv[optind])+strlen(argv[optind+1])+10);
-+ len = strlen(argv[optind])+strlen(argv[optind+1])+10;
-+ cmd = malloc(len);
- if (quote)
-- sprintf(cmd, "C%s%s:\"%s\"",
-+ snprintf(cmd, len, "C%s%s:\"%s\"",
- isQueuer ? ":" : "", argv[optind], argv[optind+1]);
- else
-- sprintf(cmd, "C%s%s:%s",
-+ snprintf(cmd, len, "C%s%s:%s",
- isQueuer ? ":" : "", argv[optind], argv[optind+1]);
- if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
- fatal("%s: FIFO write failed for command (%s)",
-diff -ruN util/faxdeluser.c.orig util/faxdeluser.c
---- util/faxdeluser.c.orig Thu Aug 5 02:46:06 1999
-+++ util/faxdeluser.c Mon Jun 12 21:52:45 2000
-@@ -64,14 +64,14 @@
- }
- }
- if ((hf = fopen(hostfile, "r+")) == NULL) {
-- sprintf(buff, "Error - cannot open file: %s", hostfile);
-+ snprintf(buff, sizeof(buff), "Error - cannot open file: %s", hostfile);
- perror(buff);
- return 0;
- }
-- sprintf(newhostfile, "%s.%i", hostfile, (int)getpid());
-+ snprintf(newhostfile, sizeof(newhostfile), "%s.%i", hostfile, (int)getpid());
- fd = open(newhostfile, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IWUSR);
- if (fd == -1) {
-- sprintf(buff, "Error cannot open file %s", newhostfile);
-+ snprintf(buff, sizeof(buff), "Error cannot open file %s", newhostfile);
- perror(buff);
- return 0;
- }
-@@ -87,7 +87,7 @@
- }
- if (!skip) {
- if (write(fd, buff, strlen(buff)) == -1) {
-- sprintf(buff, "Error writing to file %s", newhostfile);
-+ snprintf(buff, sizeof(buff), "Error writing to file %s", newhostfile);
- perror(buff);
- return 0;
- }
-diff -ruN util/faxmodem.c.orig util/faxmodem.c
---- util/faxmodem.c.orig Fri Jan 1 20:04:28 1999
-+++ util/faxmodem.c Mon Jun 12 21:52:45 2000
-@@ -243,9 +243,9 @@
- if (optind != argc-1)
- fatal("Missing modem device.\nusage: %s %s modem", argv[0], usage);
- if (strncmp(argv[optind], _PATH_DEV, strlen(_PATH_DEV)) == 0)
-- strcpy(devname, argv[optind]+strlen(_PATH_DEV));
-+ strlcpy(devname, argv[optind]+strlen(_PATH_DEV), sizeof(devname));
- else
-- strcpy(devname, argv[optind]);
-+ strlcpy(devname, argv[optind], sizeof(devname));
- for (cp = devname; cp = strchr(cp, '/'); *cp++ = '_')
- ;
- if (chdir(spooldir) < 0)
-@@ -254,9 +254,10 @@
- if (fifo < 0)
- fatal("%s: open: %s", FAX_FIFO, strerror(errno));
- if (priority != -1)
-- sprintf(cmd, "+%s:R%c%08x:%x", devname, canpoll, caps, priority);
-+ snprintf(cmd, sizeof(cmd), "+%s:R%c%08x:%x", devname, canpoll, caps,
-+ priority);
- else
-- sprintf(cmd, "+%s:R%c%08x", devname, canpoll, caps);
-+ snprintf(cmd, sizeof(cmd), "+%s:R%c%08x", devname, canpoll, caps);
- if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
- fatal("%s: FIFO write failed for command (%s)",
- argv[0], strerror(errno));
-diff -ruN util/faxmsg.c.orig util/faxmsg.c
---- util/faxmsg.c.orig Fri Jan 1 20:04:28 1999
-+++ util/faxmsg.c Mon Jun 12 21:52:45 2000
-@@ -108,12 +108,12 @@
- }
- if (optind == argc-1) {
- if (argv[optind][0] == FAX_FIFO[0])
-- strcpy(fifoname, argv[optind]);
-+ strlcpy(fifoname, argv[optind], sizeof(fifoname));
- else
-- sprintf(fifoname, "%s.%.*s", FAX_FIFO,
-+ snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
- sizeof (fifoname) - sizeof (FAX_FIFO), argv[optind]);
- } else if (!modemRequired) {
-- strcpy(fifoname, FAX_FIFO);
-+ strlcpy(fifoname, FAX_FIFO, sizeof(fifoname));
- } else
- fatal("usage: %s %s", argv[0], usage);
- for (cp = fifoname; cp = strchr(cp, '/'); *cp++ = '_')
-@@ -123,7 +123,7 @@
- fifo = open(fifoname, O_WRONLY|O_NDELAY);
- if (fifo < 0)
- fatal("%s: open: %s", fifoname, strerror(errno));
-- sprintf(cmd, cmdfmt, arg);
-+ snprintf(cmd, sizeof(cmd), cmdfmt, arg);
- if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
- fatal("FIFO write failed for command (%s)", strerror(errno));
- (void) close(fifo);
-diff -ruN util/faxstate.c.orig util/faxstate.c
---- util/faxstate.c.orig Fri Jan 1 20:04:28 1999
-+++ util/faxstate.c Mon Jun 12 21:52:46 2000
-@@ -113,7 +113,7 @@
- }
- if (optind != argc-1)
- fatal("Bad option `%c'; usage: %s %s modem", c, argv[0], usage);
-- strcpy(devid, argv[optind]);
-+ strlcpy(devid, argv[optind], sizeof(devid));
- for (cp = devid; cp = strchr(cp, '/'); *cp++ = '_')
- ;
- if (chdir(spooldir) < 0)
-@@ -126,16 +126,16 @@
- fifo = open(FAX_FIFO, O_WRONLY|O_NDELAY);
- if (fifo < 0)
- fatal("%s: open: %s", FAX_FIFO, strerror(errno));
-- sprintf(cmd, "+%s:%s", devid, arg);
-+ snprintf(cmd, sizeof(cmd), "+%s:%s", devid, arg);
- if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
- fatal("FIFO write failed for command (%s)", strerror(errno));
- } else {
-- sprintf(fifoname, "%s.%.*s", FAX_FIFO,
-+ snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO,
- sizeof (fifoname) - sizeof (FAX_FIFO), devid);
- fifo = open(fifoname, O_WRONLY|O_NDELAY);
- if (fifo < 0)
- fatal("%s: open: %s", fifoname, strerror(errno));
-- sprintf(cmd, "S%s", arg);
-+ snprintf(cmd, sizeof(cmd), "S%s", arg);
- if (write(fifo, cmd, strlen(cmd)) != strlen(cmd))
- fatal("FIFO write failed for command (%s)", strerror(errno));
- }
diff --git a/comms/hylafax/files/patch-sec1 b/comms/hylafax/files/patch-sec1
deleted file mode 100644
index 11d37cde781a..000000000000
--- a/comms/hylafax/files/patch-sec1
+++ /dev/null
@@ -1,22 +0,0 @@
---- hfaxd/Makefile.in.orig Sat Apr 14 18:47:02 2001
-+++ hfaxd/Makefile.in Sat Apr 14 18:47:42 2001
-@@ -96,7 +96,7 @@
- incdepend:
-
- install: default
-- ${INSTALL} -F ${LIBEXEC} -u root -m 4755 \
-+ ${INSTALL} -F ${LIBEXEC} -u root -m 755 \
- -idb ${PRODUCT}.sw.server -O hfaxd
- ${INSTALL} -F ${LIBDATA} -m 644 -idb ${PRODUCT}.sw.server \
- -idb "config(noupdate)" -src ${SRCDIR}/hfaxd.conf -O hfaxd.conf
---- hfaxd/main.c++.orig Sat Apr 14 18:55:07 2001
-+++ hfaxd/main.c++ Sat Apr 14 18:53:04 2001
-@@ -237,7 +237,7 @@
- if (detach == -1) // no protocol options means -I
- detach = false;
- if (Sys::chdir(queueDir) < 0)
-- fatal(queueDir | ": Can not change directory");
-+ fatal("Can not change directory to %s", (const char*)queueDir);
- CheckSpoolingSetup();
- if (detach)
- detachFromTTY();
diff --git a/comms/hylafax/pkg-message b/comms/hylafax/pkg-message
index 3dbe78f24854..aa73e55ceec8 100644
--- a/comms/hylafax/pkg-message
+++ b/comms/hylafax/pkg-message
@@ -16,5 +16,6 @@ Setting up: (for impatients)
>cuaa1 "/usr/local/sbin/faxgetty" dialup on secure
Documentation:
- On Line Manuals: man hylafax.
+ On Line Manuals: man hylafax-client
+ man hylafax-server
World Wide Web site: http://www.hylafax.org/
diff --git a/comms/hylafax/pkg-plist b/comms/hylafax/pkg-plist
index 1cca4f3418ef..2a09ad235667 100644
--- a/comms/hylafax/pkg-plist
+++ b/comms/hylafax/pkg-plist
@@ -50,122 +50,131 @@ sbin/tsitest
sbin/typetest
sbin/xferfaxstats
@dirrm lib/fax
-@cwd /var/spool
-fax/COPYRIGHT
-fax/bin/faxrcvd
-fax/bin/mkcover
-fax/bin/notify
-fax/bin/notify.awk
-fax/bin/pcl2fax
-fax/bin/pollrcvd
-fax/bin/ps2fax.dps
-fax/bin/ps2fax.gs
-fax/bin/ps2fax.imp
-fax/bin/tiff2fax
-fax/bin/wedged
-fax/config/att-dataport
-fax/config/att-dataport-2
-fax/config/att-dataport-2.0
-fax/config/cirrus
-fax/config/class1
-fax/config/class2
-fax/config/class2.0
-fax/config/dsi-scout+
-fax/config/e-tech
-fax/config/everex-2496d
-fax/config/exar
-fax/config/gvc-288
-fax/config/gvc-288-2
-fax/config/intel-400e
-fax/config/moto-288
-fax/config/mt-1432
-fax/config/nuvo-voyager
-fax/config/ppi-pm14400fxmt
-fax/config/ppi-pm14400fxsa
-fax/config/rc144ac
-fax/config/rc144ac-1
-fax/config/rc288dpi
-fax/config/rc288dpi-1
-fax/config/rc32acl
-fax/config/rc32acl-1
-fax/config/rockwell
-fax/config/sierra
-fax/config/skel
-fax/config/telebit-qblazer
-fax/config/telebit-t3000
-fax/config/telebit-wb
-fax/config/tricom2842
-fax/config/uds-fastalk
-fax/config/usr-2.0
-fax/config/usr-rts
-fax/config/usr-xon
-fax/config/zyxel-1496e
-fax/config/zyxel-1496e-1
-fax/config/zyxel-1496e-2.0
-fax/config/zyxel-2864
-fax/etc/cover.templ
-fax/etc/dialrules
-fax/etc/dialrules.europe
-fax/etc/dialrules.sf-ba
-fax/etc/dpsprinter.ps
-fax/etc/hosts.hfaxd
-fax/etc/lutRS18.pcf
-fax/etc/xferfaxlog
+@cwd /var/spool/hylafax
+COPYRIGHT
+bin/faxrcvd
+bin/mkcover
+bin/notify
+bin/notify.awk
+bin/pdf2fax.gs
+bin/pcl2fax
+bin/pollrcvd
+bin/ps2fax.dps
+bin/ps2fax.gs
+bin/ps2fax.imp
+bin/tiff2fax
+bin/wedged
+config/att-dataport
+config/att-dataport-2
+config/att-dataport-2.0
+config/att-dpexpress-2
+config/cirrus
+config/class1
+config/class2
+config/class2.0
+config/dsi-scout+
+config/e-tech
+config/elsa-microlink-56k-basic-2.0
+config/everex-2496d
+config/exar
+config/gvc-288
+config/gvc-288-2
+config/intel-400e
+config/lucent
+config/lucent-mt-2
+config/moto-288
+config/mt-1432
+config/nuvo-voyager
+config/ppi-pm14400fxmt
+config/ppi-pm14400fxsa
+config/rc144ac
+config/rc144ac-1
+config/rc288dpi
+config/rc288dpi-1
+config/rc32acl
+config/rc32acl-1
+config/rockwell-k56
+config/rockwell-rc
+config/sierra
+config/skel
+config/telebit-qblazer
+config/telebit-t3000
+config/telebit-wb
+config/tricom2842
+config/uds-fastalk
+config/umc92144
+config/umc9624
+config/usr-2.0
+config/usr-rts
+config/usr-xon
+config/zyxel-1496e
+config/zyxel-1496e-1
+config/zyxel-1496e-2.0
+config/zyxel-2864
+etc/cover.templ
+etc/dialrules
+etc/dialrules.europe
+etc/dialrules.sf-ba
+etc/dpsprinter.ps
+etc/hosts.hfaxd
+etc/lutRS18.pcf
+etc/xferfaxlog
@exec chown uucp:dialer %D/fax
@comment pkg_* can't deal with fifos if specified as a file
-@exec mkfifo %D/fax/FIFO
-@exec chown uucp:dialer %D/fax/FIFO
-@exec chmod 600 %D/fax/FIFO
-@unexec rm %D/fax/FIFO
-@exec mkdir %D/fax/archive
-@exec chown uucp:dialer %D/fax/archive
-@exec chmod 700 %D/fax/archive
-@exec mkdir %D/fax/client
-@exec chown uucp:dialer %D/fax/client
-@exec chmod 755 %D/fax/client
-@exec mkdir %D/fax/dev
-@exec chown uucp:dialer %D/fax/dev
-@exec chmod 755 %D/fax/dev
-@exec mkdir %D/fax/docq
-@exec chown uucp:dialer %D/fax/docq
-@exec chmod 700 %D/fax/docq
-@exec mkdir %D/fax/doneq
-@exec chown uucp:dialer %D/fax/doneq
-@exec chmod 700 %D/fax/doneq
-@exec mkdir %D/fax/info
-@exec chown uucp:dialer %D/fax/info
-@exec chmod 755 %D/fax/info
-@exec mkdir %D/fax/log
-@exec chown uucp:dialer %D/fax/log
-@exec chmod 755 %D/fax/log
-@exec mkdir %D/fax/pollq
-@exec chown uucp:dialer %D/fax/pollq
-@exec chmod 700 %D/fax/pollq
-@exec mkdir %D/fax/recvq
-@exec chown uucp:dialer %D/fax/recvq
-@exec chmod 755 %D/fax/recvq
-@exec mkdir %D/fax/sendq
-@exec chown uucp:dialer %D/fax/sendq
-@exec chmod 700 %D/fax/sendq
-@exec mkdir %D/fax/status
-@exec chown uucp:dialer %D/fax/status
-@exec chmod 755 %D/fax/status
-@exec mkdir %D/fax/tmp
-@exec chown uucp:dialer %D/fax/tmp
-@exec chmod 700 %D/fax/tmp
-@dirrm fax/archive
-@dirrm fax/bin
-@dirrm fax/client
-@dirrm fax/config
-@dirrm fax/dev
-@dirrm fax/docq
-@dirrm fax/doneq
-@dirrm fax/etc
-@dirrm fax/info
-@dirrm fax/log
-@dirrm fax/pollq
-@dirrm fax/recvq
-@dirrm fax/sendq
-@dirrm fax/status
-@dirrm fax/tmp
-@dirrm fax
+@exec mkfifo %D/FIFO
+@exec chown uucp:dialer %D/FIFO
+@exec chmod 600 %D/FIFO
+@unexec rm %D/FIFO
+@exec mkdir %D/archive
+@exec chown uucp:dialer %D/archive
+@exec chmod 700 %D/archive
+@exec mkdir %D/client
+@exec chown uucp:dialer %D/client
+@exec chmod 755 %D/client
+@exec mkdir %D/dev
+@exec chown uucp:dialer %D/dev
+@exec chmod 755 %D/dev
+@exec mkdir %D/docq
+@exec chown uucp:dialer %D/docq
+@exec chmod 700 %D/docq
+@exec mkdir %D/doneq
+@exec chown uucp:dialer %D/doneq
+@exec chmod 700 %D/doneq
+@exec mkdir %D/info
+@exec chown uucp:dialer %D/info
+@exec chmod 755 %D/info
+@exec mkdir %D/log
+@exec chown uucp:dialer %D/log
+@exec chmod 755 %D/log
+@exec mkdir %D/pollq
+@exec chown uucp:dialer %D/pollq
+@exec chmod 700 %D/pollq
+@exec mkdir %D/recvq
+@exec chown uucp:dialer %D/recvq
+@exec chmod 755 %D/recvq
+@exec mkdir %D/sendq
+@exec chown uucp:dialer %D/sendq
+@exec chmod 700 %D/sendq
+@exec mkdir %D/status
+@exec chown uucp:dialer %D/status
+@exec chmod 755 %D/status
+@exec mkdir %D/tmp
+@exec chown uucp:dialer %D/tmp
+@exec chmod 700 %D/tmp
+@dirrm archive
+@dirrm bin
+@dirrm client
+@dirrm config
+@dirrm dev
+@dirrm docq
+@dirrm doneq
+@dirrm etc
+@dirrm info
+@dirrm log
+@dirrm pollq
+@dirrm recvq
+@dirrm sendq
+@dirrm status
+@dirrm tmp
+@cwd /var/spool
+@dirrm hylafax