Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Inconsistent documentation and behavior on non-root -i -p -r -t restrictions #29

Open
cranderson opened this Issue · 0 comments

1 participant

@cranderson

Tested on fping 3.3.

The usage output says:

fping: these options are too risky for mere mortals.
fping: You need i >= 10, p >= 20, r < 20, and t >= 50

The manual page says differently (and is missing the restriction on the -p option):

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,
normal users can't specify the following:

   ·   -i n, where n < 10 msec

   ·   -r n, where n > 20

   ·   -t n, where n < 250 msec

The actual behavior that non-root is allowed to do is different from both of the above documentations (Usage message is mostly correct, only -r has a < instead of the more correct <=):

-i >= 10
-p >= 20
-r <= 20
-t >= 50

Finally, the usage message "default" values change to show what you gave on the command line when specifying out-of-range values for non-root users. E.g. if as non-root you specify -i9 you see:

fping: You need i >= 10, p >= 20, r < 20, and t >= 50

Usage: fping [options] [targets...]
[...]
-i n interval between sending ping packets (in millisec) (default 9) <----- the default changed here to the actual value given

The same is true for -i, -p, and -t. The -r option default value always displays correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.