Re: dynamic linker problem

From: Kimura Fuyuki <fuyuki_at_nigredo.org>
Date: Sat, 14 Feb 2004 14:08:56 +0900
At Sat, 14 Feb 2004 04:05:25 +0100,
Arne Schwabe <arne_at_rfc2549.org> wrote:
> 
> Kimura Fuyuki <fuyuki_at_nigredo.org> writes:
> 
> > OK, I more clearly point out the problem; run the following test and
> > think that behavior is secure/modular/comfortable or not.
> >
> > BEGIN--cut here--cut here
> > #!/bin/sh
> >
> > cat <<'[EOF]' >crypt.c
> > /* Define this function since I want to do so! */
> > char *crypt_md5(const char *pw, const char *salt)
> > {
> > 	return "imbogus";
> > }
> > [EOF]
> >
> > cat <<'[EOF]' >dltest.c
> > #include <stdio.h>
> > #include <dlfcn.h>
> >
> > int main(void)
> > {
> > 	void *h;
> > 	char *(*crypt)(const char *, const char *);
> >
> > 	h = dlopen("/lib/libcrypt.so", 0);
> 
> At least on my system /lib/libcrypt.so does not even exist, if I
> change it to /lib/libcrypt.so.2 it works.

Ouch. I've pointed at the stale link.

But what I wanted to say is "why does crypt() call crypt_md5 in
crypt.so rather than libcrypt.so.2 ?". Is the current behavior normal?

-- fuyuki
Received on Fri Feb 13 2004 - 20:09:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:43 UTC