Subject: bin/6222: ping -f won't work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <arndt@uni-koblenz.de>
List: netbsd-bugs
Date: 10/01/1998 19:45:41
>Number:         6222
>Category:       bin
>Synopsis:       can't use ping -f as root
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct  1 10:50:01 1998
>Last-Modified:
>Originator:     Charlie Root
>Organization:
Uwe Arndt			| Universitaet Koblenz
EMAIL: arndt@uni-koblenz.de	| Rheinau 1, D-56075 Koblenz
T: +49 261 9119 642		| FAX: +49 261 9119 495
>Release:        09/30/98
>Environment:
System: NetBSD handy 1.3H NetBSD 1.3H (UWES2) #0: Tue Sep 29 12:44:47 CEST 1998 root@handy:/usr/src/sys/arch/i386/compile/UWES2 i386


>Description:
	ping -f tell's me I have to be root, while I'm root
>How-To-Repeat:
	ping -f
>Fix:
*** /homes/NetBSD/src/sbin/ping/ping.c	Tue Sep 15 13:10:03 1998
--- /mnt/usr/src/sbin/ping/ping.c	Thu Oct  1 19:38:40 1998
***************
*** 327,333 ****
  	if (interval == 0)
  		interval = (pingflags & F_FLOOD) ? FLOOD_INTVL : 1.0;
  #ifndef sgi
! 	if (pingflags & F_FLOOD)
  		errx(1, "Must be superuser to use -f");
  	if (interval < 1.0 && getuid())
  		errx(1, "Must be superuser to use < 1 sec ping interval");
--- 327,333 ----
  	if (interval == 0)
  		interval = (pingflags & F_FLOOD) ? FLOOD_INTVL : 1.0;
  #ifndef sgi
! 	if (pingflags & F_FLOOD && getuid())
  		errx(1, "Must be superuser to use -f");
  	if (interval < 1.0 && getuid())
  		errx(1, "Must be superuser to use < 1 sec ping interval");
>Audit-Trail:
>Unformatted: