Skip to content

Commit

Permalink
lockdown: no need for duplicate assert function (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig authored Aug 25, 2024
1 parent 8d39b2c commit 8f70532
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lockdown_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,5 @@ func lockdown(directory string) {
ll := landlock.New(
landlock.Dir(directory, "rwc"),
)
assert(ll.Lock(landlock.Mandatory))
}

func assert(err error) {
if err != nil {
panic(err)
}
check(ll.Lock(landlock.Mandatory))
}

0 comments on commit 8f70532

Please sign in to comment.