You can analyze LSM, it seems to be a good solution. ([1]).
> The LD_PRELOAD method has a few drawbacks: security issues, statically
> linked programs. I am looking for another solution.
> Marius
thanks,
Daniel.
[1] http://www.usenix.org/event/sec02/full_papers/wright/wright.pdf