mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-19 09:28:17 +01:00
56 lines
1.3 KiB
Text
56 lines
1.3 KiB
Text
# vim:syntax=apparmor
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}bin/dumpcap
|
|
profile dumpcap @{exec_path} {
|
|
include <abstractions/base>
|
|
|
|
# To capture packekts
|
|
capability net_raw,
|
|
capability net_admin,
|
|
|
|
signal (receive) peer=wireshark,
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network netlink raw,
|
|
network packet dgram,
|
|
network packet raw,
|
|
network bluetooth raw,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{sys}/class/net/ r,
|
|
@{sys}/bus/usb/devices/ r,
|
|
@{sys}/devices/virtual/net/*/type r,
|
|
@{sys}/devices/pci[0-9]*/**/net/*/type r,
|
|
@{sys}/devices/virtual/net/*/statistics/* r,
|
|
|
|
@{PROC}/@{pid}/net/dev r,
|
|
@{PROC}/@{pid}/net/psched r,
|
|
|
|
/dev/ r,
|
|
|
|
# Traffic log files
|
|
owner /tmp/wireshark_*.pcapng rw,
|
|
owner /tmp/*.pcap rw,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
/usr/share/GeoIP/* r,
|
|
/dev/dri/card[0-9] rw,
|
|
|
|
include if exists <local/dumpcap>
|
|
}
|