1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # 4 1.1.1.2 christos # Unfortunately, macOS's devfs is based on the old FreeBSD 5 1.1 christos # one, not the current one, so there's no way to configure it 6 1.1 christos # to create BPF devices with particular owners or groups. 7 1.1 christos # This startup item will make it owned by the admin group, 8 1.1 christos # with permissions rw-rw----, so that anybody in the admin 9 1.1 christos # group can use programs that capture or send raw packets. 10 1.1 christos # 11 1.1 christos # Change this as appropriate for your site, e.g. to make 12 1.1 christos # it owned by a particular user without changing the permissions, 13 1.1 christos # so only that user and the super-user can capture or send raw 14 1.1 christos # packets, or give it the permissions rw-r-----, so that 15 1.1 christos # only the super-user can send raw packets but anybody in the 16 1.1 christos # admin group can capture packets. 17 1.1 christos # 18 1.1 christos chgrp admin /dev/bpf* 19 1.1 christos chmod g+rw /dev/bpf* 20