https://github.com/certik/restrict
Restricts the file access using LD_PRELOAD
https://github.com/certik/restrict
Last synced: about 1 year ago
JSON representation
Restricts the file access using LD_PRELOAD
- Host: GitHub
- URL: https://github.com/certik/restrict
- Owner: certik
- Created: 2011-12-17T00:15:58.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-12-18T08:14:03.000Z (over 14 years ago)
- Last Synced: 2025-04-15T00:47:41.450Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 102 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Restrict
========
The restrict library restricts the ``open()``, ``open64()`` and ``fopen()``
calls to only allow opening "allowed" files. Compile with::
./compile
Examples of usage::
LD_PRELOAD=./restrict.so touch test_file
LD_PRELOAD=./restrict.so cat test_file
How it Works
------------
It preloads the ``open()``, ``open64()`` and ``fopen()`` libc calls using the
``LD_PRELOAD`` mechanism. This means that static binaries, as well as accessing
files by other means than through ``open/open64/fopen`` will not be checked.
License
-------
All code in this package is released under the MIT license.