Module RestrictedSource

Sourcemodule SystemOperation : sig ... end

system operation: OpenBSD: pledge(2)

Sourcemodule PathAccess : sig ... end

path access: OpenBSD: unveil(2)

Sourcemodule PathPermission : sig ... end

path permission: OpenBSD: unveil(2)

Sourceval run : system_operations:SystemOperation.t list -> accesses:PathAccess.t list -> (unit -> unit) -> unit

execute your program with restricted system operations and filesystem view

  • raises Failure

    if system_operations:SystemOperation has same value twice or if accesses:PathAccess.permissions has same value twice