Commit Graph

33 Commits

Author SHA1 Message Date
Federico Di Pierro
cb20cf83ff new(scripts, cmake): added support for modern bpf probe.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
c6f668bc71 cleanup(scripts, cmake): fix switch in deb and rpm postinst scripts.
Cleanup cmake cpackgenerator options.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
cbea78b283 fix(scripts): by default, do not enable any driver.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
ca55e70a33 chore: make dontstart default dialog selection.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
4e57670599 chore(scripts): add back a dontstart option.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
91fe2e9e24 chore(scripts): added support for falco@plugin.target.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
b04bb2e32e chore(scripts): renamed Don't Start to Plugin.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
e26aa6a385 chore(scripts): when running in non-interactive mode, do not enable neither start any driver.
Eg: when building Falco docker image, and installing Falco package, we don't want it to build any driver.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
818f717622 chore(scripts,cmake): dialog is an optional dep, do not list it among deps.
Cleaned up unused vars in postinst scripts.
Finally, only show dialog window in interactive shells.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
b6078ce1be new(scripts): allow rpm/deb users to decide at configure time which driver to use (kmod or ebpf).
Manage it via a bash dialog interface.
Moreover, use falco-driver-loader instead of dkms to build bpf/kmod after package install.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Federico Di Pierro
06fe9e6985 new(scrips): improve systemd units for rpm and debian.
Unify them; plus, rework systemd units to support eBPF too.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-12-15 14:09:19 +01:00
Andrea Terzolo
90d6d9080a fix: inject kmod script
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-10-12 16:40:21 +02:00
Andrea Terzolo
7da3041cb3 feature(falco_service): add a service unit to inject the kmod
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-10-12 10:50:21 +02:00
Andrea Terzolo
48ce85f4da fix(falco_service): falco service needs to write under /sys/module/falco
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-10-12 10:50:21 +02:00
Stanley Chan
7610ee53e5 cleanup(scripts): cleanup systemd unit in DEB installer
Signed-off-by: Stanley Chan <pocketgamer5000@gmail.com>
2022-10-07 14:47:00 +02:00
Andrea Terzolo
21b127ef65 docs(falco_scripts): update Copyright
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-04-29 13:46:58 +02:00
Andrea Terzolo
a11d513bff chore(falco_scripts): Update falco-driver-loader cleaning phase
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-04-29 13:46:58 +02:00
Federico Di Pierro
ff21544186 update(build)!: replaced various PROBE with DRIVER where necessary.
Follow-up of https://github.com/falcosecurity/libs/pull/197.
Updated libs too to master version, as needed.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-02-08 09:50:39 +01:00
JenTing Hsiao
b1801c28c7 Bump year to 2021
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-03-12 10:45:31 +01:00
JenTing Hsiao
e1d3e68a84 Modprobe/rmmod at systemd service start/stop
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-03-12 10:45:31 +01:00
JenTing Hsiao
5661b491af Removes the comments in systemd service files
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-03-12 10:45:31 +01:00
JenTing Hsiao
39bb5c28c7 Migrate from init to systemd in debian package
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-03-12 10:45:31 +01:00
Leonardo Grasso
762ef015b8 fix(scripts): correct kernel module name
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-05-18 14:08:25 +02:00
Leonardo Di Donato
24d04e6125 fix(scripts/debian): refinements to the scripts for DEB package
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-17 13:30:52 +02:00
Leonardo Di Donato
b59e4b6072 chore(docker,cmake,scripts): correct maintainers email
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-02-28 17:32:38 +01:00
Leonardo Di Donato
6ede7bd422 chore: removing sysdig references
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Lorenzo Fontana
c76518c681 update: license headers
Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2019-10-08 16:02:26 +02:00
Mark Stemm
32f8e304eb
Load/unload kernel module on start/stop (#459)
* Load/unload kernel module on start/stop

When falco is started, load the kernel module. (The falco binary also
will do a modprobe if it can't open the inspector, as a backup).

When falco is stopped, unload the kernel module.

This fixes https://github.com/falcosecurity/falco/issues/418.

* Put script execute line in right place.
2018-11-06 13:07:50 -08:00
Mark Stemm
6445cdb950
Better copyright notices (#426)
* Use correct copyright years.

Also include the start year.

* Improve copyright notices.

Use the proper start year instead of just 2018.

Add the right owner Draios dba Sysdig.

Add copyright notices to some files that were missing them.
2018-09-26 19:49:19 -07:00
Mark Stemm
ec5adfe892 Build and package standalone falco kernel module
Start packaging (and building when necessary) a falco-specific kernel
module in falco releases. Previously, falco would depend on sysdig and
use its kernel module instead.

The kernel module was already templated to some degree in various
places, so we just had to change the templated name from
sysdig/sysdig-probe to falco/falco-probe.

In containers, run falco-probe-loader instead of
sysdig-probe-loader. This is actually a script in the sysdig repository
which is modified in https://github.com/draios/sysdig/pull/789, and uses
the filename to indicate what kernel module to build and/or load.

For the falco package itself, don't depend on sysdig any longer but instead
depend on dkms and its dependencies, using sysdig as a guide on the set
of required packages.

Additionally, for the package pre-install/post-install scripts start
running falco-probe-loader.

Finally, add a --version argument to falco so it can pass the desired
version string to falco-probe-loader.
2017-03-20 15:56:37 -07:00
Mark Stemm
58d730c62a Don't start by default on debian.
This makes the behavior consistent on debian and redhat.
2016-05-09 17:17:39 -07:00
Mark Stemm
a787dc84d5 Add daemonization, fix any bugs found.
Add support for daemonizing via the --daemon flag. If daemonized, the
pid is written to the file provided via the --pidfile flag. When
daemonized, falco immediately returns an error if stderr output or
logging was chosen on the command line.

Clean up handling of outputs to match the expected use case (daemon):

 - syslog output is enabled by default
 - stdout output is disabled by default
 - If not configured at all, both outputs are enabled.

Also fix some bugs I found while running via packages:

 - There were still some references to the old rules filename
   falco_rules.conf.
 - The redhat package mistakenly defined some system directories like
   /etc, /etc/init.d. Add them to the exclusion list (See
   https://cmake.org/Bug/view.php?id=13609 for context).
 - Clean up some of the error messages to be more consistent.

After this I was able to build and install debian and rpm
packages. Starting the falco service ran falco as a daemon with syslog
output.
2016-05-06 17:25:54 -07:00
Mark Stemm
cfc89127e7 Add init.d files to debian/redhat packages.
Add init.d scripts to debian/redhat packages as well as
postinstall/remove scripts to enable the falco service on install and
disable it on uninstall.

I still need to add support for daemonization to falco, and change the
default output options to match the expected use of being daemonized.
2016-05-06 14:04:44 -07:00