autofs-5.0.6 - fix dlopen() error handling in sss module
From: Ian Kent <ikent@redhat.com>
If dlopen(3) fails during initialization of the sss module the
error message is incorrect since dlerror(3) must be used, not
errno.
---
CHANGELOG | 1 +
modules/lookup_sss.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
--- autofs-5.0.6.orig/CHANGELOG
+++ autofs-5.0.6/CHANGELOG
@@ -38,6 +38,7 @@
- improve UDP RPC timeout handling.
- use strtok_r() in linux_version_code().
- fix sss wildcard match.
+- fix dlopen() error handling in sss module.
28/06/2011 autofs-5.0.6
-----------------------
--- autofs-5.0.6.orig/modules/lookup_sss.c
+++ autofs-5.0.6/modules/lookup_sss.c
@@ -94,8 +94,7 @@ int lookup_init(const char *mapfmt, int
dh = dlopen(dlbuf, RTLD_LAZY);
if (!dh) {
- estr = strerror_r(errno, buf, MAX_ERR_BUF);
- logerr(MODPREFIX "dlopen: %s", estr);
+ logerr(MODPREFIX "failed to open %s: %s", dlbuf, dlerror());
free(ctxt);
return 1;
}