[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] Shared Libraries



On Tue, 2 May 2000, Shaun Clowes wrote:

> I'm writing a shared library to be LD_PRELOADed and wrap around a glibc
> routine (in this case connect()). The wrapper library must read a
> configuration file in order to perform its function and since its
> preloaded for all processes I'm attempting to prevent doing any
> initialization till the first intercepted connect() occurs. Basically, my
> problem is how to show error messages in a library like this. Showing them
> on stderr could be a problem if its being redirected, putting them in
> syslog might be ok, but I'd rather not interfere with process global stuff
> like opening syslog, choosing a facility etc. Any ideas/thoughts?

I haven't done anything like this myself but you may wish to checkout
both `fakeroot' and `authbind' in Debian.

Both these libraries are preloaded; fakeroot to convince the packaging
tools you are root when you are not. authbind to allow not root
processes to bind to ports less than 512.

If you are on a debian system; apt-get source <package> will figure
everything out for you. Try it on sutkeh if you like.

Cheers,
Anand

--
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.

This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>