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

Re: /etc/ld.so.preload handling in package maintainer scripts?



Hi Marc,

On Wed, Feb 06, 2002 at 08:09:56PM +0100, Marc Haber wrote:
> I am currently preparing a package that needs to establish a
> pre-loaded library via /etc/ld.so.preload, and I'd like to discuss
> ways to do this in a non-destructive way without breaking the system.

> This is what I think of:

> configure:
> - ask user via debconf if she wants to have the library installed to
>   /etc/ld.so.preload.

> postinst:
> - if user allowed us to install:
>   grep ^$LIBRARY /etc/ld.so.preload > /dev/null 2>&1 || cat $LIBRARY
> >> /etc/ld.so.preload

> prerm:
> grep -v ^$LIBRARY /etc/ld.so.preload > /etc/ld.so.preload.new && mv
> /etc/ld.so.preload.new /etc/ld.so.preload.

> Do I have to take extra special precautions? Or is there even a
> package available that I could steal debconf code from?

As you know, preloading a library to ld.so.preload affects all software 
on the system and a bug in the library can lead to dangerous system
instability.  Perhaps you could provide specific details on what this 
library is, and why it needs to be preloaded (instead of, say, provided 
in a wrapper for a specific program)?

Steve Langasek
postmodern programmer

Attachment: pgp2R88KFPale.pgp
Description: PGP signature


Reply to: