Skip to content

Commit

Permalink
bundles: disable landlock
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <[email protected]>
  • Loading branch information
Foxboron committed Aug 2, 2024
1 parent 0dcec78 commit e200257
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions cmd/sbctl/list-bundles.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/foxboron/sbctl/config"
"github.com/foxboron/sbctl/hierarchy"
"github.com/foxboron/sbctl/logging"
"github.com/foxboron/sbctl/lsm"
"github.com/spf13/cobra"
)

Expand All @@ -29,11 +28,11 @@ var listBundlesCmd = &cobra.Command{

logging.Errorf("The bundle/uki support in sbctl is deprecated. Please move to dracut/mkinitcpio/ukify.")

if state.Config.Landlock {
if err := lsm.Restrict(); err != nil {
return err
}
}
// if state.Config.Landlock {
// if err := lsm.Restrict(); err != nil {
// return err
// }
// }

bundles := []JsonBundle{}
var isSigned bool
Expand Down
3 changes: 2 additions & 1 deletion cmd/sbctl/sign-all.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ var signAllCmd = &cobra.Command{
Short: "Sign all enrolled files with secure boot keys",
RunE: func(cmd *cobra.Command, args []string) error {
state := cmd.Context().Value(stateDataKey{}).(*config.State)
if state.Config.Landlock {
// Don't run landlock if we are making UKIs
if state.Config.Landlock && !generate {
if err := sbctl.LandlockFromFileDatabase(state); err != nil {
return err
}
Expand Down

0 comments on commit e200257

Please sign in to comment.