Skip to content

Commit

Permalink
Code size reduced
Browse files Browse the repository at this point in the history
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
  • Loading branch information
GLVSKiriti authored and poiana committed Apr 5, 2024
1 parent d2a92d1 commit 8bc0b8d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions events/syscall/execution_from_dev_shm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,9 @@ var _ = events.Register(ExecutionFromDevShm)

func ExecutionFromDevShm(h events.Helper) error {
scriptPath := "/dev/shm/example_script-created-by-falco-event-generator.sh"

file, err := os.Create(scriptPath)
if err != nil {
return err
}

scriptContent := "#!/bin/bash\n echo 'hello world'"
if _, err := file.WriteString(scriptContent); err != nil {
return err
}

if err := file.Close(); err != nil {
if err := os.WriteFile(scriptPath, []byte(scriptContent), 0755); err != nil {
return err
}

Expand Down

0 comments on commit 8bc0b8d

Please sign in to comment.