tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PAM problem with netatalk package

On Monday 03 May 2010 16:23:31 Christos Zoulas wrote:
> | So is this happening because is being dynamically
> | loaded in libpam which (in afpd's case) is itself in a module that is
> | dynamically loaded into the afpd process
> | (/usr/pkg/libexec/netatalk/uams/
> |
> | If so how do you get that to work?
> Add -lpam as a dependency in all the rest of the pam modules? Don't do
> RTLD_NOW, but RTLD_LAZY? The first one should definitely work I think.

The first did work - adding the following patch got things working:

RCS file: /src/cvs/netbsd/src/lib/libpam/modules/,v
retrieving revision 1.6
diff -r1.6
> LIBDPLIBS+=   pam     ${.CURDIR}/../../libpam

But then thinking about things and attacking it from the netatalk end, this 
patch to netatalk also works:

--- include/atalk/util.h.orig   2010-05-03 09:28:16.000000000 +0000
+++ include/atalk/util.h
@@ -65,7 +65,7 @@ extern void mod_close    __P((void *));
  * OpenBSD currently does not use the second arg for dlopen(). For
  * future compatibility we define DL_LAZY */
 #ifdef __NetBSD__
-#define mod_open(a)      dlopen(a, RTLD_LAZY)
+#define mod_open(a)      dlopen(a, RTLD_LAZY|RTLD_GLOBAL)
 #elif defined(__OpenBSD__)
 #define mod_open(a)      dlopen(a, DL_LAZY)
 #else /* ! __NetBSD__ && ! __OpenBSD__ */

So I can fix the immediate problem with the netatalk patch but not sure if 
the pam change should be applied and pulled up to 5.* (and 4.*?) anyway.


Home | Main Index | Thread Index | Old Index