Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

link_open: do not crash when run as non-root #16

Merged
merged 1 commit into from
Nov 2, 2016
Merged

link_open: do not crash when run as non-root #16

merged 1 commit into from
Nov 2, 2016

Conversation

rofl0r
Copy link
Contributor

@rofl0r rofl0r commented Nov 2, 2016

if there's a permission error (or another error), the returned handle
will be null and the subsequent dereference will crash the program.

if there's a permission error (or another error), the returned handle
will be null and the subsequent dereference will crash the program.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 75.79% when pulling bd028a8 on rofl0r:segfault into bfee889 on royhills:master.

@royhills royhills merged commit 0b609c6 into royhills:master Nov 2, 2016
@royhills
Copy link
Owner

royhills commented Nov 2, 2016

I'm not sure whether this is reachable under normal conditions, but we should definitely be checking the return status in any case.

@rofl0r
Copy link
Contributor Author

rofl0r commented Nov 2, 2016

I'm not sure whether this is reachable under normal conditions

do you mean because most distros install arp-scan into sbin/ ?
we don't, and i ran into segfaults on almost any invocation as non-root before this patch.
or maybe other distros use systemd oslt that makes mac address lookup non-root accessible ?

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

Successfully merging this pull request may close these issues.

3 participants