Commit Graph

249 Commits

Author SHA1 Message Date
Leonardo Grasso
8a1de131f4 update(scripts/falco-driver-loader): load the latest version first
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-01-24 17:49:34 +01:00
Jason Dellaluce
697d4427a7 chore(scripts): refine removal output messages
Signed-off-by: Jason Dellaluce jasondellaluce@gmail.com
Co-authored-by: Leonardo Grasso me@leonardograsso.com
2021-12-06 19:09:14 +01:00
Jason Dellaluce
bf04fed71c fix(scripts): correctly remove loaded drivers
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
2021-12-06 19:09:14 +01:00
Manuel Gauto
2312afe9cd Set digest-algo for gpg to use SHA256 for linux packages.
Signed-off-by: Manuel Gauto <mgauto@mgenterprises.org>
2021-11-12 17:17:27 +01:00
David Windsor
8448d02980 falco-driver-loader: don't fail if chcon is missing in load_kernel_module()
Signed-off-by: David Windsor <dwindsor@secureworks.com>
2021-11-02 16:49:55 +01:00
David Windsor
74661a7d8f Apply suggestions from code review
Don't fail if chcon is not present

Co-authored-by: Leo Di Donato <leodidonato@gmail.com>
Signed-off-by: David Windsor <dwindsor@secureworks.com>
2021-11-02 16:49:55 +01:00
David Windsor
e7b320b00c Fix falco-driver-loader SELinux insmod denials
Signed-off-by: David Windsor <dwindsor@secureworks.com>
2021-11-02 16:49:55 +01:00
Domenico Chirabino
d033868ab9 falso.service: set StandardOutput to null
Signed-off-by: Domenico Chirabino <chirabino@protonmail.com>
2021-09-23 08:46:47 +02:00
spartan
7c9ec9fc17 fix bugs
Signed-off-by: Spartan-65 <liuyanchong@outlook.com>
2021-09-21 18:54:09 +02:00
Leonardo Grasso
e616f79bac build: switch to falcosecurity-libs external project
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-05-21 10:24:08 +02:00
Leonardo Di Donato
04110b0f4c chore(scripts): restore mount of debugfs (notes below)
This is needed in systems where raw tracepoints are not available.

Anyways, since this is needed when the inspector open (and actually
loads) the eBPF probe, ideally the mount should not be done by this
script but rather from Falco, or from Falco libs.

Otherwise, users building the eBPF probe theirseleves and not using this script (and having a kernel without raw
tracepoints) may need to mount this fs theirselves.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
17ee409ac6 chore(scripts): better default values in the help message of falco-driver-loader
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
71b2b5adde chore(scripts): remove banner about BPF JIT kernel config option
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
75261d4518 update(scripts): look for a prebuilt Falco eBPF probe before trying to compile one
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
2a7b32e279 update(scripts): look for a prebuilt Falco module before trying to compile it on-the-fly
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Grasso
c587fadbce chore(scripts): typos
Applying suggestions from
https://github.com/falcosecurity/falco/pull/1577

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-07 16:45:50 +02:00
Leonardo Grasso
9e50e87ebc chore: remove "cleanup" script and job
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-07 16:45:50 +02:00
Leonardo Grasso
ef75c63e63 chore(scripts): print versions at the beginning
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 14:54:53 +01:00
Leonardo Grasso
fb126cb730 feat(scripts): --clean option for falco-driver-loader
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 14:54:53 +01:00
Leonardo Di Donato
645f51b296 new(scripts): falco-driver-loader know the Falco version it has been
built for

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-03-26 14:54:53 +01:00
Leonardo Di Donato
d912cf0d94 docs(scripts): falco-driver-loader outputs the Falco version it has been built for, also the driver version in use
Both in the help/usage message and at running time.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-03-26 14:54:53 +01:00
Leonardo Di Donato
3f75f27410 docs(scripts): improve help of falco-driver-loader script
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-03-26 14:54:53 +01:00
Leonardo Di Donato
1504e77f4e update(scripts): falco-driver-loader can now start with a custom driver name
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-03-26 14:54:53 +01:00
Leonardo Grasso
3936740390 build(scripts): add cloudfront invalidation for publishing scripts
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 12:55:11 +01:00
Leonardo Grasso
9bc04fd02d build(scripts): publishing script for DEBs
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 12:55:11 +01:00
Leonardo Grasso
b6ac6de227 build(scripts): publishing script for RPMs
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 12:55:11 +01:00
Leonardo Grasso
5ebb653977 build(scripts): publishing script for bin packages
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-03-26 12:55:11 +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
JenTing Hsiao
3ba62a4031 Migrate from init to systemd in rpm package
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
2021-03-12 10:45:31 +01:00
Dominic Evans
4d6636a030 fix(scripts/falco-driver-loader): lsmod usage
Attempting to start falco on a host that had a similarly named module
(e.g., "falcon") would cause the falco-driver-loader to loop attempting
to rmmod falco when falco was not loaded.

falco-driver-loader will now inspect only the first column of lsmod
output and require the whole search string to match

Fixes #1468

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
2020-11-10 04:11:07 -05:00
Lorenzo Fontana
1efa4d3af0 update(scripts): driver loader cycle available gcc versions
The falco-driver-loader script calls dkms to compile the kernel
module using the default gcc.
In some systems, and in the falcosecurity/falco container image,
the defult gcc is not the right one to compile it.

The script will try to compile the module by cycling trough all the available GCCs
starting from the default one until the module is compiled the first
time.

The default gcc is the highest priority while trying.
Newer GCCs have the priority over older GCCs.

Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-16 18:09:09 +02:00
Leonardo Di Donato
2971d0de7f fix(scripts): move cleanup (falco development packages) into scripts dir
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-14 11:09:09 +02:00
Antoine Deschênes
0a600253ac falco-driver-loader: fix conflicting $1 argument usage
Signed-off-by: Antoine Deschênes <antoine@antoinedeschenes.com>
2020-07-28 09:58:39 +02:00
Leonardo Grasso
88dbc78a44 fix(scripts/falco-driver-loader): exit when bpf download fails
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-05-18 15:16:59 +02:00
Leonardo Grasso
59c2e6b421 update(scripts/falco-driver-loader): break apart logic
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-05-18 15:16:59 +02:00
Leonardo Grasso
33c93e6c29 chore(scripts/falco-driver-loader): improve messages
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-05-18 15:16:59 +02: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
Reshad Patuck
efd0bf1967 fix(falco-driver-loader): target for ubuntu is ubuntu-generic
The upstream files for the generic Ubuntu kernel are all called ubuntu-generic
see: https://dl.bintray.com/falcosecurity/driver/96bd9bc560f67742738eb7255aeb4d03046b8045/

Signed-off-by: Reshad Patuck <reshad@patuck.net>
2020-05-15 19:20:29 +02:00
Leonardo Grasso
622a6c1e44 fix(test/driver-loader): source script to get env vars populated
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-05-15 11:19:31 +02:00
Lorenzo Fontana
9909af8bfb fix(scripts): fix ignored calls script to use the new paths
Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2020-05-01 19:06:51 +02:00
Stuxend
e51ee60646 fixing curl command error 0 bytes for CDN download.
Signed-off-by: Stuxend <friquet@gmail.com>
2020-04-29 19:11:48 +02:00
Leonardo Di Donato
8a1cae6989 fix(scripts): correct "drivers build gruid" URLs
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-24 15:42:29 +02:00
Leonardo Di Donato
26621ca381 fix(scripts): falco-driver-loader must infer the OS ID from the host
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-24 11:28:05 +02:00
Leonardo Di Donato
207f74b17c update(scripts): changes to falco-driver-loader to support the Falco
eBPF probes coming from the drivers build grid

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-24 11:28:05 +02:00
Leonardo Di Donato
9baa3707dc fix(scripts): falco-driver-loader takes into account the new kernel modules URLs
The new Falco kernel modules URLs are:
`<base_url>/kernel-module/<driver_version>/falco_<target_id>_<kernel_release>_<kernel_version>`

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-24 11:28:05 +02:00
Leonardo Di Donato
9f6833e1db build: move packages scripts via CMake
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
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
81e56067f8 fix(scripts/rpm): obtain the driver version (now different from the Falco version)
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
b3998a6b44 build(scripts): insert versions into falco-driver-version and install it
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-03-23 18:50:06 +01:00
Leonardo Di Donato
b39f322994 fix(scripts): falco-probe-loader becomes falco-driver-loader and distinghuishes driver version from falco version
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-03-23 18:50:06 +01: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
Lorenzo Fontana
802b9f7b69 fix: probe environment set to FALCO_BPF_PROBE also at load time
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2020-02-24 19:40:04 +01:00
Leonardo Di Donato
29847df168 fix(scripts/rpm): substitute underscores with dashes for RPM version
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-21 12:51:50 +01:00
Leonardo Di Donato
5434afaee1 build: remove SYSDIG_DIR variable
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
4383bf6e4a chore: remove old build script
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
9db6f95f22 update: deb/rpm falco description
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
c8e1491783 chore: remove jenkins
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Lorenzo Fontana
b8335b510d build: falco tester automatic version
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2020-01-17 19:09:31 +01:00
Leonardo Di Donato
885e131451 fix(scripts): copy falco-probe-loader during packages build
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
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
Leonardo Di Donato
a17a12c306 update(scripts): rename env variables for falco probe loader
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
Leonardo Di Donato
514d8bacc3 update(docker): introduce SKIP_MODULE_LOAD env variable
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
Leonardo Di Donato
17bc344381 fix(scripts): rename SYSDIG_HOST_ROOT env variable into HOST_ROOT
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
468fa35965 chore: naming cleanup
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
bb3c0275cc fix(scripts): license header
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
568f480942 new falco-probe-loader file that doesn't depend on sysdig
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
3b45e58217 chore: remove some more unnecessary, legacy references to falco in sysdig
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-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
Leonardo Di Donato
4a4701b4fd fix(scripts/jenkins): ensure to pull docker images (falco builder and tester)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
40111a5d6e chore: moving travis build script in scripts directory
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
323a9ef51d chore: switching back to latest falco-builder and falco-tester docker images for CI
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
49752fc81a update(scripts): jenkins pipeline improvements
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
f18fc46a1c build: update cpack variables
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Lorenzo Fontana
19c12042f4 update: sysdig dir gate in subdirectories
Signed-off-by: Lorenzo Fontana <lo@linux.com>

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-03 15:27:28 +02:00
Mark Stemm
0e1c436d14
Add jenkins checks (#584)
* Supporting files to build/test via jenkins

Changes to build/test via jenkins, which also means running all tests in
a container instead of directly on the host:

- Jenkinsfile controls the stages, build.sh does the build and
  run-tests.sh does the regression tests.

- Create a new container falcosecurity/falco-tester that includes the
  dependencies required to run the regression tests. This is a different
  image than falco-builder because it doesn't need to be centos 6 based,
  doesn't install any compiler/etc, and installs the test running
  framework we use (avocado). We now use a newer version of avocado,
  which resulted in some small changes to how it is run and how yaml
  options are parsed.

- Modify run_regression_tests.sh to download trace files to the build
  directory and only if not present. Also honor BUILD_TYPE/BUILD_DIR,
  which is provided via the docker run cmd.

- The package tests are now moved to a separate falco_tests_package.yaml
  file. They will use rpm installs by default instead of debian
  packages. Also add the ability to install rpms in addition to debian
  packages.

- Automate the process of creating the docker local package by: 1)
  Adding CMake rules to copy the Dockerfile, entrypoint to the build
  directory and 2) Copy test trace files and rules into the build
  directory. This allows running the docker build command from
  build/docker/local instead of the source directory.

- Modify the way the container test is run a bit to use the trace
  files/rules copied into the container directly instead of host-mounted
  trace files.

* Use container builder + tester for travis

We'll probably be using jenkins soon, but this will allow switching back
to travis later if we want.

* Use download.draios.com for binutils packages

That way we won't be dependent on snapshot.debian.org.
2019-04-26 12:24:15 -07:00
Xiang Dai
04b1b4da67 delete all duplicate empty blanks (#542)
falco-CLA-1.0-signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-27 11:53:40 -05: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
2352b96d6b
Change license to Apache 2.0 (#419)
Replace references to GNU Public License to Apache license in:

 - COPYING file
 - README
 - all source code below falco
 - rules files
 - rules and code below test directory
 - code below falco directory
 - entrypoint for docker containers (but not the Dockerfiles)

I didn't generally add copyright notices to all the examples files, as
they aren't core falco. If they did refer to the gpl I changed them to
apache.
2018-09-20 11:47:10 -07:00
Riccardo Schirone
b8743385e8 Fix installation of falco on OS X (no driver, /usr not writable) 2017-06-16 22:36:13 +02: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
f547dc97ab Move falco engine to its own library.
Move the c++ and lua code implementing falco engine/falco common to its
own directory userspace/engine. It's compiled as a static library
libfalco_engine.a, and has its own CMakeLists.txt so it can be included
by other projects.

The engine's CMakeLists.txt has a add_subdirectory for the falco rules
directory, so including the engine also builds the rules.

The variables you need to set to use the engine's CMakeLists.txt are:

- CMAKE_INSTALL_PREFIX: the root directory below which everything is
  installed.
- FALCO_ETC_DIR: where to install the rules file.
- FALCO_SHARE_DIR: where to install lua code, relative to the
- install/package root.
- LUAJIT_INCLUDE: where to find header files for lua.
- FALCO_SINSP_LIBRARY: the library containing sinsp code. It will be
- considered a dependency of the engine.
- LPEG_LIB/LYAML_LIB/LIBYAML_LIB: locations for third-party libraries.
- FALCO_COMPONENT: if set, will be included as a part of any install()
  commands.

Instead of specifying /usr/share/falco in config_falco_*.h.in, use
CMAKE_INSTALL_PREFIX and FALCO_SHARE_DIR.

The lua code for the engine has also moved, so the two lua source
directories (userspace/engine/lua and userspace/falco/lua) need to be
available separately via falco_common, so make it an argument to
falco_common::init.

As a part of making it easy to include in another project, also clean up
LPEG build/defs. Modify build-lpeg to add a PREFIX argument to allow for
object files/libraries being in an alternate location, and when building
lpeg, put object files in a build/ subdirectory.
2016-10-24 15:56:45 -07:00
Mark Stemm
2237532ff0 Quote path variables that may contain spaces.
Make sure that references to variables that may be paths (which in turn
may contain spaces) are quoted, so cmake won't break on the spaces.

This fixes https://github.com/draios/falco/issues/79.
2016-05-23 17:20:15 -07:00
Henri DF
fbdab4362c Remove install-falco script.
It isn't being used yet, for now we're using the corresponding script
from the sysdig repo. Removing it to avoid confusion, we can later
re-add as necessary.
2016-05-12 17:31:34 +00: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
Henri DF
14c1e30c24 Simple script to list ignored syscalls 2016-05-01 23:35:30 +00:00
Henri DF
abe6220651 Renaming 2016-04-28 03:28:19 +00:00
Henri DF
1baedc156f Add install-digwatch script template 2016-04-21 16:33:17 -07:00
Henri DF
d96336ccaa Packaging: remove driver and add dep on sysdig package 2016-04-04 18:01:05 -07:00
Henri DF
86e1eeffb2 Statically link in lpeg lua library 2016-04-04 15:07:16 -07:00
Henri DF
171d58c805 Packaging
- add debian pre/post scripts
- make tgz and rpm (as well as deb)
2016-03-31 20:48:24 -07:00
Henri DF
37d0f7d3e0 Build .deb, .rpm, and .tgz 2016-03-31 18:54:52 -07:00
Henri DF
b8a16aab85 fix re.lua permissions 2016-03-08 01:15:43 +00:00
Henri DF
cc4837312e Pull lpeg and build it 2016-03-04 17:52:01 -08:00