Permalink
Browse files

issue 4427: bpf device permission change option added

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

MikeMcQuaid Feb 27, 2011

Don't make unnecessary whitespace changes.

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

0 comments on commit 56a8f51

Please sign in to comment.