Subject: Re: PAM and su -K
To: None <>
From: Joerg Sonnenberger <>
List: tech-userlevel
Date: 01/25/2005 19:26:35
On Tue, Jan 25, 2005 at 09:17:30AM -0800, Jason Thorpe wrote:
> Here's one major hurdle... Consider that many shared libraries use 
> functions from libc.  A statically-linked binary is only going to pull 
> in the minimum set of functions from libc at link time.  What if a 
> plugin then needed a function that the program didn't use?  Where does 
> it get it from?  Does it implicitly dynamically load its down libc, 
> with private bindings?  How does that interact with, say, malloc(), 
> that has global state?

I'm very well aware of this problems. On the other there's no need for
generic dlopen support in statically linked applications to support
e.g. the I18N framework. This is a special class and it should be
possible to define a subset of libc symbols available to I18N
modules, to PAM modules or (add dynamic framework here).

A good start would basic string handling, file I/O and memory

Beside including the necessary code, including the symbols becomes
necessary too. A static application doesn't have the normal symbol
tables, so something similiar to linker sets in the kernel would
be necessary.