Add call to pledge() on OpenBSD
This commit is contained in:
parent
1c9bb056e8
commit
aecbdfec4f
1 changed files with 13 additions and 1 deletions
14
esv.d
14
esv.d
|
@ -48,13 +48,25 @@ bool rFlag, RFlag; /* passage references */
|
||||||
string sFlag; /* search passages */
|
string sFlag; /* search passages */
|
||||||
bool VFlag; /* show version */
|
bool VFlag; /* show version */
|
||||||
|
|
||||||
|
version (OpenBSD) {
|
||||||
|
immutable(char) *promises;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(string[] args)
|
main(string[] args)
|
||||||
{
|
{
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
|
version (OpenBSD) {
|
||||||
|
import core.sys.openbsd.unistd : pledge;
|
||||||
|
import std.string : toStringz;
|
||||||
|
|
||||||
|
promises = toStringz("stdio rpath wpath cpath inet dns proc exec prot_exec");
|
||||||
|
pledge(promises, null);
|
||||||
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
return run(args);
|
return run(args) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue