No description
Find a file
2020-01-21 22:30:46 +00:00
.builds Don't build tools which aren't required to test 2020-01-21 22:26:00 +00:00
src Fix #1 - add unveil(2) support (#2) 2019-09-30 21:49:37 +01:00
tests Remove unused import 2020-01-21 22:30:46 +00:00
.editorconfig Adding some more documentation, making pledge() take varargs rather than an openarray 2016-11-22 19:42:00 +00:00
.gitignore Slight reformatting 2017-06-16 17:13:11 +01:00
LICENSE Update CI to use Nim 1.0.4, update copyright, remove built docs 2020-01-21 22:22:35 +00:00
pledge.nimble Update CI to use Nim 1.0.4, update copyright, remove built docs 2020-01-21 22:22:35 +00:00
README.md Update CI to use Nim 1.0.4, update copyright, remove built docs 2020-01-21 22:22:35 +00:00

pledge.nim builds.sr.ht status

A wrapper around OpenBSD's pledge(2) system call for Nim.

Includes support for OpenBSD's unveil(2) system call.

Installation

pledge can be installed using Nimble:

nimble install pledge

Or add the following to your .nimble file:

# Dependencies

requires "pledge >= 2.0.0"

Usage

import pledge

pledge(Promises.Stdio)

# As we haven't used pledge to ask to access files, the below will cause the program to be terminated with a SIGABRT.
let f = open("/etc/rc.conf")