autofs-5.0.6 - fix dlopen() error handling in sss module From: Ian Kent 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(-) diff --git a/CHANGELOG b/CHANGELOG index adb46ab..045a107 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -42,6 +42,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 ----------------------- diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c index 549edc2..9e7dc71 100644 --- a/modules/lookup_sss.c +++ b/modules/lookup_sss.c @@ -94,8 +94,7 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co 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; }