Skip to content

Commit

Permalink
Update debugfs_launched_in_privilleged_container.go
Browse files Browse the repository at this point in the history
Signed-off-by: Kapil Sharma <ks3913688@gmail.com>
  • Loading branch information
h4l0gen authored and poiana committed Apr 3, 2024
1 parent ab58b70 commit 1d911a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions events/syscall/debugfs_launched_in_privilleged_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/falcosecurity/event-generator/events"
)

var _ = events.Register(LaunchDebugfsInPrivilegedContainer)
var _ = events.Register(DebugfsLaunchedInPrivilegedContainer)

func LaunchDebugfsInPrivilegedContainer(h events.Helper) error {
func DebugfsLaunchedInPrivilegedContainer(h events.Helper) error {
if h.InContainer() {
cmd := exec.Command("/usr/bin/debugfs", "/dev/sda1")
cmd := exec.Command("/usr/bin/debugfs")
cmd.SysProcAttr = &syscall.SysProcAttr{
Cloneflags: syscall.CLONE_NEWNS | syscall.CLONE_NEWUSER,
}
Expand All @@ -39,4 +39,4 @@ func LaunchDebugfsInPrivilegedContainer(h events.Helper) error {
}

return nil
}
}

0 comments on commit 1d911a9

Please sign in to comment.