forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capture child: send an errno message if exec of dumpcap fails.
On at least some Linux distributions, dumpcap is either installed with elevated privileges sufficient to support traffic capture by default or can optionally be given those privileges. If it has those privileges, it's typically made group-executable but not world-executable and owned by a special group, e.g. "wireshark", so that only users in that group can use dumpcap to capture traffic. The user installing the Wireshark package is *not* necessarily put into that group by default; this means that any attempt by Wireshark or TShark to run dumpcap will fail with EACCES. If the exec call in the child process sends text error mesages, intended for end users, up the message pipe, as we had been doing, then figuring out *why* the exec failed would require some heuristic parsing to figure out whether it's a permissions problem or not. Instead of doing that, just send a message giving the errno for exec failing. For now, we just format an error message for that in the parent process, but this leaves room to do a better job. While we're at it, fix some cases where an empty error message could be printed.
- Loading branch information
Showing
5 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters