>>>>> "Philipp" == Philipp Thomas <[EMAIL PROTECTED]> writes:
Philipp> 
Philipp> * Rob Ristroph ([EMAIL PROTECTED]) [20030702 20:21]:
>> Perhaps in a future version of my floppy I might change mc to not
>> call gethostbyname() if it can't find that library; if so I will
>> submit a patch.
Philipp> 
Philipp> When any of the resolving functions like gethostbyname from
Philipp> glibc are called, glibc in turn will call the necessary
Philipp> libnss modules, based on what's configured in
Philipp> /etc/nsswitch.conf. So mc *can't* detect whether or not the
Philipp> libnss modules are present.
Philipp> 
Philipp> Compiling a statically linked mc is also out of the question
Philipp> because the libnss* modules are always loaded dynamically,
Philipp> making the program only semi-static (rpm for instance has
Philipp> this problem). So on an ELF system that uses glibc 2.X, you
Philipp> can't call *any* of the resolving functions if you want to
Philipp> have a true statically linked program. Work is underway for
Philipp> future versions of glibc to make the linker issue errors in
Philipp> case this is tried.
Philipp> 
Philipp> So your only choice would be to either compile your own mc
Philipp> with all getXbyY calls removed or put only libnss_files.so
Philipp> together with a suitable /etc/nsswitch.conf on your floppy.
Philipp> 
Philipp> Philipp

This explanation clears up a lot for me.  I had presumed it was mc
that was doing the manual loading of the file -- I had run strace and
seen the dlopen("/lib/libnss_<something>.so") call.  

I will most likely continue to use the official mc, but squeeze the
libnss stuff on the floppy somehow.

Thanks,

--Rob

_______________________________________________
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to