# ------------------------------------------------------------------
#
#    Copyright (C) 2022 SUSE LLC
#
#    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.
#
# ------------------------------------------------------------------
# vim:syntax=apparmor

abi <abi/4.0>,

include <tunables/global>

profile samba-rpcd-classic /usr/lib*/samba/{,samba/}rpcd_classic {
  include <abstractions/samba-rpcd>
  include <abstractions/wutmp>

  capability sys_resource,

  /usr/lib*/samba/{,samba/}rpcd_classic mr,

  @{run}/samba/ncalrpc/np/srvsvc wr,
  @{run}/samba/ncalrpc/np/winreg wr,
  /dev/urandom rw,

  /usr/lib*/samba/{,samba/}samba-dcerpcd Px -> samba-dcerpcd,

  @{HOMEDIRS}/** lrwk,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/samba-rpcd-classic>
}
