Skip to main content

No project description provided

Project description

Logo

Parent is a simple wrapper that allows you to run a program with limited resources and access.

Available options

Resource limits

The resources available for the program can be limited using these options. The limits are enforced using the Linux kernel's rlimit.

Option Description
-m / --memory N The program's maximum memory address space in kilobytes.
-t / --cpu-time N The program's maximum CPU time in milliseconds.
-r / --real-time N The program's maximum real-time execution time in milliseconds.
--stack N The program's stack size limit in kilobytes. (-1 for unlimited)
-f / --file-size N The program's maximum file size in kilobytes that it can create or modify.
-p / --processes N The number of threads, or processes, the program can use.

I/O

Program's stdin, stdout, and stderr will by default be redirected to parent's. You can change this behaviour using these options.

Option Description
--stdin FILE Redirect a file to the program's stdin.
--stdout FILE Redirect the program's stdout to a file.
--stderr FILE Redirect the program's stdout to a file.
--stderr-to-stdout Redirect the program's stderr to stdout.

File access

The program can access any file on the system by default. You can use these settings to restrict its access. Make sure you at least allow access to the program itself, since if you enable any of these options, the default behavior will be to prevent access to any files. File access is limited using Linux kernel's landlock. These options can be used multiple times to allow access to multiple paths.

Option Description
--fs-readonly PATH Allow the program read from files or folders located under the provided path.
--fs-writeonly PATH Allow the program write to files of folders located under the provided path.
--fs-readwrite PATH Allow the program read or write to files of folders located under the provided path.

Environment

The program inherits environment variables by default. It is possible to disable default inheritance and pass additional environment variables.

Option Description
--env NAME VALUE Set an environment variable.
--empty-env Do not inherit environment.

Syscalls

The program cannot use kill syscall by default (to prevent it from sending SIGSTOP to parent) while --seccomp-default is not set. You can use these options to allow or deny certain syscalls.

Option Description
--seccomp-default POLICY Default policy for syscalls.
--seccomp-allow SYSCALL Allow certain syscalls.
--seccomp-deny SYSCALL Deny certain syscalls (return ERRNO 1).
--seccomp-kill SYSCALL Deny certain syscalls (kill process).

Miscelaneous options

Option Description
--drop-caps Drop the program's capabilities.
-s / --stats FILE Save execution statistics to a file.

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

parent-25.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parent-25.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file parent-25.1.tar.gz.

File metadata

  • Download URL: parent-25.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.12.10-arch1-1

File hashes

Hashes for parent-25.1.tar.gz
Algorithm Hash digest
SHA256 5fdb2aba74d785902360f5bd3a19127d49270f233c3783e1ba71dff66672cf2d
MD5 387792efefa5a2c087bcb513ea03725b
BLAKE2b-256 c26cfc26934c8556ac9055b57f53c726f0bdbb753e3023312ab24bc7a9abd25a

See more details on using hashes here.

File details

Details for the file parent-25.1-py3-none-any.whl.

File metadata

  • Download URL: parent-25.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.12.10-arch1-1

File hashes

Hashes for parent-25.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63a130f290692fffe9b3b241490f51f5f75cc3e52b585279f5cb824b52c947b7
MD5 f671310ff0f415617753a2dd74e39714
BLAKE2b-256 fd73f3dd14306b2e6bd0530a7b7866cf5c8daea0e312febf7db5fbf5533c8aab

See more details on using hashes here.

Supported by

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