diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2015-03-21 18:54:32 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2015-03-22 20:08:52 +0100 |
commit | 0420232b7989c99ad7992f0f10a47f3f48a28fc7 (patch) | |
tree | 287f91e8f3ad9006da58a266545bf5c637c1b97c /nslcd | |
parent | 788475f94b27e3583e4bb35d8a7643fe9ff6719d (diff) |
Various small fixes when using --with-module-name
This updates the test framework to support --with-module-name, ensures
that exports.map is rebuilt when configure is re-ran, fixes parsing of
nsswitch.conf (to determine what to return for passwd lookups) and fixes
the check for _nss_ldap_version.
Diffstat (limited to 'nslcd')
-rw-r--r-- | nslcd/nslcd.c | 2 | ||||
-rw-r--r-- | nslcd/nsswitch.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c index 36b151d..f765b9c 100644 --- a/nslcd/nslcd.c +++ b/nslcd/nslcd.c @@ -612,7 +612,7 @@ static void disable_nss_ldap(void) /* clear any existing errors */ dlerror(); /* lookup the NSS version if possible */ - version_info = (char **)dlsym(handle, "_nss_ldap_version"); + version_info = (char **)dlsym(handle, "_nss_" MODULE_NAME "_version"); error = dlerror(); if ((version_info != NULL) && (error == NULL)) log_log(LOG_DEBUG, "NSS_LDAP %s %s", version_info[0], version_info[1]); diff --git a/nslcd/nsswitch.c b/nslcd/nsswitch.c index ff9d9d5..babf40e 100644 --- a/nslcd/nsswitch.c +++ b/nslcd/nsswitch.c @@ -1,7 +1,7 @@ /* nsswitch.c - functions for parsing /etc/nsswitch.conf - Copyright (C) 2011, 2012 Arthur de Jong + Copyright (C) 2011-2015 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -151,7 +151,7 @@ static int shadow_uses_ldap(void) if (services != NULL) { shadow_found = 1; - if (has_service(services, "ldap", NSSWITCH_FILE, lnr)) + if (has_service(services, MODULE_NAME, NSSWITCH_FILE, lnr)) { fclose(fp); return 1; @@ -160,7 +160,7 @@ static int shadow_uses_ldap(void) /* see if we have a passwd line */ services = find_db(linebuf, "passwd"); if (services != NULL) - passwd_has_ldap = has_service(services, "ldap", NSSWITCH_FILE, lnr); + passwd_has_ldap = has_service(services, MODULE_NAME, NSSWITCH_FILE, lnr); } fclose(fp); if (shadow_found) |