From 44aa7b335f36d5447f44ddc50a2c33ca2f03380a Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sun, 4 Aug 1996 21:59:06 +0000 Subject: [PATCH] AFSLIBPATH can be set to point to afslib.so git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@622 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/kafs/afssys.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/kafs/afssys.c b/lib/kafs/afssys.c index 51d421a21..4a1a9fb43 100644 --- a/lib/kafs/afssys.c +++ b/lib/kafs/afssys.c @@ -4,6 +4,7 @@ RCSID("$Id$"); #include +#include #include #include #include @@ -140,7 +141,13 @@ int aix_setup(void) Setpag = aix_setpag; #else void *ptr; - ptr = dlopen(LIBDIR "/afslib.so", 0); + char path[MaxPathLen], *p; + if((p = getenv("AFSLIBPATH")) != NULL) + strcpy(path, p); + else + sprintf(path, "%s/afslib.so", LIBDIR); + + ptr = dlopen(path, 0); if(ptr){ Setpag = (int (*)(void))dlsym(ptr, "aix_setpag"); Pioctl = (int (*)(char*, int, void*, int))dlsym(ptr, "aix_pioctl");