[Nix-dev] Re: Inspecting getenv(3) calls

Peter Simons simons at cryp.to
Wed Aug 12 21:46:24 CEST 2009


Hi Ludovic,

 > static void
 > load_glibc (void)
 > {
 >   glibc = dlopen (LIBC_SO, RTLD_LAZY);
 >   glibc_getenv = dlsym (glibc, "getenv");
 > }

I reckon you might be pleased to discover dlsym(RTLD_NEXT, "getenv").

Take care,
Peter




More information about the nix-dev mailing list