116 lines
2.9 KiB
Text
116 lines
2.9 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2002-2005 Novell/SUSE
|
|
# 2018-2021 Mikhail Morfikov
|
|
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
# pcap pcapng
|
|
@{wireshark_ext} = [pP][cC][aA][pP]{,[nN][gG]}
|
|
|
|
@{exec_path} = @{bin}/wireshark
|
|
profile wireshark @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/bus-accessibility>
|
|
include <abstractions/bus-session>
|
|
include <abstractions/consoles>
|
|
include <abstractions/dri-enumerate>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/fonts>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/gtk>
|
|
include <abstractions/mesa>
|
|
include <abstractions/nameservice>
|
|
include <abstractions/nvidia>
|
|
include <abstractions/private-files-strict>
|
|
include <abstractions/qt5-compose-cache-write>
|
|
include <abstractions/qt5-settings-write>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/X>
|
|
|
|
signal (send) peer=dumpcap,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/dumpcap rPx,
|
|
@{bin}/xdg-open rCx -> open,
|
|
|
|
# For reading pcaps
|
|
/ r,
|
|
/tmp/ r,
|
|
/home/ r,
|
|
owner @{HOME}/ r,
|
|
owner @{HOME}/**/ r,
|
|
@{MOUNTS}/ r,
|
|
owner @{MOUNTS}/**/ r,
|
|
owner /{tmp,home,media}/**.@{wireshark_ext}{,.gz} rw,
|
|
|
|
# Wireshark files
|
|
/usr/share/wireshark/** r,
|
|
@{lib}/@{multiarch}/wireshark/extcap/* rix,
|
|
@{lib}/@{multiarch}/wireshark/plugins/*/{codecs,epan,wiretap}/*.so mr,
|
|
/etc/wireshark/init.lua r,
|
|
|
|
# Wireshark home files
|
|
owner @{HOME}/.wireshark/{,**} rw,
|
|
owner @{user_config_dirs}/wireshark/{,**} rw,
|
|
|
|
# To configure Qt5 settings (theme, font, icons, etc.) under DE/WM without Qt integration
|
|
owner @{user_config_dirs}/qt5ct/{,**} r,
|
|
/usr/share/qt5ct/** r,
|
|
/usr/share/qt5/translations/*.qm r,
|
|
|
|
deny @{PROC}/sys/kernel/random/boot_id r,
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
owner @{PROC}/@{pid}/comm r,
|
|
@{PROC}/@{pid}/net/dev r,
|
|
@{PROC}/@{pid}/mountinfo r,
|
|
@{PROC}/@{pid}/mounts r,
|
|
|
|
/etc/fstab r,
|
|
|
|
/usr/share/hwdata/pnp.ids r,
|
|
|
|
/usr/share/GeoIP/{,**} r,
|
|
|
|
/dev/shm/#@{int} rw,
|
|
|
|
owner /tmp/wireshark_extcap_ciscodump_@{int}_* rw,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPUx,
|
|
|
|
# file_inherit
|
|
owner /dev/tty@{int} rw,
|
|
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
@{bin}/xdg-open mr,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/basename rix,
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{run}/user/@{uid}/ r,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPUx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
include if exists <local/wireshark_open>
|
|
}
|
|
|
|
include if exists <local/wireshark>
|
|
}
|