OpenBSD::Unveil(3p)

OpenBSD::Unveil3p

Perl interface to openbsd unveil(2)

Usage

  use OpenBSD::Unveil;
  my $file = "/usr/share/dict/words";
  unveil( $file, "r" ) || die "Unable to unveil: $!";
  unveil() || die "Unable to lock unveil: $!";
  open my $fh, '<', $file or die "Unable to open $file: $!";
  print grep { /unveil/i } readline($fh);
  close $fh;

Overview

This module provides a perl interface to OpenBSD's unveil(2) syscall(2).

Export

Exports "unveil" by default.

Functions

unveil

Perl interface to unveil(2).

        unveil($path, $permissions)
        unveil() # to lock

Takes a string $path and a string of $permissions. Calling with no arguments disables future calls to "unveil". Returns true on success, returns false and sets $! on failure. Throws an exception on incorrect number of parameters.

Releases

16 releases since OpenBSD 6.6; the text changed 10 times.

  1. 6.6
  2. 6.7
  3. 6.8
  4. 6.9–7.2
  5. 7.3
  6. 7.4
  7. 7.5
  8. 7.6
  9. 7.7–7.8
  10. 7.9
  11. 8.0

Author

Andrew Fresh, <[email protected]>

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's man source.