forked from gopasspw/gopass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pledge(2) support for OpenBSD (gopasspw#469)
Pledge (OpenBSD only) is a way to restrict the operations an application can make use of on OpenBSD. Applications declare their intent by specifying the system calls they will use, after which point, any use outside of the pledge'd calls will result in the kernel killing the process. More info on pledge can be found here: http://man.openbsd.org/pledge
- Loading branch information
1 parent
d30ad5d
commit 0a9d99c
Showing
198 changed files
with
56,774 additions
and
24,779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// +build !openbsd | ||
|
||
package protect | ||
|
||
// Pledge on any other system than OpenBSD doesn't do anything | ||
func Pledge(s string) { | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build openbsd | ||
|
||
package protect | ||
|
||
import "golang.org/x/sys/unix" | ||
|
||
// Pledge on OpenBSD lets us "promise" to only run a subset of | ||
// system calls: http://man.openbsd.org/pledge | ||
func Pledge(s string) { | ||
_ = unix.Pledge(s, nil) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.