5 # In order to capture system calls via falcosecurity-scap-dkms, we
6 # currently need read+write access to /dev/scap* and read access to
7 # various files under /proc, including /proc/<pid>/*, similar to
8 # the requirements described at
9 # https://github.com/draios/sysdig/wiki/How%20to%20Install%20Sysdig%20for%20Linux#use-sysdig-as-non-root
11 # Provide an option to install falcodump setuid root for now.
12 # Hopefully at some point we'll be able to switch to capabilities.
13 # https://falco.org/docs/install-operate/running/#least-privileged
15 # There's no corresponding stratoshark.postrm script because the "scap" group
16 # might be shared with falcosecurity-scap-dkms, so we don't want to
18 # Also, there are arguments against removing groups in general:
19 # https://wiki.debian.org/AccountHandlingInMaintainerScripts
21 .
/usr
/share
/debconf
/confmodule
22 PROGRAM
=$
(dpkg-divert
--truename /usr
/lib
/@DEB_HOST_MULTIARCH@
/stratoshark
/extcap
/falcodump
)
25 if ! dpkg-statoverride
--list $PROGRAM > /dev
/null
; then
26 db_get stratoshark
/install-setuid
27 if [ -e "$PROGRAM" ]; then
28 if [ "$RET" = "false" ] ; then
29 chown root
:root
$PROGRAM
30 chmod u
=rwx
,go
=rx
$PROGRAM
32 if ! addgroup
--quiet --system $GROUP; then
33 if ! getent group
$GROUP > /dev
/null
; then
34 db_input high stratoshark
/addgroup-failed || true
38 db_input high stratoshark
/group-is-user-group || true
42 chown root
:$GROUP $PROGRAM
43 chmod u
=rwxs
,g
=rx
,o
=r
$PROGRAM
47 dpkg-statoverride
--list $PROGRAM