--- lft-2.2.orig/HOWTO-UsersLFT.txt +++ lft-2.2/HOWTO-UsersLFT.txt @@ -0,0 +1,27 @@ +HOWTO-UsersLFT.txt +Instructions for an admin to allow users to run LFT + +LFT requires certain system privileges to send customized packets. +As distributed by Debian this only works for the root user. + +The admin can follow these instructions to allow normal users to run LFT. +However, the admin should contemplate the following issues before making +the change: +1) Ease of use +2) Danger of a bug in a setuid program +3) Safety of users not needing the root password +4) Other alternative solutions such as sudo etc. +5) Various system monitoring processes might freak out at the +appearance of a new SUID program in /usr/bin +6) Admin will have to run the chmod command (step #3) after each upgrade +of the lft package + +Here is the step by step procedure: +1) Admin logs in as root, runs following two commands +2) ln -s /usr/sbin/lft /usr/bin/lft +3) chmod a+s /usr/bin/lft +4) login as a regular user and test it. + +Note that the admin will have to execute step 3 after each lft package +upgrade. + --- lft-2.2.orig/Makefile +++ lft-2.2/Makefile @@ -0,0 +1,71 @@ +# +# This file is part of LFT. +# +# The LFT software provided in this Distribution is +# Copyright 2002 MainNerve, Inc. +# +# The full text of our legal notices is contained in the file called +# COPYING, included with this Distribution. + +# Normal command to build LFT: +# make -f Makefile. + +# refers to the *standard* compiler/OS on the given system. +# +# bsd generic BSD 4.3 +# solaris GCC Solaris +# linux generic Linux +# darwin darwin - Mac OS X + + +# Directory where LFT will be installed: + +prefix=/usr/local +exec_prefix=${prefix} +bindir=${exec_prefix}/bin +mandir=${prefix}/man +INSTALL=/usr/bin/install -c +LN=ln -s + +# Commands/References + +CC=gcc +CFLAGS=-g -O2 -I/usr/include/pcap +LIBS=-lpcap -lnsl -lm -lresolv -lnsl +LDFLAGS= + +CAT=cat +CD=cd +MKDIR=mkdir -p +BUILDTYPE=build +RM=rm -rf +SH=sh +SYSTEM=unix +TOOLS=tools +TOUCH=touch + + +# Specifics + +OBJS=lft.o lft_ifname.o whois.o + +all: lft + +lft: $(OBJS) + $(CC) -o lft $(OBJS) $(LDFLAGS) $(LIBS) -lm + +whois-test: whois.o + $(CC) -o whois-test whois.c -DSTANDALONE $(LDFLAGS) $(LIBS) -lm + +install: lft lft.8 + test -d $(bindir)/. || $(MKDIR) $(bindir) + $(INSTALL) lft $(bindir)/lft + @ ( echo chown root $(bindir)/lft && chown root $(bindir)/lft && echo chmod u+s $(bindir)/lft && chmod u+s $(bindir)/lft ) || echo "***" WARNING: could not set $(bindir) suid to root + test -d $(mandir)/man8/. || $(MKDIR) $(mandir)/man8 + $(INSTALL) lft.8 $(mandir)/man8/lft.8 + +clean: + $(RM) *.o core* lft *~ + +distclean: + $(RM) Makefile acconfig.h config.log config.status --- lft-2.2.orig/acconfig.h +++ lft-2.2/acconfig.h @@ -0,0 +1,164 @@ +/* acconfig.h. Generated by configure. */ +/* acconfig.h.in. */ + +/* Host system type */ +#define HOST_SYSTEM_TYPE "x86_64-pc-linux-gnu" + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have and it should be used (not on Ultrix). */ +#define HAVE_ALLOCA_H 1 + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have and it should be used (not on Ultrix). */ +#define HAVE_ALLOCA_H 1 + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have and it should be used (not on Ultrix). */ +#define HAVE_ALLOCA_H 1 + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Linux requires this in order to have the right network structures. */ +#define _BSD_SOURCE + +/* Define if you have the gettimeofday function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the m library (-lm). */ +#define HAVE_LIBM 1 + +/* Define if you have the nsl library (-lnsl). */ +#define HAVE_LIBNSL 1 + +/* Define if you have the pcap library (-lpcap). */ +#define HAVE_LIBPCAP 1 + +/* Define if you have the socket library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define if this is a BSD TCP/IP stack */ +/* #undef BSD_IP_STACK */ + +/* Define if solaris munges the th_sum field in its own special way */ +/* #undef SOLARIS_LENGTH_IN_CHECKSUM */ + +/* Define if your system has a sa_len member in struct sockaddr */ +/* #undef HAVE_SOCKADDR_SA_LEN */ --- lft-2.2.orig/debian/changelog +++ lft-2.2/debian/changelog @@ -0,0 +1,95 @@ +lft (2.2-5) unstable; urgency=medium + + * QA upload. + * Set maintainer to Debian QA Group. (see #848570) + * Use autotools-dev to update config.{sub,guess} to fix + FTBFS on arm64 and ppc64el. (Closes: #755790) + + -- Adrian Bunk Mon, 20 Mar 2017 17:02:59 +0200 + +lft (2.2-4) unstable; urgency=low + + * Moved homepage from description to regular control file field. + This fixes lintian description-contains-homepage + (Closes: #615253) + * Upgrade standards version from 3.6.2.0 to 3.9.1.0 + This fixes lintian ancient-standards-version + * Upgraded dh compat from 4 to 8. Updated control and compat to match. + This fixes lintian package-uses-deprecated-debhelper-compat-version + * Added ${misc:Depends} to control + This fixes lintian debhelper-but-no-misc-depends + * Changed clean target from: + -$(MAKE) clean distclean + To: + [ ! -f Makefile ] || $(MAKE) distclean + This fixes lintian debian-rules-ignores-make-clean-error + * Changed from dh_clean -k to dh_prep + This fixes lintian dh-clean-k-is-deprecated + + -- Vince Mulhollon Fri, 11 Mar 2011 09:12:42 -0600 + +lft (2.2-3.1) unstable; urgency=low + + * Porter NMU. + * Update config.guess/config.sub (closes: #333824) + * Add an empty binary-indep target (closes: #395710) + + -- Aurelien Jarno Sun, 11 Mar 2007 22:45:05 +0100 + +lft (2.2-3) unstable; urgency=low + + * Adopting this package (closes: #312840) + + * Standards compliant to 3.6.2.0 + + * Added a documentation file called HOWTO-UsersLFT.txt which + attempts to explain how to symlink and SUID the binary so + nonroot users can use it. + * Minor addition to the manpage to reflect the above + + -- Vince Mulhollon Sun, 24 Jul 2005 14:48:18 -0500 + +lft (2.2-2) unstable; urgency=low + + * QA Group upload orphaning this package + * Incorporates previous NMUs (closes: #187386, #214827) + * debian/control: clarified package description (closes: #244085) + + -- Andrew Pollock Mon, 4 Jul 2005 21:04:26 +1000 + +lft (2.2-1.2) unstable; urgency=low + + * NMU (65 days old RC bug). + * lft binary moved from /usr/bin to /usr/sbin. It may be on /usr/bin if + needed for all users, not only for admins, but it needs to be suid to use + raw sockets. The package has no debconf support currently. Perhaps it is + good to ask for it to be suid in debconf configuration (closes: #214827). + + -- Andres Seco Hernandez Sat, 13 Dec 2003 21:18:03 +0100 + +lft (2.2-1.1) unstable; urgency=low + + * NMU (3 months old easy RC bug). + * Updated config.sub/config.guess from the latest autotools-dev package + in sid (closes: #187386). + + -- Julien BLACHE Sun, 13 Jul 2003 16:15:30 +0200 + +lft (2.2-1) unstable; urgency=low + + * New upstram release. + * New maintainer. + + -- Andrea Fanfani Thu, 3 Jul 2003 23:50:42 +0200 + +lft (2.1-1) unstable; urgency=medium + + * New upstream release + + -- Marco d'Itri Tue, 1 Apr 2003 12:14:19 +0200 + +lft (2.0-1) unstable; urgency=low + + * First release. + + -- Marco d'Itri Tue, 11 Feb 2003 11:52:41 +0100 --- lft-2.2.orig/debian/compat +++ lft-2.2/debian/compat @@ -0,0 +1 @@ +8 --- lft-2.2.orig/debian/control +++ lft-2.2/debian/control @@ -0,0 +1,20 @@ +Source: lft +Section: net +Priority: optional +Homepage: http://www.mainnerve.com/lft/index.html +Maintainer: Debian QA Group +Build-Depends: debhelper (>= 8), autotools-dev, libpcap-dev +Standards-Version: 3.9.1.0 + +Package: lft +Architecture: any +Depends: ${shlibs:Depends},${misc:Depends} +Description: layer-four traceroute + lft sends various TCP SYN and FIN probes (differing from Van Jacobson's + UDP-based method) utilizing the IP protocol "time to live" field and + attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along + the path to some host. + lft also listens for various TCP and ICMP messages along the way to assist + network managers in ascertaining per-protocol heuristic routing information + and can optionally retrieve various information about the networks it + traverses. --- lft-2.2.orig/debian/copyright +++ lft-2.2/debian/copyright @@ -0,0 +1,69 @@ +This package was debianized by Marco d'Itri on +Tue Feb 11 11:54:28 CET 2003. + +It was downloaded from http://www.mainnerve.com/lft/ + +Upstream Author: MainNerve, Inc. + +Copyright: + + MainNerve Public License for Open Source + ---------- + Copyright (c) 2002 MainNerve, Inc. + +This MainNerve, Inc. Distribution (code and documentation) is made available +to the open source community as a public service by MainNerve. Contact +MainNerve at software@mainnerve.com for information on other licensing +arrangements (e.g. for use in proprietary applications). + +Under this license, this Distribution may be modified and the original +version and modified versions may be copied, distributed, publicly displayed +and performed provided that the following conditions are met: + +1. Modified versions are distributed with source code and documentation and +with permission for others to use any code and documentation (whether in +original or modified versions) as granted under this license; + +2. if modified, the source code, documentation, and user run-time elements +should be clearly labeled by placing an identifier of origin (such as a name, +initial, or other tag) after the version number; + +3. users, modifiers, distributors, and others coming into possession or +using the Distribution in original or modified form accept the entire risk +as to the possession, use, and performance of the Distribution; + +4. this copyright management information (software identifier and version +number, copyright notice and license) shall be retained in all versions of +the Distribution; + +5. MainNerve may make modifications to the Distribution that are +substantially similar to modified versions of the Distribution, and may +make, use, sell, copy, distribute, publicly display, and perform such +modifications, including making such modifications available under this or +other licenses, without obligation or restriction; + +6. modifications incorporating code, libraries, and/or documentation subject +to any other open source license may be made, and the resulting work may be +distributed under the terms of such open source license if required by that +open source license, but doing so will not affect this Distribution, other +modifications made under this license or modifications made under other +MainNeve licensing arrangements; + +7. no permission is granted to distribute, publicly display, or publicly +perform modifications to the Distribution made using proprietary materials +that cannot be released in source format under conditions of this license; + +8. the name of MainNerve may not be used in advertising or publicity +pertaining to Distribution of the software without specific, prior written +permission. + +This software is made available "as is", and + +MAINNERVE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS +SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL +MAINNERVE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + --- lft-2.2.orig/debian/rules +++ lft-2.2/debian/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f + +SHELL+= -e +D := $(CURDIR)/debian/lft + +build: build-stamp +build-stamp: + dh_testdir + cp -a /usr/share/misc/config.guess . + cp -a /usr/share/misc/config.sub . + ./configure + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + rm -f config.log + rm -f config.status + rm -f config.guess + rm -f config.sub + rm -f lft + rm -f *.o + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs usr/sbin/ + cp lft $D/usr/sbin/ + +binary-indep: + # Nothing to do by default + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs TODO + dh_installdocs HOWTO-UsersLFT.txt + dh_installman lft.8 + dh_strip + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-arch + +.PHONY: build clean binary-indep binary-arch binary install configure --- lft-2.2.orig/lft.8 +++ lft-2.2/lft.8 @@ -241,6 +241,11 @@ .Ed .Pp +.Sh Running LFT as a non-root user +As distributed by Debian, lft can only be run by the root user. +To allow regular users to run lft, the sysadmin needs to read the file +/usr/share/doc/lft/HOWTO-UsersLFT.txt +and follow the instructions in that file. .Sh AUTHOR Nils McCarthy, Victor Oppleman, Ugen Antsilevitch, and other helpers around the world. The source is currently maintained and administered by MainNerve, Inc. .Sh REPORTING BUGS