#include <tunables/global>

/usr/sbin/kopano-dagent {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>
  #include <abstractions/python>

  capability chown,
  capability dac_override,
  capability dac_read_search,
  capability setgid,
  capability setuid,

  @{PROC}/@{pid}/task/@{tid}/comm rw,
  @{PROC}/@{pid}/cmdline r,

  /etc/gai.conf r,
  /etc/gss/mech.d/ r,
  /etc/gss/mech.d/*.conf r,
  /etc/kopano/dagent.cfg r,

  /usr/share/kopano-dagent/python/*.py{,c} r,

  /var/lib/kopano/dagent/plugins/ r,

  /etc/mapi/ r,
  /etc/mapi/* r,

  /run/kopano/dagent.pid rw,
  /var/log/kopano/dagent.log rw,
}
