# ------------------------------------------------------------------
#
#    Copyright (C) 2020 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.
#
# ------------------------------------------------------------------

abi <abi/4.0>,

include <tunables/global>

profile clamd /usr/sbin/clamd {
  include <abstractions/base>
  include <abstractions/nameservice>

  capability setgid,
  capability setuid,

  /etc/clamd.conf r,
  @{exec_path} mr,
  /var/lib/clamav/ r,
  /var/lib/clamav/** r,
  owner /run/clamav/clamd.pid w,
  owner /run/clamav/clamd-socket rw,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/usr.sbin.clamd>
}
