Bug 51010 - Update to LPRng port - security fix, Reference: Debian Security Advisory DSA 285-1
Summary: Update to LPRng port - security fix, Reference: Debian Security Advisory DSA ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Foxfair Hu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-16 01:20 UTC by papowell
Modified: 2003-04-21 14:35 UTC (History)
0 users

See Also:


Attachments
file.diff (19.12 KB, patch)
2003-04-16 01:20 UTC, papowell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description papowell 2003-04-16 01:20:10 UTC
Reference: Debian Security Advisory DSA 285-1
This update fixes the security bug.

Port Maintainers:  please delete the existing /usr/ports/sysutils/LPRng
files and replace it with the current files.  The current port is VERY
out of date.

Please contact me (I am the port maintainer) if there are any questions
by phone at the number below, or send email to:  darin@astart.com
with any concerns.

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)

Fix: Please note that I am including both a DIFF and complete
set of files for the port.  Please make sure to delete all
of the existing /usr/ports/sysutils/LPRng files in the CVS repository
before installing the new ones.  This was not done last time and
problems occurred.

Patrick Powell

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	LPRng
#	LPRng/Makefile
#	LPRng/pkg-message
#	LPRng/pkg-install
#	LPRng/pkg-descr
#	LPRng/pkg-deinstall
#	LPRng/pkg-comment
#	LPRng/files-pkg-message
#	LPRng/distinfo
#	LPRng/pkg-plist
#
echo c - LPRng
mkdir -p LPRng > /dev/null 2>&1
echo x - LPRng/Makefile
sed 's/^X//' >LPRng/Makefile << 'END-of-LPRng/Makefile'
X# New ports collection makefile for:	LPRng
X# Date created:		2 Apr 1997
X# Whom:			desmo@bandwidth.org
X#
X# $FreeBSD: ports/sysutils/LPRng/Makefile,v 1.22 2003/01/03 08:26:35 ijliao Exp $
X#
X
XPORTNAME=LPRng
XPORTVERSION=3.8.21
XCATEGORIES=	sysutils print
XMASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
X		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
X		ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
X		ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
X		ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
XMASTER_SITE_SUBDIR=	LPRng/LPRng
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	papowell@astart.com
X
XGNU_CONFIGURE=	yes
XINSTALLS_SHLIB=	yes
X
XCONFIGURE_ARGS= \
X	--with-ldopts="-L${LOCALBASE}/lib" \
X	--with-ccopts="-I${LOCALBASE}/include" \
X	--with-filterdir=${PREFIX}/libexec/filters \
X	--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
X	--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin"
X.if defined(PREFIX)
X  CONFIGURE_ARGS+=  --prefix="${PREFIX}"
X.endif
X.if defined(SYSCONFDIR)
X  CONFIGURE_ARGS+=  --sysconfdir="${SYSCONFDIR}"
X.endif
X
X
XMAN1=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
XMAN5=printcap.5 lpd.conf.5 lpd.perms.5
XMAN8=lpc.8 checkpc.8 lpd.8
X
Xpre-everything::
X	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
X	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc clean all install"
X	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
X		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
X		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
X		${ECHO_MSG} "   ln -s /usr/share/man /usr/man"; \
X		${ECHO_MSG} "If you do not, you will retain the old FreeBSD man pages."; \
X		${ECHO_MSG} "See the hier(7) man page for details of the FreeBSD file system"; \
X		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
X		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
X	fi
X
Xpost-install:
X.if !defined(NOPORTSDOCS)
X	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
X.for ext in html pdf ppt ps txt gif jpg png
X	for i in `ls ${WRKSRC}/HOWTO | ${GREP} "\.${ext}$$"`; \
X		do ${INSTALL_DATA} ${WRKSRC}/HOWTO/$$i ${DOCSDIR}; done
X.endfor
X.endif
X	@${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-LPRng/Makefile
echo x - LPRng/pkg-message
sed 's/^X//' >LPRng/pkg-message << 'END-of-LPRng/pkg-message'
X
XTo activate the LPRng printing system do the following:
X
X- set `lpd_enable=NO' in /etc/rc.conf.
X  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
X
X- run checkpc -f to make sure that necessary files have been created
X
X- reboot or kill the old lpd (`killall lpd') and
X  start the new one (/usr/local/etc/rc.d/lprng.sh start)
X
XLPRng uses the printcap, lpd.conf, and lpd.perms configuration files
X
XFor further information, see the LPRng Documentation:
X  /usr/local/share/doc/LPRng
X
XThe LPRng Web Site is http://www.lprng.com
X
XCommercial support is available from Astart Technologies:
X
XPatrick Powell                 Astart Technologies
Xpapowell@astart.com            6741 Convoy Court
XNetwork and System             San Diego, CA 92111
X  Consulting                   858-874-6543 FAX 858-751-2435
XLPRng - Print Spooler (http://www.lprng.com)
END-of-LPRng/pkg-message
echo x - LPRng/pkg-install
sed 's/^X//' >LPRng/pkg-install << 'END-of-LPRng/pkg-install'
X#!/bin/sh
XPREFIX=/usr/local
XLPD_PATH="/usr/local/sbin/lpd"
XINSTALL="/usr/bin/install -c -o root -g wheel"
XLPD_PERMS_PATH="/usr/local/etc/lpd.perms"
XLPD_CONF_PATH="/usr/local/etc/lpd.conf"
XPRINTCAP_PATH="/usr/local/etc/printcap"
XSYSCONFDIR=/usr/local/etc
XSBINDIR=/usr/local/sbin
XFILTER_DIR=/usr/local/libexec/filters
XLOCKFILE="/var/run/lpd"
XPSHOWALL="-ax"
XVERSION=3.8.21
XINIT=
XMANDIR=/usr/local/man
X#
X# -- START --
X# postinstall.freebsd.sh,v 1.1 2001/08/21 20:33:16 root Exp
X#
X#  If you are building a PORT, see the
X#  DISTRIBUTIONS/Freebsd directory for a complete port
X#  building package.
X# 
X# This is the shell script that does the postinstall
X# dynamic fixup
X#  It needs to be massaged with the information for
X#  various paths.
X# If you are building a package,  then you do NOT want
X#  to have this executed - it will put the sample files
X#  in place.  You need to do this during the postinstall
X#  step in the package installation.
X#
Xecho RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
Xif [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
Xfix () {
X    v=`echo $1 | sed -e 's/[:;].*//'`;
X    p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
X    if expr "$p" : "\|" >/dev/null ; then
X        echo "$v is a filter '$p'" 
X        return 0
X    fi
X    echo "Putting $p in $d, using $v.sample"
X    if [ ! -d "$d" ] ; then
X        echo "Directory $d does not exist!"
X        mkdir -p $d
X    fi
X    if [ -f $v.sample ] ; then
X        if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
X    elif [ -f $v ] ; then
X        if [ $v != $p.sample ] ; then cp $v $p.sample; fi
X    else
X        echo "Do not have $v.sample or $v"
X    fi
X    if [ ! -f $p.sample ] ; then
X        echo "Do not have $p.sample"
X    elif [ ! -f $p ] ; then
X        chmod 644 $p.sample
X        cp $p.sample $p;
X        chmod 644 $p;
X    fi;
X}
X# we use the /usr/local/etc/rc.d method to start
X# lpd
X# we have to take them from one place and put in another
Xif [ "X$MAKEPACKAGE" = "XYES" ] ; then
X    hold=${DESTDIR}${PREFIX}/etc
X    echo "Setting up configuration files path for package" ${hold}
X    # we put files into the destination
X    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
X    cp lpd.perms ${hold}/lpd.perms.sample
X    cp lpd.conf ${hold}/lpd.conf.sample
X    cp printcap ${hold}/printcap.sample
X    if [ "$INIT" != no ] ; then
X        cp init.freebsd ${hold}/lprng.sh
X    fi
Xelif [ "X$MAKEINSTALL" = XYES ] ; then
X	# we have the port pre-install operation
X	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
X		# we have the dreaded standard installation
X		# try to make a symbolic link to 
X		echo "Creating symbolic link from /usr/man to /usr/share/man"
X		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
X	fi
X    echo "Setting up configuration files path for installation" ${hold}
X    hold=${DESTDIR}${PREFIX}/etc
X    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
X    cp lpd.perms ${hold}/lpd.perms.sample
X    cp lpd.conf ${hold}/lpd.conf.sample
X    cp printcap ${hold}/printcap.sample
X
X    fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
X    fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
X    fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
X
X    if [ "$INIT" != no ] ; then
X		if [ -f /etc/rc.conf ] ; then
X			perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf 
X		fi
X		cp init.freebsd ${hold}/lprng.sh
X		init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
X		echo "Setting up init script $init using init.freebsd"
X		if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
X		rm -f $init
X		cp init.freebsd $init
X		chmod 744 $init
X
X		echo "Stopping LPD"
X		kill -INT `ps ${PSHOWALL} | awk '/lpd/{ print $1;}'` >/dev/null 2>&1
X		sleep 2;
X		# check the printcap information
X		echo "Checking Printcap Info and fixing permissions"
X		${SBINDIR}/checkpc -f
X		# restart the server
X		echo "Restarting server"
X		sh $init start
X    fi
Xelif [ "X$2" = "XPOST-INSTALL" ] ; then
X    # when doing an install from a package we get the file from the package
X    hold=etc
X    if [ -f ${hold}/lpd.perms.sample ] ; then
X        fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
X        fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
X        fix ${hold}/printcap "${PRINTCAP_PATH}"
X		if [ "$INIT" != no ] ; then
X			init=/usr/local/etc/rc.d/lprng.sh
X			cp ${hold}/lprng.sh $init;
X			chmod 755 $init;
X			if [ -f /etc/rc.conf ] ; then
X				perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf 
X			fi
X		fi
X    else
X        echo "WARNING: configuration files missing from package! CWD " `pwd`
X        ls
X        exit 1
X    fi
Xelif [ "X$2" = "XPRE-INSTALL" ] ; then
X	# we have the port pre-install operation
X	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
X		# we have the dreaded standard installation
X		# try to make a symbolic link to 
X		echo "Creating symbolic link from /usr/man to /usr/share/man"
X		v=`ln -s /usr/share/man /usr/man`;
X	fi
Xfi
Xexit 0
END-of-LPRng/pkg-install
echo x - LPRng/pkg-descr
sed 's/^X//' >LPRng/pkg-descr << 'END-of-LPRng/pkg-descr'
XThe LPRng software is an enhanced, extended, and portable implementation
Xof the Berkeley LPR print spooler functionality.  While providing the
Xsame interface and meeting RFC1179 requirements, the implementation is
Xcompletely different and provides support for the following features:
Xlightweight (no databases needed) lpr, lpc, and lprm programs; dynamic
Xredirection of print queues; automatic job holding; highly verbose
Xdiagnostics; multiple printers serving a single queue; client programs
Xdo not need to run SUID root; greatly enhanced security checks; and a
Xgreatly improved permission and authorization mechanism.
X
XWWW: http://www.lprng.com/
XFTP: ftp://ftp.lprng.com/
END-of-LPRng/pkg-descr
echo x - LPRng/pkg-deinstall
sed 's/^X//' >LPRng/pkg-deinstall << 'END-of-LPRng/pkg-deinstall'
X#!/bin/sh
XPREFIX=/usr/local
XLPD_PATH="/usr/local/sbin/lpd"
XINSTALL="/usr/bin/install -c -o root -g wheel"
XLPD_PERMS_PATH="/usr/local/etc/lpd.perms"
XLPD_CONF_PATH="/usr/local/etc/lpd.conf"
XPRINTCAP_PATH="/usr/local/etc/printcap"
XSYSCONFDIR=/usr/local/etc
XSBINDIR=/usr/local/sbin
XFILTER_DIR=/usr/local/libexec/filters
XLOCKFILE="/var/run/lpd"
XPSHOWALL="-ax"
XVERSION=3.8.21
XINIT=
XMANDIR=/usr/local/man
X#
X# -- START --
X# preremove.freebsd.sh,v 1.1 2001/08/21 20:33:17 root Exp
X#
X# This is the shell script that does the preremove
X# lpd shutdown.  It is the script from hell
Xecho RUNNING preremove.freebsd.sh parms "'$0 $@'"
Xif [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
Xif [ "X$2" = "XDEINSTALL" ] ; then
X	echo "Stopping LPD"
X	killall -INT lpd
Xfi
Xexit 0
END-of-LPRng/pkg-deinstall
echo x - LPRng/pkg-comment
sed 's/^X//' >LPRng/pkg-comment << 'END-of-LPRng/pkg-comment'
XAn Enhanced Printer Spooler
END-of-LPRng/pkg-comment
echo x - LPRng/files-pkg-message
sed 's/^X//' >LPRng/files-pkg-message << 'END-of-LPRng/files-pkg-message'
X
XTo activate the LPRng printing system do the following:
X
X- set `lpd_enable=NO' in /etc/rc.conf.
X  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
X
X- run checkpc -f to make sure that necessary files have been created
X
X- reboot or kill the old lpd (`killall lpd') and
X  start the new one (/usr/local/etc/rc.d/lprng.sh start)
X
XLPRng uses the printcap, lpd.conf, and lpd.perms configuration files
X
XFor further information, see the LPRng Documentation:
X  DOCSDIR
X
XThe LPRng Web Site is http://www.lprng.com
X
XCommercial support is available from Astart Technologies:
X
XPatrick Powell                 Astart Technologies
Xpapowell@astart.com            6741 Convoy Court
XNetwork and System             San Diego, CA 92111
X  Consulting                   858-874-6543 FAX 858-751-2435
XLPRng - Print Spooler (http://www.lprng.com)
END-of-LPRng/files-pkg-message
echo x - LPRng/distinfo
sed 's/^X//' >LPRng/distinfo << 'END-of-LPRng/distinfo'
XMD5 (LPRng-3.8.21.tgz) = 396d0a49a4533ad973176efa9bf054b1
END-of-LPRng/distinfo
echo x - LPRng/pkg-plist
sed 's/^X//' >LPRng/pkg-plist << 'END-of-LPRng/pkg-plist'
Xbin/lpq
Xbin/lpr
Xbin/lprm
Xbin/lpstat
Xetc/lpd.conf.sample
Xetc/lpd.perms.sample
Xetc/lprng.sh
Xetc/printcap.sample
Xlib/liblpr.a
Xlib/liblpr.la
Xlib/liblpr.so.0
Xlibexec/filters/lpbanner
Xlibexec/filters/lpf
Xlibexec/filters/pclbanner
Xlibexec/filters/psbanner
Xsbin/checkpc
Xsbin/lpc
Xsbin/lpd
Xsbin/lprng_certs
Xsbin/lprng_index_certs
Xshare/doc/LPRng/LISA98.ppt
Xshare/doc/LPRng/LPRng-HOWTO.html
Xshare/doc/LPRng/LPRng-HOWTO.pdf
Xshare/doc/LPRng/LPRng.jpg
Xshare/doc/LPRng/LPRngT-L.jpg
Xshare/doc/LPRng/LPRngT-S.jpg
Xshare/doc/LPRng/license.txt
Xshare/doc/LPRng/rfc1179.txt
Xshare/doc/LPRng/y2k.txt
X@dirrm  share/doc/LPRng
END-of-LPRng/pkg-plist
exit

####################################  --- DIFFS #################################
How-To-Repeat: Reference: Debian Security Advisory DSA 285-1
Comment 1 Foxfair Hu freebsd_committer 2003-04-18 05:51:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->foxfair

Assign this PR to a person willing to do it.
Comment 2 Foxfair Hu freebsd_committer 2003-04-21 14:29:47 UTC
State Changed
From-To: open->closed

patch committed, thanks!