Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

possible to print help as plain user #131

Closed
teto opened this issue Jun 6, 2018 · 3 comments
Closed

possible to print help as plain user #131

teto opened this issue Jun 6, 2018 · 3 comments

Comments

@teto
Copy link

teto commented Jun 6, 2018

For some reason, flent (https://flent.org/) wouldn't use fping so I turned on -v and the reason got clearer:

13:57:24 WARNING: Found fping, but it does not appear to support IPv6. Not using.
13:57:24 ERROR: Runner Ping (ms) ICMP failed check: Cannot parse output of the system ping binary (/run/current-system/sw/bin/ping6). Please install fping v3.5+.

Looks like flent parses the output of fping -h

proc = subprocess.Popen([fping, '-h'],
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE)
            out, err = proc.communicate()
            # check for presence of timestamp option
            if ip_version == 6 and not fping.endswith("6") and \
               "--ipv6" not in str(out):
                logger.warning("Found fping, but it does not appear to "
                               "support IPv6. Not using.")

which fails when not running as root:

fping -h
(null): can't create socket (must run as root?) : Permission denied

Would it be possible to change fping so that it can run the help as a plain user ? it's the most common behavior.

@megah3rtz
Copy link

Is there a reason you cant change the permissions on the executable to allow your user to run fping?

@teto
Copy link
Author

teto commented Jun 18, 2018

Isn't the creation of the socket unnecessary if all I want is to print the help ?
I try to use sudo cautiously and if printing the help asks for elevated rights, then it can make the user wary of the program security-wise.

@teto
Copy link
Author

teto commented Jul 29, 2018

thanks !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants