Skip to content

Commit

Permalink
Fix: use custom fsguard config to account for .system (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
axtloss authored Jan 8, 2024
1 parent e2454f9 commit 76f10e0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
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

0 comments on commit 76f10e0

Please sign in to comment.