# ------------------------------------------------------------------
#
#    Copyright (C) 2002-2005 Novell/SUSE
#    Copyright (C) 2014 Christian Boltz
#
#    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>

/usr/sbin/vsftpd {
  include <abstractions/base>
  include <abstractions/nameservice>
  include <abstractions/authentication>
  include <abstractions/hosts_access>

  /dev/urandom               r,
  /etc/environment           r,
  /etc/fstab                 r,
  /etc/ftpusers              r,
  /etc/mtab                  r,
  /etc/shells                r,
  /etc/vsftpd.*              r,
  /etc/vsftpd/*              r,
  /@{PROC}/@{pid}/mounts     r,
  /usr/sbin/vsftpd           rmix,
  /{,var/}run/utmp           rk,
  /var/log/vsftpd.log        w,
  /var/log/xferlog           w,
  # anon chroots
  /                          r,
  /pub                       r,
  /pub/**                    r,
  @{HOMEDIRS}                r,
  @{HOME}/**                 rwl,
}
