LD_PRELOAD

markham_breitbach at ssimicro.com markham_breitbach at ssimicro.com
Fri Sep 4 22:03:19 UTC 2015


I am trying to configure the security/snoopy package as a solution for
logging shell activity within jails (I'm also open to alternative
suggestions!).  Snoopy works as an execve() wrapper that basically just
logs and passes through the calls.  For it to work though, I need to set
the LD_PRELOAD variable in the environment to force the linker to load
snoopy.so first, presumably so the snoopy execve wrapper is found before
the libc version.

If I set LD_PRELOAD=/usr/local/lib/snoopy.so on the command line, and
then launch a new shell, events get logged as expected, but I need to
figure out how to make that happen by default for everything in the jail.

Thanks,

-Markham



More information about the freebsd-questions mailing list