7 Commits

Author SHA1 Message Date
Dmitry Sharshakov
ae6d065beb
fix: mount selinuxfs only when SELinux is enabled
Having selinuxfs mounted might confuse some software, as conventional Linux systems do not have selinuxfs mounted when SELinux is disabled and no policy is loaded.

Fixes #10083

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-01-05 19:17:34 +03:00
Noel Georgi
5ccbf4bcdb
feat: enable configfs
Enable `configfs`.

Ref: https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt

Part of: https://github.com/siderolabs/extensions/issues/562

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-01-03 20:06:17 +05:30
Dmitry Sharshakov
1a8cc5f8b2
feat: add SELinux labels to volumes
Label mounted filesystems like ephemeral, overlay mounts, as well as data directories (going to become volumes later).

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-21 14:23:43 +01:00
Andrey Smirnov
5a0fd5b882
refactor: move early initialization functions to pre-initialize phase
Fixes #8900

Closes #9687

(contains splitting of late mounts)

The benefits:

* tasks run _before_ controllers are started
* tasks can register `defer` to undo actions

This decomposes sequencer tasks a bit.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-12 19:48:40 +04:00
Noel Georgi
1800f81044
fix: selinux handling and apparmor tests
Conditionally mount selinuxfs only if it's present.

Fix AppArmor tests, `apparmor` and other minor LSM's and set
`apparmor=1`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-07 07:50:00 +05:30
Dmitry Sharshakov
960a040491
feat: start enabling SELinux
Part of: #9127

Label executables and processes, build, load and manage SELinux policy, enable audit support.

Labeling filesystems, devices and runtime files will be done in further changes, see the full PR.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-04 16:56:53 +01:00
Andrey Smirnov
62ec7ec336
refactor: replace the old v1 mount package with new one
Re-design some methods, simplify flows and allow more simple
interactions.

Learn from mistakes and design better methods.

Fixes #9471

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-30 14:21:28 +04:00