Skip to content
This repository

Allows easy tracing of daemons/applications in-situ

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ChangeLog
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
Octocat-spinner-32 libpretrace.c
Octocat-spinner-32 pretrace.3
Octocat-spinner-32 pretrace.conf.example
Octocat-spinner-32 pretrace.h
Octocat-spinner-32 ptgenmap.8
Octocat-spinner-32 ptgenmap.c
Octocat-spinner-32 trie.c
Octocat-spinner-32 trie.h
README
libpretrace is a preload library that allows specified (dynamically linked)
applications to always be executed under a debugging environment. To start
using pretrace, add libpretrace.so to your /etc/ld.so.preload.

root# echo /lib/libpretrace.so >> /etc/ld.so.preload

You can now specify applications to trace in /etc/pretrace.conf, the format
is one application per line, if you would like to specify a debugger append
a colon, then the full path to the debugger and any arguments you would like
to pass. If you do not specify a debugger, you get the default, strace, which
saves the output to .logfile in the current working directory.

An optional number can be appended in the format %N, eg %50, to specify what 
percentage of invocations should be traced.

# this is a comment
/full/path/to/application[%percent][:/full/path/to/debugger [arg1 arg2 ...]]

An example pretrace.conf is provided with this distribution.

After modifying pretrace.conf, you should execute ptgenmap to generate a new
map file, this is used to quickly parse the configuration file with minimal
impact on initialisation time.

libpretrace is designed as a debugging utility for developers and auditors,
and should not be used in a production environment.

libpretrace is released under GPL version 2, and was created by Rob Holland
and Tavis Ormandy of the Gentoo Linux Security Audit Team.

taviso@gentoo.org
rob@inversepath.com

April, 2005.
Something went wrong with that request. Please try again.