2 .\" Title: priv_wrapper
4 .\" Generator: Asciidoctor 2.0.17
10 .TH "PRIV_WRAPPER" "1" "2022-09-14" "\ \&" "\ \&"
28 . LINKSTYLE blue R < >
31 priv_wrapper \- A library to disable resource limits and other priviledge dropping.
34 LD_PRELOAD=libpriv_wrapper.so PRIV_WRAPPER=1 [PRIV_WRAPPER_CHROOT_DISABLE=1] [PRIV_WRAPPER_PRCTL_DISABLE=<options>] [PRIV_WRAPPER_SETRLIMIT_DISABLE=<options>]
37 priv_wrapper aims to help running processes which are dropping privileges or are
38 restricting resources in test environments.
39 It can disable chroot, prctl, pledge and setrlmit system calls. A disabled call always
40 succeeds (i.e. returns 0) and does nothing.
41 The system call pledge exists only on OpenBSD.
42 .SH "ENVIRONMENT VARIABLES"
46 This variable activates priv_wrapper when set to \fI1\fP.
49 \fBPRIV_WRAPPER_DISABLE_DEEPBIND\fP
51 This allows you to disable deep binding in priv_wrapper.
52 This is useful for running valgrind tools or sanitizers like (address, undefined, thread).
55 \fBPRIV_WRAPPER_CHROOT_DISABLE\fP
57 If this is set to \fI1\fP then chroot() system call will be disabled.
60 \fBPRIV_WRAPPER_PRCTL_DISABLE\fP
62 prctl calls can be disabled using this environment variable. You can either disable all
63 calls using PRIV_WRAPPER_PRCTL_DISABLE=ALL or special options using e.g.
64 PRIV_WRAPPER_PRCTL_DISABLE=PR_SET_SECCOMP|PR_SET_NO_NEW_PRIVS
67 Supported options are:
73 \fBPRIV_WRAPPER_SETRLIMIT_DISABLE\fP
75 Either all resource limits can be disabled using PRIV_WRAPPER_SETRLIMIT_DISABLE=ALL or
76 you can pick specific resources using e.g:
79 PRIV_WRAPPER_SETRLIMIT_DISABLE=RLIMIT_STACK|RLIMIT_CORE
81 Supported options are:
101 \fBPRIV_WRAPPER_PLEDGE_DISABLE\fP
103 If this is set to \fI1\fP then pledge() system call will be disabled.
106 \fBPRIV_WRAPPER_DEBUGLEVEL\fP
108 If you need to see what is going on in priv_wrapper itself or try to find a
109 bug, you can enable logging support in priv_wrapper if you built it with
158 LD_PRELOAD=libpriv_wrapper.so PRIV_WRAPPER=1 PRIV_WRAPPER_PRCTL_DISABLE="PR_SET_SECCOMP|PR_SET_NO_NEW_PRIVS"
160 LD_PRELOAD=libpriv_wrapper.so PRIV_WRAPPER=1 PRIV_WRAPPER_CHROOT_DISABLE=1 PRIV_WRAPPER_PRCTL_DISABLE=ALL PRIV_WRAPPER_SETRLIMIT_DISABLE="RLIMIT_CPU|RLIMIT_DATA|RLIMIT_NLIMITS"