📄 readme.macosx
字号:
As with other systems using BPF, Mac OS X allows users with read accessto the BPF devices to capture packets with libpcap and allows users withwrite access to the BPF devices to send packets with libpcap.On some systems that use BPF, the BPF devices live on the root filesystem, and the permissions and/or ownership on those devices can bechanged to give users other than root permission to read or write thosedevices.On newer versions of FreeBSD, the BPF devices live on devfs, and devfscan be configured to set the permissions and/or ownership of thosedevices to give users other than root permission to read or write thosedevices.On Mac OS X, the BPF devices live on devfs, but the OS X version ofdevfs is based on an older (non-default) FreeBSD devfs, and that versionof devfs cannot be configured to set the permissions and/or ownership ofthose devices.Therefore, we supply a "startup item" for OS X that will change theownership of the BPF devices so that the "admin" group owns them, andwill change the permission of the BPF devices to rw-rw----, so that allusers in the "admin" group - i.e., all users with "Allow user toadminister this computer" turned on - have both read and write access tothem.The startup item is in the ChmodBPF directory in the source tree. A/Library/StartupItems directory should be created if it doesn't alreadyexist, and the ChmodBPF directory should be copied to the/Library/StartupItems directory (copy the entire directory, so thatthere's a /Library/StartupItems/ChmodBPF directory, containing all thefiles in the source tree's ChmodBPF directory; don't copy the individualitems in that directory to /Library/StartupItems).If you want to give a particular user permission to access the BPFdevices, rather than giving all administrative users permission toaccess them, you can have the ChmodBPF/ChmodBPF script change theownership of /dev/bpf* without changing the permissions. If you want togive a particular user permission to read and write the BPF devices andgive the administrative users permission to read but not write the BPFdevices, you can have the script change the owner to that user, thegroup to "admin", and the permissions to rw-r-----. Other possibilitiesare left as an exercise for the reader.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -