apparmor.d/profiles/nmap
2021-04-01 16:02:59 +01:00

46 lines
1.1 KiB
Text

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
# Copyright (C) 2019-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/nmap
profile nmap @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
capability net_raw,
capability net_bind_service,
signal (receive) set=(term, kill) peer=zenmap,
network inet dgram,
network inet6 dgram,
network inet raw,
network inet6 raw,
network netlink raw,
network packet raw,
@{exec_path} r,
owner @{PROC}/@{pid}/net/dev r,
owner @{PROC}/@{pid}/net/if_inet6 r,
/usr/share/nmap/** r,
owner /tmp/zenmap-stdout-* rw,
owner /tmp/zenmap-*.xml rw,
include if exists <local/nmap>
}