Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: use custom fsguard config to account for .system #43

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions includes.container/fsguard_config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/config/config.go b/config/config.go
index 35291d7..1dda59d 100644
--- a/config/config.go
+++ b/config/config.go
@@ -1,6 +1,6 @@
package config

-var FileListPath = "/FsGuard/filelist"
+var FileListPath = "/.system/FsGuard/filelist"
var InitLocation = "/usr/bin/init"
var PostInitExec = "/usr/lib/systemd/systemd"
var RunPostInit = true
23 changes: 23 additions & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ modules:
commands:
- rm /usr/lib/*/gnome-software/plugins-20/libgs_plugin_packagekit.so

- name: build-fsguard
type: go
source:
type: git
url: https://github.com/linux-immutability-tools/FsGuard
tag: v0.1.2
modules:
- name: install go
type: apt
source:
packages:
- golang
- name: config-patch
type: shell
commands:
- patch -u /sources/build-fsguard/config/config.go -i /fsguard_config.patch
- rm /fsguard_config.patch

- name: cleanup
type: shell
commands:
Expand All @@ -83,10 +101,15 @@ modules:

- name: fsguard
type: fsguard
CustomFsGuard: true
FsGuardLocation: "/usr/sbin/FsGuard"
GenerateKey: true
FilelistPaths: ["/usr/bin"]
modules:
- name: install-built-fsguard
type: shell
commands:
- cp /sources/build-fsguard/build-fsguard /sources/FsGuard
- name: remove-prev-fsguard
type: shell
commands:
Expand Down