--- pchar-1.5.orig/debian/README.source +++ pchar-1.5/debian/README.source @@ -0,0 +1,2 @@ +This package uses quilt. See +/usr/share/doc/quilt/README.source. for details. --- pchar-1.5.orig/debian/changelog +++ pchar-1.5/debian/changelog @@ -0,0 +1,79 @@ +pchar (1.5-2) unstable; urgency=low + + * Let non-root users know why pchar do not work for them (Closes: + #660946). + * Added new patch hardening.patch to use compile flags from dpkg- + buildflags to enable Hardening. + + -- Petter Reinholdtsen Sat, 12 Oct 2013 14:34:24 +0200 + +pchar (1.5-1) unstable; urgency=low + + * Reupload to Debian based on old package found in + snapshot.debian.org (Closes: #660152). + * New upstream version. + * Update to use debhelper compat level 8 and rewrote build system to + use dh and quilt. + * Update watch file to point to new homepage. + * New patches: + - cxx-typo-getifinfo: Fix typo in C++ header. + - cxx-const-charp-warning: avoid warning from "string" casted to char*. + - destdir-install: Change install Makefile rule to use DESTDIR. + + -- Petter Reinholdtsen Thu, 16 Feb 2012 21:09:16 +0100 + +pchar (1.4-3) unstable; urgency=low + + * The "autoconf can bite me" release. + * Use two separate tests to check for libsnmp with and without ssl + support (Closes: #105294) + + -- Matt Zimmerman Sun, 15 Jul 2001 00:46:55 -0400 + +pchar (1.4-2) unstable; urgency=low + + * Rebuilt against ucd-snmp 4.2.1-5, which is no longer linked with + openssl (Closes: #102428) + + -- Matt Zimmerman Tue, 10 Jul 2001 17:58:44 -0400 + +pchar (1.4-1) unstable; urgency=low + + * New upstream version. + * Update -lsnmp test to try with -lcrypto, since libsnmp is now linked + against it. + + -- Matt Zimmerman Thu, 21 Jun 2001 13:13:47 -0400 + +pchar (1.3.2-1) unstable; urgency=low + + * New upstream version. + + -- Matt Zimmerman Sat, 14 Apr 2001 19:23:47 -0400 + +pchar (1.2-4) unstable; urgency=low + + * Recompiled against libsnmp4.2 + + -- Matt Zimmerman Sat, 27 Jan 2001 02:45:24 -0500 + +pchar (1.2-3) unstable; urgency=low + + * No longer ship pchar setuid; instead ask during configuration and (if + yes), add a statoverride. + + -- Matt Zimmerman Wed, 10 Jan 2001 21:17:27 -0500 + +pchar (1.2-2) unstable; urgency=low + + * Fix ".SH PCHAR" -> ".SH NAME" is pchar.8 so that whatis works + + -- Matt Zimmerman Sat, 16 Dec 2000 14:03:39 -0500 + +pchar (1.2-1) unstable; urgency=low + + * Initial Release. + + -- Matt Zimmerman Wed, 29 Nov 2000 17:31:04 -0500 + + --- pchar-1.5.orig/debian/compat +++ pchar-1.5/debian/compat @@ -0,0 +1 @@ +8 --- pchar-1.5.orig/debian/control +++ pchar-1.5/debian/control @@ -0,0 +1,16 @@ +Source: pchar +Section: net +Priority: extra +Maintainer: Petter Reinholdtsen +Build-Depends: debhelper (>= 8), autotools-dev, quilt, libsnmp-dev +Standards-Version: 3.9.1 +Homepage: http://www.kitchenlab.org/www/bmah/Software/pchar/ + +Package: pchar +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Characterize the bandwidth, latency and loss on network links + pchar is a reimplementation of the pathchar utility, written by Van + Jacobson. Both programs attempt to characterize the bandwidth, + latency, and loss of links along an end-to-end path through the + Internet. pchar works in both IPv4 and IPv6 networks. --- pchar-1.5.orig/debian/copyright +++ pchar-1.5/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Matt Zimmerman on +Wed, 29 Nov 2000 17:31:04 -0500. + +It was downloaded from http://www.employees.org/~bmah/Software/pchar/. +The 1.5 version was downloaded from +http://www.kitchenlab.org/www/bmah/Software/pchar/. + +Upstream Author: Bruce A. Mah + +Copyright: + +This work was first produced by an employee of Sandia National +Laboratories under a contract with the U.S. Department of Energy. +Sandia National Laboratories dedicates whatever right, title or +interest it may have in this software to the public. Although no +license from Sandia is needed to copy and use this software, copying +and using the software might infringe the rights of others. This +software is provided as-is. SANDIA DISCLAIMS ANY WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED. + +Contains software developed at Lawrence Berkeley Laboratory, and which +is "Copyright (c) 1995, 1996, 1997, 1998 The Regents of the University +of California." --- pchar-1.5.orig/debian/dirs +++ pchar-1.5/debian/dirs @@ -0,0 +1 @@ +usr/sbin --- pchar-1.5.orig/debian/docs +++ pchar-1.5/debian/docs @@ -0,0 +1,2 @@ +FAQ +README --- pchar-1.5.orig/debian/patches/cxx-const-charp-warning.patch +++ pchar-1.5/debian/patches/cxx-const-charp-warning.patch @@ -0,0 +1,63 @@ +Description: Avoid warnings from C++ regarding static strings being used as char* + Make sure static strings are returned as const char* instead of char*. +Author: Petter Reinholdtsen +Forwarded: no +Last-Update: 2012-02-16 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- pchar-1.5.orig/main.cc ++++ pchar-1.5/main.cc +@@ -292,7 +292,7 @@ + // + // Output: ASCII representation of network protocol name. + // +-char *GetPrintableNetworkProtocol(NetworkProtocolType np) ++const char *GetPrintableNetworkProtocol(NetworkProtocolType np) + { + switch (np) { + case (NetworkProtocolIpv4Udp): +--- pchar-1.5.orig/PctestIpv4.h ++++ pchar-1.5/PctestIpv4.h +@@ -77,7 +77,7 @@ + virtual char *GetPrintableAddress(); + virtual char *GetPrintableAddress(void *a); + virtual char *GetName(void *a); +- virtual char *GetAddressFamilyString() { return "AF_INET"; }; ++ virtual const char *GetAddressFamilyString() { return "AF_INET"; }; + virtual int GetAddressFamily() { return (AF_INET); }; + + protected: +--- pchar-1.5.orig/PctestIpv6.h ++++ pchar-1.5/PctestIpv6.h +@@ -82,7 +82,7 @@ + virtual char *GetPrintableAddress(); + virtual char *GetPrintableAddress(void *a); + virtual char *GetName(void *a); +- virtual char *GetAddressFamilyString() { return "AF_INET6"; } ++ virtual const char *GetAddressFamilyString() { return "AF_INET6"; } + virtual int GetAddressFamily() { return (AF_INET6); } + + protected: +--- pchar-1.5.orig/Pctest.h ++++ pchar-1.5/Pctest.h +@@ -86,7 +86,7 @@ + virtual char *GetPrintableAddress() = 0; + virtual char *GetPrintableAddress(void *a) = 0; + virtual char *GetName(void *a) = 0; +- virtual char *GetAddressFamilyString() = 0; ++ virtual const char *GetAddressFamilyString() = 0; + virtual int GetAddressFamily() = 0; + + // Get input and output sockets needed --- pchar-1.5.orig/debian/patches/cxx-typo-getifinfo.patch +++ pchar-1.5/debian/patches/cxx-typo-getifinfo.patch @@ -0,0 +1,29 @@ +Description: Fix typo in C++ header. +Author: Petter Reinholdtsen +Forwarded: no +Last-Update: 2012-02-16 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- pchar-1.5.orig/GetIfInfo.h ++++ pchar-1.5/GetIfInfo.h +@@ -17,7 +17,7 @@ + bool IsValid(void); + + const char * GetDescription(void) const; +- const char * GetIfInfo::GetName(void) const; ++ const char * GetName(void) const; + const char * GetContact(void) const; + const char * GetLocation(void) const; + const char * GetIfDescription(void) const; --- pchar-1.5.orig/debian/patches/destdir-install.patch +++ pchar-1.5/debian/patches/destdir-install.patch @@ -0,0 +1,45 @@ +Description: Fix install rule to use DESTDIR +Author: Petter Reinholdtsen +Forwarded: no +Last-Update: 2012-02-16 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- pchar-1.5.orig/Makefile.in ++++ pchar-1.5/Makefile.in +@@ -24,6 +24,7 @@ + VPATH=@srcdir@ + INCLUDE_DIR=@srcdir@ + ++DESTDIR= + prefix=@prefix@ + exec_prefix=@exec_prefix@ + sbindir=@sbindir@ +@@ -199,12 +200,12 @@ + install: install-program install-man + + install-program: all +- $(MKINSTALLDIRS) ${sbindir} +- $(INSTALL_PROGRAM) $(A.OUT) $(sbindir)/`echo $(A.OUT) | sed '$(TRANSFORM)'` ++ $(MKINSTALLDIRS) $(DESTDIR)${sbindir} ++ $(INSTALL_PROGRAM) $(A.OUT) $(DESTDIR)$(sbindir)/`echo $(A.OUT) | sed '$(TRANSFORM)'` + + install-man: +- $(MKINSTALLDIRS) ${mandir}/man8 +- $(INSTALL_DATA) ${srcdir}/pchar.8 ${mandir}/man8/pchar.8 ++ $(MKINSTALLDIRS) $(DESTDIR)${mandir}/man8 ++ $(INSTALL_DATA) ${srcdir}/pchar.8 $(DESTDIR)${mandir}/man8/pchar.8 + + # + # clean --- pchar-1.5.orig/debian/patches/hardening.patch +++ pchar-1.5/debian/patches/hardening.patch @@ -0,0 +1,28 @@ +Index: pchar-1.5/Makefile.in +=================================================================== +--- pchar-1.5.orig/Makefile.in 2013-10-12 14:27:29.417521246 +0200 ++++ pchar-1.5/Makefile.in 2013-10-12 14:29:56.518261059 +0200 +@@ -47,17 +48,22 @@ + # + DFLAGS= @DEFS@ + ++# Debian hardening ++CPPEXTRA:=$(shell dpkg-buildflags --get CPPFLAGS) ++CXXEXTRA:=$(shell dpkg-buildflags --get CXXFLAGS) ++LDEXTRA:=$(shell dpkg-buildflags --get LDFLAGS) ++ + # + # Compilation flags + # +-LDFLAGS=@LDFLAGS@ ++LDFLAGS=@LDFLAGS@ $(LDEXTRA) + LIBS=@LIBS@ + IFLAGS=@CPPFLAGS@ -I$(srcdir) + + # + # Other cc options get defined here. + # +-CXXFLAGS=@CXXFLAGS@ $(IFLAGS) $(DFLAGS) ++CXXFLAGS=@CXXFLAGS@ $(IFLAGS) $(DFLAGS) $(CPPEXTRA) $(CXXEXTRA) + + # --- pchar-1.5.orig/debian/patches/root-required.patch +++ pchar-1.5/debian/patches/root-required.patch @@ -0,0 +1,37 @@ +Description: Give more sensible message when running as non-root +Author: Petter Reinholdtsen +Forwarded: no +Last-Update: 2013-10-12 + +Bug-Debian: http://bugs.debian.org/660946 +Forwarded: no +Reviewed-By: Petter Reinholdtsen +Last-Update: 2013-10-12 + +--- pchar-1.5.orig/README ++++ pchar-1.5/README +@@ -12,6 +12,10 @@ + latency, and loss of links along an end-to-end path through the + Internet. pchar works in both IPv4 and IPv6 networks. + ++The pchar program requires root privileges to send the network ++packages. It might be safe to make suid root, but no-one know for ++sure. ++ + As of pchar-1.5, this program is no longer under active development, + and no further releases are planned. + +--- pchar-1.5.orig/main.cc ++++ pchar-1.5/main.cc +@@ -339,6 +339,11 @@ + int c; // getopt + Pctest *pct = NULL; // test structure + ++ if (0 != geteuid()) { ++ fprintf(stderr, "error: the pchar program requries root privilges to work.\n"); ++ return 0; ++ } ++ + // Parse command-line arguments using getopt + while ((c = getopt(argc, argv, "a:b:cCd:g:G:hH:i:I:l:m:M:np:P:qR:r:s:St:T:vVw:")) != -1) { + --- pchar-1.5.orig/debian/patches/series +++ pchar-1.5/debian/patches/series @@ -0,0 +1,5 @@ +cxx-typo-getifinfo.patch +cxx-const-charp-warning.patch +destdir-install.patch +root-required.patch +hardening.patch --- pchar-1.5.orig/debian/rules +++ pchar-1.5/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with autotools_dev -with quilt --- pchar-1.5.orig/debian/watch +++ pchar-1.5/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.kitchenlab.org/www/bmah/Software/pchar/ pchar-(.*)\.tar\.gz