File PyPAM-0.5.0-dl.patch of Package python-pam

--- PAMmodule.c    2004-10-25 20:14:15.467254666 +0200
+++ PAMmodule.c    2004-10-25 18:09:16.000000000 +0200
@@ -125,8 +125,15 @@
     p->user = NULL;
     p->callback = NULL;
     
-    p->dlh1 = dlopen("libpam.so", RTLD_LAZY | RTLD_GLOBAL);
-    p->dlh2 = dlopen("libpam_misc.so", RTLD_LAZY | RTLD_GLOBAL);
+    if( !(p->dlh1 = dlopen("libpam.so.0", RTLD_LAZY | RTLD_GLOBAL)) ) {
+        PyErr_SetString(PyPAM_Error, dlerror());
+        return NULL;
+    }
+
+    if ( !(p->dlh2 = dlopen("libpam_misc.so.0", RTLD_LAZY | RTLD_GLOBAL)) ) {
+                PyErr_SetString(PyPAM_Error, dlerror());
+                return NULL;
+    }
 
     return (PyObject *) p;
 }
openSUSE Build Service is sponsored by