commit fping for openSUSE:Factory
Hello community, here is the log from the commit of package fping for openSUSE:Factory checked in at 2014-05-06 13:56:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fping (Old) and /work/SRC/openSUSE:Factory/.fping.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "fping" Changes: -------- --- /work/SRC/openSUSE:Factory/fping/fping.changes 2014-03-09 18:22:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.fping.new/fping.changes 2014-05-06 13:56:48.000000000 +0200 @@ -1,0 +2,12 @@ +Sun May 4 21:13:42 UTC 2014 - zaitor@opensuse.org + +- Update to version 3.10: + + Fix confusing error message with -g and IPv6 addresses (#58). + + Allow option '-f' also for non-root (since setuid privileges + are dropped). + + Do not retry twice DNS lookup on DNS lookup problem. + + Remove support for NIS groups. + + Better document -B backoff-factor and when it can be used (#33) + + More tests added. + +------------------------------------------------------------------- Old: ---- fping-3.9.tar.gz New: ---- fping-3.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fping.spec ++++++ --- /var/tmp/diff_new_pack.M0KseQ/_old 2014-05-06 13:56:49.000000000 +0200 +++ /var/tmp/diff_new_pack.M0KseQ/_new 2014-05-06 13:56:49.000000000 +0200 @@ -18,7 +18,7 @@ Name: fping Url: http://www.fping.org -Version: 3.9 +Version: 3.10 Release: 0 Summary: A program to ping multiple hosts License: MIT ++++++ fping-3.9.tar.gz -> fping-3.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/ChangeLog new/fping-3.10/ChangeLog --- old/fping-3.9/ChangeLog 2014-03-08 21:02:53.000000000 +0100 +++ new/fping-3.10/ChangeLog 2014-05-04 22:33:12.000000000 +0200 @@ -1,3 +1,12 @@ +2014-05-03 David Schweikert <david@schweikert.ch> + * Version 3.10 + * Fix confusing error message with -g and IPv6 addresses (#58, reported by Axel Beckert) + * Allow option '-f' also for non-root (since setuid privileges are dropped) + * Do not retry twice DNS lookup on DNS lookup problem + * Remove support for NIS groups + * Better document -B backoff-factor and when it can be used (#33, Oleksiy Zagorskyi) + * More tests added + 2014-03-08 David Schweikert <david@schweikert.ch> * Version 3.9 * Fix random output on socket error (reported by Aleksandrs Saveljevs, #56) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/configure new/fping-3.10/configure --- old/fping-3.9/configure 2014-03-08 21:03:58.000000000 +0100 +++ new/fping-3.10/configure 2014-05-04 22:34:29.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for fping 3.9. +# Generated by GNU Autoconf 2.69 for fping 3.10. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='fping' PACKAGE_TARNAME='fping' -PACKAGE_VERSION='3.9' -PACKAGE_STRING='fping 3.9' +PACKAGE_VERSION='3.10' +PACKAGE_STRING='fping 3.10' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1284,7 +1284,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures fping 3.9 to adapt to many kinds of systems. +\`configure' configures fping 3.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of fping 3.9:";; + short | recursive ) echo "Configuration of fping 3.10:";; esac cat <<\_ACEOF @@ -1451,7 +1451,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -fping configure 3.9 +fping configure 3.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1816,7 +1816,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by fping $as_me 3.9, which was +It was created by fping $as_me 3.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2834,7 +2834,7 @@ # Define the identity of the package. PACKAGE='fping' - VERSION='3.9' + VERSION='3.10' cat >>confdefs.h <<_ACEOF @@ -5062,7 +5062,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by fping $as_me 3.9, which was +This file was extended by fping $as_me 3.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5128,7 +5128,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -fping config.status 3.9 +fping config.status 3.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/configure.ac new/fping-3.10/configure.ac --- old/fping-3.9/configure.ac 2014-03-08 21:02:53.000000000 +0100 +++ new/fping-3.10/configure.ac 2014-05-04 22:33:12.000000000 +0200 @@ -3,7 +3,7 @@ dnl Minimum Autoconf version required. AC_PREREQ(2.59) -AC_INIT([fping],[3.9]) +AC_INIT([fping],[3.10]) dnl make ipv4 and ipv6 options AC_ARG_ENABLE([ipv4], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/doc/fping.8 new/fping-3.10/doc/fping.8 --- old/fping-3.9/doc/fping.8 2014-03-08 21:04:02.000000000 +0100 +++ new/fping-3.10/doc/fping.8 2014-05-04 22:34:32.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "FPING 8" -.TH FPING 8 "2014-03-08" "fping" "" +.TH FPING 8 "2014-05-04" "fping" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -171,10 +171,11 @@ number. .IP "\fB\-B\fR \fIn\fR" 5 .IX Item "-B n" -In the default mode, \fBfping\fR sends several requests to a target before giving -up, waiting longer for a reply on each successive request. This parameter is -the value by which the wait time is multiplied on each successive request; it -must be entered as a floating-point number (x.y). The default is 1.5. +Backoff factor. In the default mode, \fBfping\fR sends several requests to a +target before giving up, waiting longer for a reply on each successive request. +This parameter is the value by which the wait time (\fB\-t\fR) is multiplied on each +successive request; it must be entered as a floating-point number (x.y). The +default is 1.5. .IP "\fB\-c\fR \fIn\fR" 5 .IX Item "-c n" Number of request packets to send to each target. In this mode, a line is @@ -275,7 +276,9 @@ .IX Item "-t n" Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that \fBfping\fR waits for a response to its first request. -Successive timeouts are multiplied by the backoff factor. +Successive timeouts are multiplied by the backoff factor specified with \fB\-B\fR. +Note that this option has no effect looping or counting modes (\fB\-l\fR, \fB\-c\fR, or +\&\fB\-C\fR). .IP "\fB\-T\fR \fIn\fR" 5 .IX Item "-T n" Ignored (for compatibility with fping 2.4). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/doc/fping.pod new/fping-3.10/doc/fping.pod --- old/fping-3.9/doc/fping.pod 2014-03-08 21:02:53.000000000 +0100 +++ new/fping-3.10/doc/fping.pod 2014-05-04 22:33:12.000000000 +0200 @@ -49,10 +49,11 @@ =item B<-B> I<n> -In the default mode, B<fping> sends several requests to a target before giving -up, waiting longer for a reply on each successive request. This parameter is -the value by which the wait time is multiplied on each successive request; it -must be entered as a floating-point number (x.y). The default is 1.5. +Backoff factor. In the default mode, B<fping> sends several requests to a +target before giving up, waiting longer for a reply on each successive request. +This parameter is the value by which the wait time (B<-t>) is multiplied on each +successive request; it must be entered as a floating-point number (x.y). The +default is 1.5. =item B<-c> I<n> @@ -165,7 +166,9 @@ Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that B<fping> waits for a response to its first request. -Successive timeouts are multiplied by the backoff factor. +Successive timeouts are multiplied by the backoff factor specified with B<-B>. +Note that this option has no effect looping or counting modes (B<-l>, B<-c>, or +B<-C>). =item B<-T> I<n> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/doc/fping6.8 new/fping-3.10/doc/fping6.8 --- old/fping-3.9/doc/fping6.8 2014-03-08 21:04:02.000000000 +0100 +++ new/fping-3.10/doc/fping6.8 2014-05-04 22:34:32.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "fping6 8" -.TH fping6 8 "2014-03-08" "fping" "" +.TH fping6 8 "2014-05-04" "fping" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -171,10 +171,11 @@ number. .IP "\fB\-B\fR \fIn\fR" 5 .IX Item "-B n" -In the default mode, \fBfping\fR sends several requests to a target before giving -up, waiting longer for a reply on each successive request. This parameter is -the value by which the wait time is multiplied on each successive request; it -must be entered as a floating-point number (x.y). The default is 1.5. +Backoff factor. In the default mode, \fBfping\fR sends several requests to a +target before giving up, waiting longer for a reply on each successive request. +This parameter is the value by which the wait time (\fB\-t\fR) is multiplied on each +successive request; it must be entered as a floating-point number (x.y). The +default is 1.5. .IP "\fB\-c\fR \fIn\fR" 5 .IX Item "-c n" Number of request packets to send to each target. In this mode, a line is @@ -275,7 +276,9 @@ .IX Item "-t n" Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that \fBfping\fR waits for a response to its first request. -Successive timeouts are multiplied by the backoff factor. +Successive timeouts are multiplied by the backoff factor specified with \fB\-B\fR. +Note that this option has no effect looping or counting modes (\fB\-l\fR, \fB\-c\fR, or +\&\fB\-C\fR). .IP "\fB\-T\fR \fIn\fR" 5 .IX Item "-T n" Ignored (for compatibility with fping 2.4). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/src/fping.c new/fping-3.10/src/fping.c --- old/fping-3.9/src/fping.c 2014-03-08 21:02:53.000000000 +0100 +++ new/fping-3.10/src/fping.c 2014-05-04 22:33:12.000000000 +0200 @@ -369,7 +369,8 @@ s = open_ping_socket(); if((uid = getuid())) { - seteuid( getuid() ); + /* drop privileges */ + setuid( getuid() ); } prog = argv[0]; @@ -391,7 +392,8 @@ break; case 'r': - retry = ( unsigned int )atoi( optarg ); + if (!sscanf(optarg,"%i",&retry)) + usage(1); break; case 'i': @@ -422,9 +424,7 @@ break; case 'b': - errno = 0; - ping_data_size = (unsigned int) strtol(optarg, (char **)NULL, 10); - if( errno ) + if (!sscanf(optarg,"%i",&ping_data_size)) usage(1); break; @@ -509,27 +509,8 @@ exit( 0 ); case 'f': -#ifdef ENABLE_F_OPTION filename = optarg; - generate_flag = 0; - break; -#else - if( getuid() ) - { - printf( "%s: this option can only be used by root.\n", argv[0] ); - printf( "%s: fping will read from stdin by default.\n", argv[0] ); - exit( 3 ); - - }/* IF */ - else - { - filename = optarg; - generate_flag = 0; - - }/* ELSE */ - break; -#endif /* ENABLE_F_OPTION */ case 'g': /* use IP list generation */ @@ -568,6 +549,9 @@ perror("setting type of service octet IP_TOS"); } } + else { + usage(1); + } break; default: fprintf(stderr, "see 'fping -h' for usage information\n"); @@ -794,7 +778,7 @@ } if( !num_hosts ) - exit( 2 ); + exit(1); if(src_addr_present) { socket_set_src_addr(s, src_addr); @@ -880,10 +864,6 @@ *addr_end = '\0'; mask_str = addr_end + 1; mask = atoi(mask_str); - if(mask < 1 || mask > 30) { - fprintf(stderr, "Error: netmask must be between 1 and 30 (is: %s)\n", mask_str); - exit(2); - } /* parse address (IPv4 only) */ memset(&addr_hints, 0, sizeof(struct addrinfo)); @@ -892,14 +872,20 @@ ret = getaddrinfo(addr, NULL, &addr_hints, &addr_res); if(ret) { fprintf(stderr, "Error: can't parse address %s: %s\n", addr, gai_strerror(ret)); - exit(2); + exit(1); } if(addr_res->ai_family != AF_INET) { fprintf(stderr, "Error: -g works only with IPv4 addresses\n"); - exit(2); + exit(1); } net_addr = ntohl(((struct sockaddr_in *) addr_res->ai_addr)->sin_addr.s_addr); + /* check mask */ + if(mask < 1 || mask > 30) { + fprintf(stderr, "Error: netmask must be between 1 and 30 (is: %s)\n", mask_str); + exit(1); + } + /* convert mask integer from 1 to 32 to a bitmask */ bitmask = ((unsigned long) 0xFFFFFFFF) << (32-mask); @@ -934,11 +920,11 @@ ret = getaddrinfo(start, NULL, &addr_hints, &addr_res); if(ret) { fprintf(stderr, "Error: can't parse address %s: %s\n", start, gai_strerror(ret)); - exit(2); + exit(1); } if(addr_res->ai_family != AF_INET) { fprintf(stderr, "Error: -g works only with IPv4 addresses\n"); - exit(2); + exit(1); } start_long = ntohl(((struct sockaddr_in *) addr_res->ai_addr)->sin_addr.s_addr); @@ -949,11 +935,11 @@ ret = getaddrinfo(end, NULL, &addr_hints, &addr_res); if(ret) { fprintf(stderr, "Error: can't parse address %s: %s\n", end, gai_strerror(ret)); - exit(2); + exit(1); } if(addr_res->ai_family != AF_INET) { fprintf(stderr, "Error: -g works only with IPv4 addresses\n"); - exit(2); + exit(1); } end_long = ntohl(((struct sockaddr_in *) addr_res->ai_addr)->sin_addr.s_addr); @@ -2000,45 +1986,10 @@ host_ent = gethostbyname( name ); if( host_ent == NULL ) { - if( h_errno == TRY_AGAIN ) - { - u_sleep( DNS_TIMEOUT ); - host_ent = gethostbyname( name ); - - }/* IF */ - - if( host_ent == NULL ) - { -#ifdef NIS_GROUPS - - /* maybe it's the name of a NIS netgroup */ - char *machine, *user_ignored, *domain_ignored; - setnetgrent( name ); - if( getnetgrent( &machine, &user_ignored, &domain_ignored ) == 0 ) - { - endnetgrent(); - print_warning("%s address not found\n", name ); - - num_noaddress++; - return; - - }/* IF */ - else - add_name(machine); - - while( getnetgrent( &machine, &user_ignored, &domain_ignored ) ) - add_name(machine); - - endnetgrent(); - return; -#else print_warning("%s address not found\n", name ); - num_noaddress++; return ; -#endif /* NIS_GROUPS */ - }/* IF */ - }/* IF */ + } if(host_ent->h_addrtype != AF_INET) { print_warning("%s: IPv6 address returned by gethostbyname (options inet6 in resolv.conf?)\n", name ); @@ -2703,23 +2654,23 @@ fprintf(out, " (ex. %s -g 192.168.1.0 192.168.1.255 or %s -g 192.168.1.0/24)\n", prog, prog ); fprintf(out, " -H n Set the IP TTL value (Time To Live hops)\n"); fprintf(out, " -i n interval between sending ping packets (in millisec) (default %d)\n", interval / 100 ); +#ifdef SO_BINDTODEVICE + fprintf(out, " -I if bind to a particular interface\n"); +#endif fprintf(out, " -l loop sending pings forever\n" ); fprintf(out, " -m ping multiple interfaces on target host\n" ); fprintf(out, " -n show targets by name (-d is equivalent)\n" ); + fprintf(out, " -O n set the type of service (tos) flag on the ICMP packets\n" ); fprintf(out, " -p n interval between ping packets to one target (in millisec)\n" ); fprintf(out, " (in looping and counting modes, default %d)\n", perhost_interval / 100 ); fprintf(out, " -q quiet (don't show per-target/per-ping results)\n" ); fprintf(out, " -Q n same as -q, but show summary every n seconds\n" ); fprintf(out, " -r n number of retries (default %d)\n", DEFAULT_RETRY ); fprintf(out, " -s print final stats\n" ); -#ifdef SO_BINDTODEVICE - fprintf(out, " -I if bind to a particular interface\n"); -#endif fprintf(out, " -S addr set source address\n" ); fprintf(out, " -t n individual target initial timeout (in millisec) (default %d)\n", timeout / 100 ); fprintf(out, " -T n ignored (for compatibility with fping 2.4)\n"); fprintf(out, " -u show targets that are unreachable\n" ); - fprintf(out, " -O n set the type of service (tos) flag on the ICMP packets\n" ); fprintf(out, " -v show version\n" ); fprintf(out, " targets list of targets to check (if no -f specified)\n" ); fprintf(out, "\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fping-3.9/src/options.h new/fping-3.10/src/options.h --- old/fping-3.9/src/options.h 2014-03-08 21:02:53.000000000 +0100 +++ new/fping-3.10/src/options.h 2014-05-04 22:33:12.000000000 +0200 @@ -49,6 +49,3 @@ #ifndef DNS_TIMEOUT #define DNS_TIMEOUT 1000 /* time in micro_sec for dns retry */ #endif - -/* NIS_GROUPS allows input name to be an NIS netgroup name */ -/* #define NIS_GROUPS=1 */ -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de