From 9202056e76a1765dc000b88f47a34becec328715 Mon Sep 17 00:00:00 2001 From: Chuck Anderson Date: Sat, 18 Feb 2012 21:30:17 -0500 Subject: [PATCH] Remove patch from sources, add to git instead Cleanup .gitignore --- .gitignore | 2 -- fping-3.0-capnetraw.patch | 72 +++++++++++++++++++++++++++++++++++++++ sources | 1 - 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 fping-3.0-capnetraw.patch diff --git a/.gitignore b/.gitignore index 33f2485..fcd2f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -fping-2.4b2_to-ipv6.tar.gz /fping-3.0.tar.gz -/fping-3.0-capnetraw.patch diff --git a/fping-3.0-capnetraw.patch b/fping-3.0-capnetraw.patch new file mode 100644 index 0000000..2d3cf9e --- /dev/null +++ b/fping-3.0-capnetraw.patch @@ -0,0 +1,72 @@ +diff -up fping-3.0/fping.8.capnetraw fping-3.0/fping.8 +--- fping-3.0/fping.8.capnetraw 2011-12-28 08:32:17.000000000 -0500 ++++ fping-3.0/fping.8 2012-02-18 14:58:14.023533041 -0500 +@@ -87,10 +87,7 @@ fping a list of IP addresses as input an + .IP \fB-e\fR 5 + Show elapsed (round-trip) time of packets. + .IP \fB-f\fR 5 +-Read list of targets from a file. This option can only be used by the +-root user. Regular users should pipe in the file via stdin: +- +-% fping < targets_file ++Read list of targets from a file. + + .IP \fB-g\fR 5 + Generate a target list from a supplied IP netmask, or a starting and ending IP. +@@ -211,11 +208,9 @@ command line arguments, and 4 for a syst + Ha! If we knew of any we would have fixed them! + .SH RESTRICTIONS + If certain options are used (i.e, a low value for -i and -t, and a +-high value for -r) it is possible to flood the network. This program +-must be installed as setuid root in order to open up a raw socket, +-or must be run by root. In order to stop mere mortals from hosing the +-network (when fping is installed setuid root) , normal users can't specify +-the following: ++high value for -r) it is possible to flood the network. In order to ++stop mere mortals from hosing the network (when fping is installed ++setuid root), normal users can't specify the following: + .nf + + -i n where n < 10 msec +diff -up fping-3.0/fping.c.capnetraw fping-3.0/fping.c +--- fping-3.0/fping.c.capnetraw 2011-12-22 10:05:18.000000000 -0500 ++++ fping-3.0/fping.c 2012-02-18 15:01:04.188654114 -0500 +@@ -415,7 +415,6 @@ int main( int argc, char **argv ) + #endif + struct protoent *proto; + char *buf; +- uid_t uid; + int tos = 0; + + #ifndef IPV6 +@@ -425,17 +424,6 @@ int main( int argc, char **argv ) + #endif + HOST_ENTRY *cursor; + +- /* check if we are root */ +- +- if( geteuid() ) +- { +- fprintf( stderr, +- "This program can only be run by root, or it must be setuid root.\n" ); +- +- exit( 3 ); +- +- }/* IF */ +- + /* confirm that ICMP is available on this machine */ + #ifndef IPV6 + if( ( proto = getprotobyname( "icmp" ) ) == NULL ) +@@ -522,12 +510,6 @@ int main( int argc, char **argv ) + #endif + #endif + +- if( ( uid = getuid() ) ) +- { +- seteuid( getuid() ); +- +- }/* IF */ +- + prog = argv[0]; + ident = getpid() & 0xFFFF; + diff --git a/sources b/sources index 1a5f386..9f5bc4e 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ e937c9a2b1d65b6f5294fec57891645b fping-3.0.tar.gz -aa70803d84c4e1d814c31d4c11850957 fping-3.0-capnetraw.patch