From: Jeremy Allison Date: Fri, 6 Jul 2001 18:45:59 +0000 (+0000) Subject: Wrapped dlerror() in the same way as the other dlxxx() calls. X-Git-Tag: samba-2.2.5pre1~1779^2~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed5a1f70c6d155788b62e9e6e8c5d97a5ca0858d;p=thirdparty%2Fsamba.git Wrapped dlerror() in the same way as the other dlxxx() calls. Jeremy. --- diff --git a/source/lib/system.c b/source/lib/system.c index 0799a855e81..185c1daa82d 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -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 +} diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 3bb49091e63..640be5b1082 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -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 diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 71ebf9b506b..50361564a5e 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -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; }