2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (C) 2002-2005 Novell/SUSE
|
|
|
|
# Copyright (C) 2017 Christian Boltz
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
# evolution, amongst other things, calls this program. I didn't want to
|
|
|
|
# give evolution access to significant chunks of /proc
|
|
|
|
#
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/netstat
|
|
|
|
profile netstat @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/nameservice>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
capability dac_read_search,
|
|
|
|
capability syslog,
|
|
|
|
capability sys_ptrace,
|
|
|
|
|
|
|
|
ptrace (trace,read),
|
|
|
|
|
|
|
|
@{exec_path} rmix,
|
|
|
|
|
|
|
|
/etc/networks r,
|
|
|
|
@{PROC} r,
|
|
|
|
@{PROC}/@{pids}/cmdline r,
|
|
|
|
@{PROC}/net r,
|
|
|
|
@{PROC}/net/* r,
|
|
|
|
@{PROC}/@{pids}/fd/ r,
|
|
|
|
@{PROC}/@{pid}/attr/current r,
|
|
|
|
@{PROC}/@{pid}/net/netstat r,
|
|
|
|
@{PROC}/@{pid}/net/raw r,
|
|
|
|
@{PROC}/@{pid}/net/snmp r,
|
|
|
|
@{PROC}/@{pid}/net/raw6 r,
|
|
|
|
@{PROC}/@{pid}/net/tcp r,
|
|
|
|
@{PROC}/@{pid}/net/tcp6 r,
|
|
|
|
@{PROC}/@{pid}/net/udp r,
|
|
|
|
@{PROC}/@{pid}/net/udp6 r,
|
|
|
|
@{PROC}/@{pid}/net/udplite r,
|
|
|
|
@{PROC}/@{pid}/net/udplite6 r,
|
|
|
|
@{PROC}/@{pid}/net/unix r,
|
|
|
|
# For "netstat -i"
|
|
|
|
@{PROC}/@{pid}/net/dev r,
|
|
|
|
|
|
|
|
}
|