# Optional arguments for user-privacy-ebpf
OPTIONS="-enforce -min-uid 500"

# Symlink target rule: by default a restricted user may only link to targets
# they OWN (the kernel module and the reactive cleanup both apply this).
# Add -allow-same-gid to OPTIONS to also allow targets whose group is the
# creator's primary group, e.g.:
#   OPTIONS="-enforce -min-uid 500 -allow-same-gid"
#
# Repeated access/module denials are summarized every -summary-interval
# (default 10s, 0 = off), e.g. OPTIONS="... -summary-interval 30s".

# User-namespace guard. ON by default: symlink creation and rename are refused
# when the actor controls its namespace -- its own user namespace, or its mount
# namespace's owner, is not the initial one. Root-built namespaces (cPanel
# jailshell, CageFS, systemd PrivateTmp=) are allowed, because the user cannot
# mount in them.
#
# One toggle governs both modes: the BPF hooks enforce it in mode=kmod and
# mode=fallback alike. There is no module parameter and nothing is written to
# sysfs; -status shows the effective value.
#
# To ALLOW namespaced creation on a host that legitimately needs it (for
# example a container where PID 1 is not the host init):
#   OPTIONS="-enforce -min-uid 500 -protect-userns=false"
#
# Passing a bare -protect-userns still means "on", so existing OPTIONS lines
# that include it remain valid.

# Bare-name target exemption (on by default). A symlink target that names a
# single path component -- no '/', and not "." or ".." -- can only resolve to a
# sibling inside the link's own directory, and creating a symlink already
# requires owning that directory. So such a target cannot reach another user's
# file, and a dangling one is not a violation. This matters for cPanel, which
# writes transient links of that shape:
#   .ea-php-cli.cache -> ea-php83
#   username           -> yfblktte
#   provider           -> LetsEncrypt
# Resolving those at creation often fails (the version directory is created
# later), and without this exemption the link is refused or deleted and then
# recreated, repeatedly.
#
# A target that resolves to a file owned by someone else is still refused: only
# the non-existent case is exempt. Targets containing '/', and "." or "..", are
# never exempt.
#
#   OPTIONS="... -exempt-bare-targets=false"      # restore strict checking
#
# This is the only switch. The daemon applies it to the module (it loads the
# module itself, or writes the parameter of one already resident) and to the
# reactive cleanup, so the two cannot disagree. The daemon replaces a module
# built from different source in place, while running, and retries on a timer
# if the old module still has work outstanding.

# Optional: comma-separated basenames under /var/cpanel/users/ to exclude from the
# cPanel-user set (read from the process environment; avoids long argv in ps).
# Restart the service after changing. Usually empty after the min-uid join fix.
# SYSTEM_USERS_EXCLUDE="nobody,root"
SYSTEM_USERS_EXCLUDE=""
