Skip to main content

Binding for the OpenBSD pledge(2) system call

Project description

def pledge(promises: Optional[Iterable[str]] = None,
           execpromises: Optional[Iterable[str]] = None) -> None: ...

Throws OSError if the platform does not support pledge(2) or if the pledge fails.

Example

The following will restrict the current process to only the stdio and tty promises, and then attempt to violate that restriction:

import pypledge
pypledge.pledge(['stdio', 'tty'])
f = open('foo.txt')

On OpenBSD 5.9, this will terminate with SIGABRT because the rpath promise was required.

On other platforms, this will throw OSError.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypledge-0.3.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file pypledge-0.3.1.tar.gz.

File metadata

  • Download URL: pypledge-0.3.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for pypledge-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e6e8438f722605b13c9cbf5259b6593022045c815e51db55f41a86660e53791f
MD5 d30dc4111600d0c1d5d49af874661da4
BLAKE2b-256 ff8368ede0961a31c7deda0833a682d1c2be5bd8f57bb022341fff375300ec56

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page