--- rlpr-2.05.orig/config.h.in +++ rlpr-2.05/config.h.in @@ -13,8 +13,6 @@ * General Public License for more details. */ -#pragma ident "@(#)acconfig.h 1.2 99/11/01 meem" - #undef EXIT_SUCCESS #undef EXIT_FAILURE --- rlpr-2.05.orig/src/rlprm.h +++ rlpr-2.05/src/rlprm.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprm.h 1.1 99/09/16 meem" - #ifndef RLPRM_H #define RLPRM_H --- rlpr-2.05.orig/src/intl.h +++ rlpr-2.05/src/intl.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)intl.h 1.2 01/01/01 meem" - #ifndef INTL_H #define INTL_H --- rlpr-2.05.orig/src/rlpq.c +++ rlpr-2.05/src/rlpq.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlpq.c 1.1 99/09/16 meem" - #include #include #include --- rlpr-2.05.orig/src/util.h +++ rlpr-2.05/src/util.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)util.h 1.1 99/09/16 meem" - #ifndef UTIL_H #define UTIL_H --- rlpr-2.05.orig/src/rlprd.h +++ rlpr-2.05/src/rlprd.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprd.h 1.1 99/09/16 meem" - #ifndef RLPRD_H #define RLPRD_H --- rlpr-2.05.orig/src/rfc1179.h +++ rlpr-2.05/src/rfc1179.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rfc1179.h 1.1 99/09/16 meem" - #ifndef RFC1179_H #define RFC1179_H --- rlpr-2.05.orig/src/rlpq.h +++ rlpr-2.05/src/rlpq.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlpq.h 1.1 99/09/16 meem" - #ifndef RLPQ_H #define RLPQ_H --- rlpr-2.05.orig/src/component.c +++ rlpr-2.05/src/component.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)component.c 1.2 99/10/29 meem" - #include #include /* size_t */ #include --- rlpr-2.05.orig/src/rlpr.c +++ rlpr-2.05/src/rlpr.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlpr.c 1.2 01/01/01 meem" - #include #include #include @@ -551,16 +549,12 @@ * handle any extensions */ - switch (component_get_extension()) { - - case R_EXT_HPUX: + if(component_get_extension() == R_EXT_HPUX) { + if (rlpr_rlpr->write_back) + controlf_add(cf_fd, 'R', rlpr_rlpr->user, 0); - if (rlpr_rlpr->write_back) - controlf_add(cf_fd, 'R', rlpr_rlpr->user, 0); - - controlf_add(cf_fd, 'A', rlpr_rlpr->priority, 0); - controlf_add(cf_fd, 'O', rlpr_rlpr->options, 0); - break; + controlf_add(cf_fd, 'A', rlpr_rlpr->priority, 0); + controlf_add(cf_fd, 'O', rlpr_rlpr->options, 0); } } --- rlpr-2.05.orig/src/client.h +++ rlpr-2.05/src/client.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)client.h 1.1 99/09/16 meem" - #ifndef CLIENT_H #define CLIENT_H --- rlpr-2.05.orig/src/rlprd.c +++ rlpr-2.05/src/rlprd.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprd.c 1.1 99/09/16 meem" - #include #include #include @@ -67,7 +65,8 @@ struct component *comp; int listen_fd, client_fd; struct sockaddr_in sin_rlprd, sin_client; - int unused, on = 1; + socklen_t unused; + int on = 1; program_name = argv[0]; toggle_root(); @@ -271,7 +270,8 @@ static int register_sigchld(void) { - struct sigaction sa = { 0 }; + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); sa.sa_handler = catch_sigchld; #ifdef SA_RESTART --- rlpr-2.05.orig/src/client.c +++ rlpr-2.05/src/client.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)client.c 1.2 99/10/29 meem" - #include #include #include @@ -164,7 +162,7 @@ int client_open(int timeout) { - int sin_size = sizeof (struct sockaddr_in); + socklen_t sin_size = sizeof (struct sockaddr_in); struct sockaddr_in sin_local; struct sockaddr_in sin_dst; int sock_fd; --- rlpr-2.05.orig/src/msg.h +++ rlpr-2.05/src/msg.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)msg.h 1.1 99/09/16 meem" - #ifndef MSG_H #define MSG_H --- rlpr-2.05.orig/src/component.h +++ rlpr-2.05/src/component.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)component.h 1.1 99/09/16 meem" - #ifndef COMPONENT_H #define COMPONENT_H --- rlpr-2.05.orig/src/msg.c +++ rlpr-2.05/src/msg.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)msg.c 1.2 04/07/09 meem" - #include #include #include @@ -163,7 +161,7 @@ char buf[1024]; if (errno != 0) { - sprintf(buf, "%s: %s", _(format), strerror(errno)); + snprintf(buf, sizeof(buf), "%s: %s", _(format), strerror(errno)); format = buf; } else { format = _(format); --- rlpr-2.05.orig/src/rlpr.h +++ rlpr-2.05/src/rlpr.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlpr.h 1.1 99/09/16 meem" - #ifndef RLPR_H #define RLPR_H --- rlpr-2.05.orig/src/rlprrc.h +++ rlpr-2.05/src/rlprrc.h @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprrc.h 1.2 99/09/25 meem" - #ifndef RLPRRC_H #define RLPRCC_H --- rlpr-2.05.orig/src/rlprrc.c +++ rlpr-2.05/src/rlprrc.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprrc.c 1.3 99/10/29 meem" - #include #include #include --- rlpr-2.05.orig/src/util.c +++ rlpr-2.05/src/util.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)util.c 1.2 99/10/28 meem" - #include #include #include @@ -413,7 +411,7 @@ int retval; int orig_flags; int error = 0; - size_t error_len = sizeof (int); + socklen_t error_len = sizeof (int); fd_set fds; struct timeval tv; --- rlpr-2.05.orig/src/rlprm.c +++ rlpr-2.05/src/rlprm.c @@ -12,8 +12,6 @@ * General Public License for more details. */ -#pragma ident "@(#)rlprm.c 1.1 99/09/16 meem" - #include #include #include --- rlpr-2.05.orig/debian/control +++ rlpr-2.05/debian/control @@ -0,0 +1,20 @@ +Source: rlpr +Section: net +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ari Pollak +Standards-Version: 3.6.2 +Build-Depends: debhelper (>= 4.2.21), autotools-dev + +Package: rlpr +Architecture: any +Depends: ${shlibs:Depends} +Description: A utility for lpd printing without using /etc/printcap + Rlpr makes it possible (or at the very least, easier), to print files + on remote sites to your local printer, and vice versa. The rlpr + package includes BSD-compatible replacements for 'lpr', 'lpq', and + 'lprm', whose functionality is a superset of their BSD counterparts. In other + words, with the rlpr package, you can do everything you can do with the BSD + printing commands, and more. The programs contained within the rlpr + package are all GPL'd, and are more lightweight, cleaner and more + secure than their BSD counterparts. --- rlpr-2.05.orig/debian/docs +++ rlpr-2.05/debian/docs @@ -0,0 +1,3 @@ +debian/BSD-compat.txt +README +TODO --- rlpr-2.05.orig/debian/rules +++ rlpr-2.05/debian/rules @@ -0,0 +1,106 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture - qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture - qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + + +configure: config.status +config.status: + dh_testdir + # Add here commands to configure the package. +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + +build: configure build-stamp +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) CFLAGS='$(CFLAGS)' all + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + rm -f config.sub config.guess + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + + # Add here commands to install the package into debian/rlpr. + # + $(MAKE) DESTDIR=$(CURDIR)/debian/rlpr install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs NEWS + dh_installdocs + dh_installexamples + find . -type f -name "rlpr.pot" -exec rm -f {} \; +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- rlpr-2.05.orig/debian/changelog +++ rlpr-2.05/debian/changelog @@ -0,0 +1,191 @@ +rlpr (2.05-4ubuntu1) karmic; urgency=low + + * Added find . -type f -name "rlpr.pot" -exec rm -f {} \; to debian/rules to + correct FTBFS. The buildd's where complaining of po/rlpr.pot being empty + which caused the package not to build. (LP: #458600) + + -- Charlie Smotherman Thu, 22 Oct 2009 17:55:17 -0500 + +rlpr (2.05-4) unstable; urgency=low + + * Update config.{sub,guess} on configure (Closes: #535718) + + -- Ari Pollak Mon, 10 Aug 2009 12:00:57 -0400 + +rlpr (2.05-3) unstable; urgency=low + + * Fix preinst script that failed when /usr/doc/rlpr didn't exist + (Closes: #345381) + + -- Ari Pollak Fri, 30 Dec 2005 19:58:18 -0500 + +rlpr (2.05-2) unstable; urgency=low + + * Remove /usr/doc/rlpr symlink on upgrade (Closes: #338238) + + -- Ari Pollak Wed, 28 Dec 2005 17:06:52 -0500 + +rlpr (2.05-1) unstable; urgency=low + + * Adopt package + * New upstream release + * Clean up some compiler warnings + * Update rules file to use debhelper + * Update standards-version to 3.6.2; no changes required + * Acknowledge previous NMUs (Closes: #255402) + + -- Ari Pollak Thu, 11 Aug 2005 21:10:26 -0400 + +rlpr (2.02-8.0) unstable; urgency=medium + + * Non-maitnainer upload by the Security Team + * No-changes rebuilt so that the package for stable can migrate into + proposed updates, since the version needs to look like the following: + stable << proposed-updates << testing/unstable + + -- Martin Schulze Sat, 20 Nov 2004 10:12:10 +0100 + +rlpr (2.02-7.1) unstable; urgency=HIGH + + * NMU + * Merge changes from DSA-524. Closes: #255402 + * Fix format string vulnerability in msg() (CAN-2004-0393) + * Fix buffer overflow vulnerability in msg() (CAN-2004-0454) + + -- Joey Hess Thu, 7 Oct 2004 13:51:01 -0400 + +rlpr (2.02-7) unstable; urgency=medium + + * Modified postinst to ignore an existing /usr/doc/$package directory. + + -- Brian Mays Wed, 20 Mar 2002 11:21:15 -0500 + +rlpr (2.02-6) unstable; urgency=low + + * Removed "-g" gcc option as per policy. + * Fixed symlink /usr/doc -> ../share/doc. + * Fixed reference to GPL. + * Improved stripping of binaries. + + -- Brian Mays Sat, 2 Feb 2002 15:36:03 -0500 + +rlpr (2.02-5) unstable; urgency=low + + * Changed priority to "optional". + * Added documentation on creating the BSD compatibility symlinks. + + -- Brian Mays Sun, 25 Mar 2001 09:06:04 -0500 + +rlpr (2.02-4) unstable; urgency=low + + * Removed suidmanager support (I always hated that stupid program). + + -- Brian Mays Wed, 7 Feb 2001 11:58:03 -0500 + +rlpr (2.02-3) unstable; urgency=low + + * Fixed FHS /usr/doc -> /usr/share/doc transition scheme. + * Added suidregister support. (Closes: Bug#46259) + + -- Brian Mays Fri, 1 Oct 1999 15:10:08 -0400 + +rlpr (2.02-2) unstable; urgency=low + + * Modified to comply with the FHS. + + -- Brian Mays Thu, 16 Sep 1999 19:22:31 -0400 + +rlpr (2.02-1) unstable; urgency=low + + * New upstream version. + + -- Brian Mays Tue, 7 Sep 1999 09:42:14 -0400 + +rlpr (2.01-2) unstable; urgency=low + + * Fixed bug preventing the -N option from working when rlpr is run + by root. (Closes Bug#39229) + + -- Brian Mays Thu, 10 Jun 1999 16:18:31 -0400 + +rlpr (2.01-1) unstable; urgency=low + + * New upstream version. + + -- Brian Mays Fri, 14 May 1999 12:44:01 -0400 + +rlpr (2.00-1) unstable; urgency=low + + * New upstream version. + + -- Brian Mays Sun, 17 Jan 1999 10:30:41 -0500 + +rlpr (1.51-3) unstable; urgency=low + + * Fixed Bug#14325. + * Fixed problem in Makefile.in with installing /etc/rlprrc. + * Made /etc/rlprrc a configuration file. + + -- Brian Mays Wed, 3 Dec 1997 19:47:04 -0500 + +rlpr (1.51-2) unstable; urgency=low + + * Libc6 release. + + -- Brian Mays Tue, 5 Aug 1997 18:09:30 -0400 + +rlpr (1.51-1) unstable; urgency=low + + * New upstream version. + * New maintainer. + + -- Brian Mays Mon, 5 May 1997 10:22:50 -0400 + +rlpr (1.50-1) unstable; urgency=low + + * Upstream update + + -- Richard G. Roberto Wed, 16 Apr 1997 15:24:48 +0900 + +rlpr (1.43-1) unstable; urgency=low + + * Upstream update + + -- Richard Roberto Thu, 17 Jan 1997 14:49:43 +0900 + +rlpr (1.42-1) unstable; urgency=low + + * Upstream update + * New maintainer + + -- Richard Roberto Thu, 16 Jan 1997 13:39:43 +0900 + +rlpr (1.41-1) unstable; urgency=low + + * Upstream update + + -- Christoph Lameter Sun, 22 Dec 1996 15:52:54 -0800 + +rlpr (1.40-1) unstable; urgency=low + + * Upstream update + + -- Christoph Lameter Thu, 17 Oct 1996 08:20:56 +0800 + +rlpr (1.30-2) unstable; urgency=high + + * Received a fix for security hole from the author + + -- Christoph Lameter Sat, 12 Oct 1996 21:17:59 +0800 + +rlpr (1.30-1) unstable; urgency=low + + * New upstream release + + -- Christoph Lameter Sat, 12 Oct 1996 08:17:40 +0800 + +rlpr (1.21-1) unstable; urgency=low + + * Initial Release + + -- Christoph Lameter Sun, 15 Sep 1996 14:51:46 +0800 --- rlpr-2.05.orig/debian/BSD-compat.txt +++ rlpr-2.05/debian/BSD-compat.txt @@ -0,0 +1,27 @@ +Installing BSD symlinks +---------- --- -------- + +Since the "rlpr" "rlpq" and "rlprm" commands are complete replacements +for their BSD counterparts, the BSD commands by these names can be +actually replaced by symlinks to the rlpr versions. When the rlpr +commands are invoked with their BSD names, they will act like their BSD +counterparts (the "--verbose" option can be used to restore their +traditional behavior). + +On a Debian system, it is suggested that these symlinks should be placed +in the /usr/local/bin directory, so that they do not conflict with files +in any Debian packages. These links may be created with the following +commands: + + ln -s /usr/bin/rlpr /usr/local/bin/lpr + ln -s /usr/bin/rlpq /usr/local/bin/lpq + ln -s /usr/bin/rlprm /usr/local/bin/lprm + +Alternatively, each user can create these links for himself by adding an +additional directory to his PATH, say "/home/bem/bin", and making the +links with + + ln -s /usr/bin/rlpr /home/bem/bin/lpr + ln -s /usr/bin/rlpq /home/bem/bin/lpq + ln -s /usr/bin/rlprm /home/bem/bin/lprm + --- rlpr-2.05.orig/debian/preinst +++ rlpr-2.05/debian/preinst @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +case "$1" in + upgrade) + if [ -L /usr/doc/rlpr ]; then + rm -f /usr/doc/rlpr + fi + ;; +esac + +#DEBHELPER# --- rlpr-2.05.orig/debian/compat +++ rlpr-2.05/debian/compat @@ -0,0 +1 @@ +4 --- rlpr-2.05.orig/debian/copyright +++ rlpr-2.05/debian/copyright @@ -0,0 +1,20 @@ +This is the Debian GNU/Linux prepackaged version of rlpr. + +This package was put together by Christoph Lameter +, from sources obtained from: +http://truffula.com/rlpr/ + +Upstream author: peter memishian, meem@gnu.org + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in "/usr/share/common-licenses/GPL".