Skip to content

Commit

Permalink
Move status of openat2 to core
Browse files Browse the repository at this point in the history
(cherry picked from commit 6306324)
  • Loading branch information
LordRalex committed Mar 30, 2024
1 parent 09cb59a commit b9322a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 10 additions & 1 deletion kernel.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package pufferpanel

import "github.com/pufferpanel/pufferpanel/v2/config"
import (
"github.com/pufferpanel/pufferpanel/v2/config"
"github.com/pufferpanel/pufferpanel/v2/logging"
)

var useOpenat2 = false

Expand All @@ -12,6 +15,12 @@ func DetermineKernelSupport() {
} else {
testOpenat2()
}

if useOpenat2 {
logging.Debug.Printf("openat2 enabled")
} else {
logging.Info.Printf("WARNING: OPENAT2 SUPPORT NOT ENABLED")
}
}

func UseOpenat2() bool {
Expand Down
4 changes: 0 additions & 4 deletions kernel_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,4 @@ func testOpenat2() {
} else {
panic(fmt.Errorf("Could not open /proc/kallsyms to validate kernel support\n%s", err.Error()))
}

if !useOpenat2 {
logging.Info.Printf("WARNING: OPENAT2 SUPPORT NOT ENABLED")
}
}

0 comments on commit b9322a1

Please sign in to comment.