Skip to content

Commit

Permalink
add ld-system-preload-disable
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Schleizer committed Oct 11, 2020
1 parent a64bb8c commit d13cd5a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
6 changes: 5 additions & 1 deletion debian/control
Expand Up @@ -14,7 +14,7 @@ Standards-Version: 4.3.0
Package: helper-scripts
Architecture: all
Depends: sudo, python3, python3-stem, python3-scapy, python3-yaml,
${misc:Depends}
bubblewrap, ${misc:Depends}
Replaces: anon-shared-helper-scripts, curl-scripts, anon-ws-leaktest,
python-guimessages, python3-guimessages
Description: Helper scripts useful for Linux Distributions
Expand All @@ -35,3 +35,7 @@ Description: Helper scripts useful for Linux Distributions
Generic modules guimessage.py and translations.py.
Called with two parameters: .yaml file path and yaml section. Return
translations according to distribution local language (Python 'locale').
.
Provides the ld-system-preload-disable wrapper to disable /etc/ld.so.preload
per application via bubblewrap. Useful if hardened_malloc is being globally
preloaded and needs to be disabled for some applications.
28 changes: 28 additions & 0 deletions man/ld-system-preload-disable.8.ronn
@@ -0,0 +1,28 @@
ld-system-preload-disable(8) -- disable /etc/ld.so.preload per application
=============================================

<span class="comment">
# Copyright (C) 2020 - 2020 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
# See the file COPYING for copying conditions.
</span>

## SYNOPSIS

ld-system-preload-disable command

## DESCRIPTION

Uses brwap to hide /etc/ld.so.preload from application so it will be ignored.

Does not modify LD_PRELOAD environment variable.

Prepend ld-system-preload-disable in front of the actual application / command
intended to be run.

## RETURN VALUES

Returns what application returns.

## AUTHOR

This man page has been written by Patrick Schleizer (adrelanos@riseup.net).
8 changes: 8 additions & 0 deletions usr/bin/ld-system-preload-disable
@@ -0,0 +1,8 @@
#!/bin/bash

## Copyright (C) 2020 - 2020 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.

## This fails if file /etc/ld.so.preload does not exists.
## bwrap: Can't create file at /etc/ld.so.preload: Permission denied
bwrap --dev-bind / / --ro-bind /dev/null /etc/ld.so.preload "${@}"

0 comments on commit d13cd5a

Please sign in to comment.