PR: 51010

MAINTAINER update: Fixes security problem from Debian Security Advisory
DSA 285-1
This commit is contained in:
Foxfair Hu
2003-04-21 13:33:51 +00:00
parent 34ed824ad4
commit e825882a36
10 changed files with 235 additions and 172 deletions

View File

@@ -6,13 +6,11 @@
#
PORTNAME= LPRng
PORTVERSION= 3.8.20
PORTVERSION= 3.8.21
CATEGORIES= sysutils print
MASTER_SITES= ftp://ftp.lprng.com/pub/%SUBDIR%/ \
ftp://ftp.astart.com/pub/%SUBDIR%/ \
ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng/LPRng/ \
ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
MASTER_SITE_SUBDIR= LPRng/LPRng
@@ -25,42 +23,52 @@ LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
CONFIGURE_ARGS= \
--with-sbindir=${PREFIX}/sbin \
--with-filterdir=${PREFIX}/libexec/filters \
--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin" \
--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \
--with-printcap_path=/etc/printcap \
--with-ldopts="-L${LOCALBASE}/lib" \
--with-ccopts="-I${LOCALBASE}/include" \
--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
--enable-gdbm=${LOCALBASE}
.if defined(PREFIX)
CONFIGURE_ARGS+= --prefix="${PREFIX}"
.endif
.if defined(SYSCONFDIR)
CONFIGURE_ARGS+= --sysconfdir="${SYSCONFDIR}"
.endif
MAN1= cancel.1 lp.1 lpbanner.1 lpf.1 \
lpq.1 lpr.1 lprm.1 lprng_certs.1 lprng_index_certs.1 \
lpstat.1 monitor.1 pclbanner.1 psbanner.1
MAN5= lpd.conf.5 lpd.perms.5 printcap.5
MAN8= checkpc.8 lpc.8 lpd.8
MANCOMPRESSED= yes
MAN1= lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 \
lpstat.1 lpq.1 lpr.1 lprm.1 monitor.1 pclbanner.1 lpbanner.1
MAN5= printcap.5 lpd.conf.5 lpd.perms.5
MAN8= lpc.8 checkpc.8 lpd.8
DOC_FILES= CHANGES LPRng-HOWTO.* *.jpg LISA98.ppt
HTML_FILES= LPRng.jpg LPRngT-L.jpg LPRngT-S.jpg chooser.png clients.png \
configfiles.png filter.png index.html network.png parallel.png \
pooling.png printserver.png samba.png serial.png spooler.png \
x_add.png x_advanced.png x_checkpc.png x_edit.png \
x_ifhpfilter.png x_nup.png x_open.png x_printcaps.png \
x_reread.png x_results.png x_smb.png x_write.png
OTHER_FILES= Cookbook.pdf
pre-everything::
@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
@${ECHO_MSG} " make PREFIX=/usr SYSCONFDIR=/etc clean all install"
@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
${ECHO_MSG} " ln -s /usr/share/man /usr/man"; \
${ECHO_MSG} "If you do not, you will retain the old FreeBSD man pages."; \
${ECHO_MSG} "See the hier(7) man page for details of the FreeBSD file system"; \
${ECHO_MSG} "layout. Configure is not equipped to determine the location of"; \
${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
fi
post-install:
.if !defined(NOPORTSDOCS)
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
@${MKDIR} ${DOCSDIR}/HTML
@${MKDIR} ${DOCSDIR}/PDF
@${INSTALL_DATA} ${WRKSRC}/PrintingCookbook/PDF/${OTHER_FILES} ${DOCSDIR}/PDF
.for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/HOWTO/${file} ${DOCSDIR}
.for ext in html pdf ppt ps txt gif jpg png
for i in `ls ${WRKSRC}/HOWTO | ${GREP} "\.${ext}$$"`; \
do ${INSTALL_DATA} ${WRKSRC}/HOWTO/$$i ${DOCSDIR}; done
.endfor
.for file in ${HTML_FILES}
@${INSTALL_DATA} ${WRKSRC}/PrintingCookbook/HTML/${file} ${DOCSDIR}/HTML
.endfor
@${CAT} ${PKGMESSAGE} | ${SED} -e "s|@@PREFIX@@|${PREFIX}|g"
.endif
@${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@@ -1 +1 @@
MD5 (LPRng-3.8.20.tgz) = 84a7dc3c7076a1efb2682c63313fad74
MD5 (LPRng-3.8.21.tgz) = 396d0a49a4533ad973176efa9bf054b1

View File

@@ -1,24 +0,0 @@
--- src/common/vars.c.orig Thu Dec 28 05:06:11 2000
+++ src/common/vars.c Tue Jul 3 19:44:29 2001
@@ -62,10 +62,10 @@
#error Missing REQUIRE_CONFIGFILES definition
#endif
#if !defined(FILTER_PATH)
-#define FILTER_PATH "/bin:/usr/bin:/usr/contrib/bin:/usr/local/bin:/usr/ucb:/usr/sbin:/usr/etc:/etc"
+#define FILTER_PATH "/bin:/usr/bin:/usr/libexec:/usr/local/libexec:/usr/sbin:/var/spool/bin"
#endif
#if !defined(LD_LIBRARY_PATH)
-#define LD_LIBRARY_PATH "/lib:/usr/lib:/usr/5lib:/usr/ucblib"
+#define LD_LIBRARY_PATH "/lib:/usr/lib:/usr/local/lib"
#endif
#if !defined(LOCKFILE)
#error Missing LOCKFILE definition
@@ -242,7 +242,7 @@
/* remote server principal for server to server forwarding */
{ "kerberos_forward_principal", 0, STRING_K, &Kerberos_forward_principal_DYN,0,0},
/* keytab file location for kerberos, used by server */
-{ "kerberos_keytab", 0, STRING_K, &Kerberos_keytab_DYN,0,0,"=/etc/lpd.keytab"},
+{ "kerberos_keytab", 0, STRING_K, &Kerberos_keytab_DYN,0,0,"=/usr/local/etc/lpd.keytab:/etc/lpd.keytab"},
/* key lifetime for kerberos, used by server */
{ "kerberos_life", 0, STRING_K, &Kerberos_life_DYN,0,0},
/* key renewal time for kerberos, used by server */

View File

@@ -1,33 +0,0 @@
--- man/Makefile.in.orig Sun Mar 31 21:50:56 2002
+++ man/Makefile.in Sun Apr 28 16:56:03 2002
@@ -18,7 +18,7 @@
INSTALL=@INSTALL@
# change MANEXT to .gz or .Z if you use compressed manpages.
-MANEXT =
+MANEXT =.gz
## fix up prefix to be a make variable
prefix = @prefix@
@@ -111,8 +111,11 @@
${SRC}/mkinstalldirs $(DESTDIR)$(MAN)/man$${suffix}; \
fi; \
for i in *.$$suffix; do \
- echo $(INSTALL) -m 644 $$i $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
- $(INSTALL) -m 644 $$i $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
+ echo $(COMPRESS) $$i ; \
+ $(COMPRESS) < $$i >_ ; \
+ echo $(INSTALL) -m 644 _ $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
+ $(INSTALL) -m 644 _ $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
+ rm _ ; \
done; \
fi; \
done;
@@ -126,7 +129,6 @@
done; \
fi; \
done;
-
realclean mostlyclean distclean:: clean
clean::

View File

@@ -1,33 +0,0 @@
--- postinstall.freebsd.sh.orig Mon Jun 17 22:10:17 2002
+++ postinstall.freebsd.sh Fri Mar 7 15:54:41 2003
@@ -56,7 +56,7 @@
cp lpd.conf ${hold}/lpd.conf.sample
cp printcap ${hold}/printcap.sample
if [ "$INIT" != no ] ; then
- cp init.freebsd ${hold}/lprng.sh
+ cp init.freebsd ${hold}/rc.d/lprng.sh
fi
elif [ "X$MAKEINSTALL" = XYES ] ; then
# we have the port pre-install operation
@@ -81,8 +81,8 @@
if [ -f /etc/rc.conf ] ; then
perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf
fi
- cp init.freebsd ${hold}/lprng.sh
- init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
+ cp init.freebsd ${hold}/rc.d/lprng.sh
+ init=${DESTDIR}${PREFIX}/etc/rc.d/lprng.sh
echo "Setting up init script $init using init.freebsd"
if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
rm -f $init
@@ -107,8 +107,8 @@
fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
fix ${hold}/printcap "${PRINTCAP_PATH}"
if [ "$INIT" != no ] ; then
- init=/usr/local/etc/rc.d/lprng.sh
- cp ${hold}/lprng.sh $init;
+ init=${DESTDIR}${PREFIX}/etc/rc.d/lprng.sh
+ cp ${hold}/rc.d/lprng.sh $init;
chmod 755 $init;
if [ -f /etc/rc.conf ] ; then
perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf

View File

@@ -0,0 +1,28 @@
#!/bin/sh
PREFIX=/usr/local
LPD_PATH="/usr/local/sbin/lpd"
INSTALL="/usr/bin/install -c -o root -g wheel"
LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
LPD_CONF_PATH="/usr/local/etc/lpd.conf"
PRINTCAP_PATH="/usr/local/etc/printcap"
SYSCONFDIR=/usr/local/etc
SBINDIR=/usr/local/sbin
FILTER_DIR=/usr/local/libexec/filters
LOCKFILE="/var/run/lpd"
PSHOWALL="-ax"
VERSION=3.8.21
INIT=
MANDIR=/usr/local/man
#
# -- START --
# preremove.freebsd.sh,v 1.1 2001/08/21 20:33:17 root Exp
#
# This is the shell script that does the preremove
# lpd shutdown. It is the script from hell
echo RUNNING preremove.freebsd.sh parms "'$0 $@'"
if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
if [ "X$2" = "XDEINSTALL" ] ; then
echo "Stopping LPD"
killall -INT lpd
fi
exit 0

View File

@@ -1,12 +1,12 @@
The LPRng software is an enhanced, extended, and portable implementation
of the Berkeley LPR print spooler functionality. While providing the
same interface and meeting RFC1179 requirements, the implementation is
completely new and provides support for the following features:
completely different and provides support for the following features:
lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic
redirection of print queues; automatic job holding; highly verbose
diagnostics; multiple printers serving a single queue; client programs
do not need to run SUID root; greatly enhanced security checks; and a
greatly improved permission and authorization mechanism.
Author: Patrick Powell <papowell@lprng.com>
WWW: http://www.lprng.com/
FTP: ftp://ftp.lprng.com/

146
sysutils/LPRng/pkg-install Normal file
View File

@@ -0,0 +1,146 @@
#!/bin/sh
PREFIX=/usr/local
LPD_PATH="/usr/local/sbin/lpd"
INSTALL="/usr/bin/install -c -o root -g wheel"
LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
LPD_CONF_PATH="/usr/local/etc/lpd.conf"
PRINTCAP_PATH="/usr/local/etc/printcap"
SYSCONFDIR=/usr/local/etc
SBINDIR=/usr/local/sbin
FILTER_DIR=/usr/local/libexec/filters
LOCKFILE="/var/run/lpd"
PSHOWALL="-ax"
VERSION=3.8.21
INIT=
MANDIR=/usr/local/man
#
# -- START --
# postinstall.freebsd.sh,v 1.1 2001/08/21 20:33:16 root Exp
#
# If you are building a PORT, see the
# DISTRIBUTIONS/Freebsd directory for a complete port
# building package.
#
# This is the shell script that does the postinstall
# dynamic fixup
# It needs to be massaged with the information for
# various paths.
# If you are building a package, then you do NOT want
# to have this executed - it will put the sample files
# in place. You need to do this during the postinstall
# step in the package installation.
#
echo RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
fix () {
v=`echo $1 | sed -e 's/[:;].*//'`;
p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
if expr "$p" : "\|" >/dev/null ; then
echo "$v is a filter '$p'"
return 0
fi
echo "Putting $p in $d, using $v.sample"
if [ ! -d "$d" ] ; then
echo "Directory $d does not exist!"
mkdir -p $d
fi
if [ -f $v.sample ] ; then
if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
elif [ -f $v ] ; then
if [ $v != $p.sample ] ; then cp $v $p.sample; fi
else
echo "Do not have $v.sample or $v"
fi
if [ ! -f $p.sample ] ; then
echo "Do not have $p.sample"
elif [ ! -f $p ] ; then
chmod 644 $p.sample
cp $p.sample $p;
chmod 644 $p;
fi;
}
# we use the /usr/local/etc/rc.d method to start
# lpd
# we have to take them from one place and put in another
if [ "X$MAKEPACKAGE" = "XYES" ] ; then
hold=${DESTDIR}${PREFIX}/etc
echo "Setting up configuration files path for package" ${hold}
# we put files into the destination
if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
cp lpd.perms ${hold}/lpd.perms.sample
cp lpd.conf ${hold}/lpd.conf.sample
cp printcap ${hold}/printcap.sample
if [ "$INIT" != no ] ; then
cp init.freebsd ${hold}/lprng.sh
fi
elif [ "X$MAKEINSTALL" = XYES ] ; then
# we have the port pre-install operation
if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
# we have the dreaded standard installation
# try to make a symbolic link to
echo "Creating symbolic link from /usr/man to /usr/share/man"
v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
fi
echo "Setting up configuration files path for installation" ${hold}
hold=${DESTDIR}${PREFIX}/etc
if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
cp lpd.perms ${hold}/lpd.perms.sample
cp lpd.conf ${hold}/lpd.conf.sample
cp printcap ${hold}/printcap.sample
fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
if [ "$INIT" != no ] ; then
if [ -f /etc/rc.conf ] ; then
perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf
fi
cp init.freebsd ${hold}/lprng.sh
init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
echo "Setting up init script $init using init.freebsd"
if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
rm -f $init
cp init.freebsd $init
chmod 744 $init
echo "Stopping LPD"
kill -INT `ps ${PSHOWALL} | awk '/lpd/{ print $1;}'` >/dev/null 2>&1
sleep 2;
# check the printcap information
echo "Checking Printcap Info and fixing permissions"
${SBINDIR}/checkpc -f
# restart the server
echo "Restarting server"
sh $init start
fi
elif [ "X$2" = "XPOST-INSTALL" ] ; then
# when doing an install from a package we get the file from the package
hold=etc
if [ -f ${hold}/lpd.perms.sample ] ; then
fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
fix ${hold}/printcap "${PRINTCAP_PATH}"
if [ "$INIT" != no ] ; then
init=/usr/local/etc/rc.d/lprng.sh
cp ${hold}/lprng.sh $init;
chmod 755 $init;
if [ -f /etc/rc.conf ] ; then
perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf
fi
fi
else
echo "WARNING: configuration files missing from package! CWD " `pwd`
ls
exit 1
fi
elif [ "X$2" = "XPRE-INSTALL" ] ; then
# we have the port pre-install operation
if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
# we have the dreaded standard installation
# try to make a symbolic link to
echo "Creating symbolic link from /usr/man to /usr/share/man"
v=`ln -s /usr/share/man /usr/man`;
fi
fi
exit 0

View File

@@ -1,19 +1,25 @@
To activate the new printing system do the following:
To activate the LPRng printing system do the following:
- set `lpd_enable=NO' in /etc/rc.conf.
The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
- save your old printcap (`cp /etc/printcap /etc/printcap.save')
- set `lpd_enable=NO' in /etc/rc.conf
- run checkpc -f to make sure that necessary files have been created
- reboot or kill the old lpd (`killall lpd') and
start the new one (`@@PREFIX@@/sbin/lpd')
- remember to adjust your aliases or your PATH to use the new programs
start the new one (/usr/local/etc/rc.d/lprng.sh start)
Note that LPRng uses /etc/printcap, @@PREFIX@@/etc/lpd.conf, and
@@PREFIX@@/etc/lpd.perms
LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
For further information, have a look at:
@@PREFIX@@/share/doc/LPRng
For further information, see the LPRng Documentation:
DOCSDIR
also:
WWW: http://www.lprng.com/
The LPRng Web Site is http://www.lprng.com
Commercial support is available from Astart Technologies:
Patrick Powell Astart Technologies
papowell@astart.com 6741 Convoy Court
Network and System San Diego, CA 92111
Consulting 858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)

View File

@@ -1,17 +1,14 @@
bin/cancel
bin/lp
bin/lpq
bin/lpr
bin/lprm
bin/lpstat
@unexec if [ -f %D/etc/lpd.conf ]; then cmp -s %D/etc/lpd.conf.sample %D/etc/lpd.conf && rm -f %D/etc/lpd.conf || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/lpd.conf`` to remove config files left." | fmt ; fi
etc/lpd.conf.sample
@unexec if [ -f %D/etc/lpd.perms ]; then cmp -s %D/etc/lpd.perms.sample %D/etc/lpd.perms && rm -f %D/etc/lpd.perms || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/lpd.perms`` to remove config files left." | fmt ; fi
etc/lpd.perms.sample
etc/lprng.sh
etc/printcap.sample
etc/rc.d/lprng.sh
lib/liblpr.so
lib/liblpr.a
lib/liblpr.so.0
lib/liblpr.so
libexec/filters/lpbanner
libexec/filters/lpf
libexec/filters/pclbanner
@@ -21,45 +18,13 @@ sbin/lpc
sbin/lpd
sbin/lprng_certs
sbin/lprng_index_certs
share/doc/LPRng/CHANGES
share/doc/LPRng/LISA98.ppt
share/doc/LPRng/LPRng-HOWTO.dsl
share/doc/LPRng/LPRng-HOWTO.dtd
share/doc/LPRng/LPRng-HOWTO.html
share/doc/LPRng/LPRng-HOWTO.pdf
share/doc/LPRng/LPRng-HOWTO.sgml
share/doc/LPRng/LPRng.jpg
share/doc/LPRng/LPRngT-L.jpg
share/doc/LPRng/LPRngT-S.jpg
share/doc/LPRng/HTML/LPRng.jpg
share/doc/LPRng/HTML/LPRngT-L.jpg
share/doc/LPRng/HTML/LPRngT-S.jpg
share/doc/LPRng/HTML/chooser.png
share/doc/LPRng/HTML/clients.png
share/doc/LPRng/HTML/configfiles.png
share/doc/LPRng/HTML/filter.png
share/doc/LPRng/HTML/index.html
share/doc/LPRng/HTML/network.png
share/doc/LPRng/HTML/parallel.png
share/doc/LPRng/HTML/pooling.png
share/doc/LPRng/HTML/printserver.png
share/doc/LPRng/HTML/samba.png
share/doc/LPRng/HTML/serial.png
share/doc/LPRng/HTML/spooler.png
share/doc/LPRng/HTML/x_add.png
share/doc/LPRng/HTML/x_advanced.png
share/doc/LPRng/HTML/x_checkpc.png
share/doc/LPRng/HTML/x_edit.png
share/doc/LPRng/HTML/x_ifhpfilter.png
share/doc/LPRng/HTML/x_nup.png
share/doc/LPRng/HTML/x_open.png
share/doc/LPRng/HTML/x_printcaps.png
share/doc/LPRng/HTML/x_reread.png
share/doc/LPRng/HTML/x_results.png
share/doc/LPRng/HTML/x_smb.png
share/doc/LPRng/HTML/x_write.png
share/doc/LPRng/PDF/Cookbook.pdf
@dirrm libexec/filters
@dirrm share/doc/LPRng/HTML
@dirrm share/doc/LPRng/PDF
@dirrm share/doc/LPRng
share/doc/LPRng/license.txt
share/doc/LPRng/rfc1179.txt
share/doc/LPRng/y2k.txt
@dirrm share/doc/LPRng