]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Wrapped dlerror() in the same way as the other dlxxx() calls.
authorJeremy Allison <jra@samba.org>
Fri, 6 Jul 2001 18:45:59 +0000 (18:45 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 6 Jul 2001 18:45:59 +0000 (18:45 +0000)
Jeremy.

source/lib/system.c
source/passdb/passdb.c
source/smbd/vfs.c

index 0799a855e81be5fbd2bc1460f6810c310892bfa6..185c1daa82d5659595ee4ce2e8594e6dc4260033 100644 (file)
@@ -977,3 +977,12 @@ int sys_dlclose (void *handle)
        return 0;
 #endif
 }
+
+const char *sys_dlerror(void)
+{
+#ifdef HAVE_LIBDL
+       return dlerror();
+#else
+       return NULL;
+#endif
+}
index 3bb49091e634daf24d258c5e1e032e282ff0e980..640be5b1082630be5ee177147c50fac3315db202 100644 (file)
@@ -63,7 +63,7 @@ BOOL initialize_password_db(BOOL reload)
                if ((pdb_handle=sys_dlopen (modulename, RTLD_LAZY)) == NULL)
                {
                        DEBUG(0,("initialize_password_db: ERROR - Unable to open passdb module \"%s\"!\n%s\n",
-                               modulename, dlerror()));
+                               modulename, sys_dlerror()));
                }
                else
                        DEBUG(1,("initialize_password_db: passdb module \"%s\" loaded successfully\n", modulename));
@@ -76,7 +76,7 @@ BOOL initialize_password_db(BOOL reload)
                if ((pdb_handle=sys_dlopen ("libpdbfile.so", RTLD_LAZY)) == NULL)
                {
                        DEBUG(0,("initialize_password_db: ERROR - Unable to open \"libpdbfile.so\" passdb module!  No user authentication possible!\n%s\n",
-                               dlerror()));
+                               sys_dlerror()));
                        return False;
                }
                else
index 71ebf9b506b99c1b3ff84196e3de756f78d4d878..50361564a5e173678877dd1e201a57078ddd95fc 100644 (file)
@@ -117,7 +117,7 @@ static BOOL vfs_init_custom(connection_struct *conn)
        /* Open object file */
        if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), 
                                          RTLD_NOW | RTLD_GLOBAL)) == NULL) {
-               DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), dlerror()));
+               DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), sys_dlerror()));
                return False;
        }