# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 odomingao
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/wttrbar
@{att} = ""
profile wttrbar /{,usr/}bin/wttrbar flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/nameservice-strict>

  network inet  dgram,
  network inet6 dgram,
  network inet  stream,
  network inet6 stream,

  @{exec_path} mr,

  owner /tmp/wttrbar--wttr.in.json rw,

  include if exists <local/wttrbar>
}

# vim:syntax=apparmor
