diff options
author | 2021-05-10 14:55:20 -0400 | |
---|---|---|
committer | 2021-05-10 14:55:20 -0400 | |
commit | d88d199f23088ac1c3d7696374b0a1c1c1c18358 (patch) | |
tree | 977307e478f76c5de5ca141268cf8ce0309a09eb /lib/libpcap/libpcap/ChmodBPF | |
parent | 5fd83771641d15c418f747bd343ba6738d3875f7 (diff) | |
download | apple_cmds-d88d199f23088ac1c3d7696374b0a1c1c1c18358.tar.gz apple_cmds-d88d199f23088ac1c3d7696374b0a1c1c1c18358.tar.zst apple_cmds-d88d199f23088ac1c3d7696374b0a1c1c1c18358.zip |
libpcap-98.40.1
Diffstat (limited to 'lib/libpcap/libpcap/ChmodBPF')
-rwxr-xr-x | lib/libpcap/libpcap/ChmodBPF/ChmodBPF | 33 | ||||
-rw-r--r-- | lib/libpcap/libpcap/ChmodBPF/StartupParameters.plist | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/lib/libpcap/libpcap/ChmodBPF/ChmodBPF b/lib/libpcap/libpcap/ChmodBPF/ChmodBPF new file mode 100755 index 0000000..ee37121 --- /dev/null +++ b/lib/libpcap/libpcap/ChmodBPF/ChmodBPF @@ -0,0 +1,33 @@ +#! /bin/sh + +. /etc/rc.common + +StartService () +{ + # + # Unfortunately, Mac OS X's devfs is based on the old FreeBSD + # one, not the current one, so there's no way to configure it + # to create BPF devices with particular owners or groups. + # This startup item will make it owned by the admin group, + # with permissions rw-rw----, so that anybody in the admin + # group can use programs that capture or send raw packets. + # + # Change this as appropriate for your site, e.g. to make + # it owned by a particular user without changing the permissions, + # so only that user and the super-user can capture or send raw + # packets, or give it the permissions rw-r-----, so that + # only the super-user can send raw packets but anybody in the + # admin group can capture packets. + # + chgrp admin /dev/bpf* + chmod g+rw /dev/bpf* +} + +StopService () +{ + return 0; +} + +RestartService () { StartService; } + +RunService "$1" diff --git a/lib/libpcap/libpcap/ChmodBPF/StartupParameters.plist b/lib/libpcap/libpcap/ChmodBPF/StartupParameters.plist new file mode 100644 index 0000000..cba2166 --- /dev/null +++ b/lib/libpcap/libpcap/ChmodBPF/StartupParameters.plist @@ -0,0 +1,4 @@ +{ + Description = "Change BPF permissions"; + Provides = ("ChmodBPF"); +} |