Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

issue 4427: bpf device permission change option added

  • Loading branch information...
commit 56a8f51747429bcd29355daca7981cb721c0b978 1 parent 9d2f933
@lorensr authored
Showing with 19 additions and 2 deletions.
  1. +19 −2 Library/Formula/wireshark.rb
View
21 Library/Formula/wireshark.rb
@@ -1,6 +1,6 @@
require 'formula'
-class Wireshark <Formula
+class Wireshark < Formula

Don't make unnecessary whitespace changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
url 'http://media-2.cacetech.com/wireshark/src/wireshark-1.4.3.tar.bz2'
md5 'ac3dcc8c128c38d9ef3d9c93d1dec83e'
homepage 'http://www.wireshark.org'
@@ -11,7 +11,18 @@ class Wireshark <Formula
depends_on 'gtk+' if ARGV.include? "--with-x"
def options
- [["--with-x", "Include X11 support"]]
+ [
+ ["--with-x", "Include X11 support"],
+ ['--with-daemon', 'Include launch daemon that allows admin access to capture devices']
+ ]
+ end
+
+ def caveats
+ if ARGV.include? '--with-daemon'
+ 'Launch daemon installation program initiated.'
+ else
+ "If your list of available capture interfaces is empty (behavior on default OS X installation), uninstall and reinstall Wireshark with the '--with-daemon' option. This adds a launch daemon that changes the permissions of your BPF devices so that all users in the 'admin' group - all users with 'Allow user to administer this computer' turned on - have both read and write access to those devices."
+ end
end
def install
@@ -24,6 +35,12 @@ def install
system "make"
ENV.j1 # Install failed otherwise.
system "make install"
+
+ if ARGV.include? '--with-daemon'
+ system 'wget https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -O ChmodBPF.tar.gz'
+ system 'tar zxvf ChmodBPF.tar.gz'
+ system 'open ChmodBPF/Install\ ChmodBPF.app'
+ end
end
end
@mikemcquaid

Don't make unnecessary whitespace changes.

Please sign in to comment.
Something went wrong with that request. Please try again.