Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
The Openbsd
package provides Pledge
and Unveil
modules which wraps pledge(2)
and unveil(2)
syscalls to ocaml.
The interface is fully documented in the interface file lib/openbsd.mli
.
On portable project, it is recommanded to use Pledge.supported
and Unveil.supported
constants to conditionally calls the wrappers.
Calling them on unsupported system will raise an Failure
exception.
let open Openbsd in
if Pledge.supported then
Pledge.promises "stdio rpath"
let open Openbsd in
if Unveil.supported then (
Unveil.add "./lib" "r";
Unveil.add "./logs" "rwc";
Unveil.lock ())