lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1925 - nss-pam-ldapd/nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1925 - nss-pam-ldapd/nslcd



Author: arthur
Date: Fri Jan 18 18:40:25 2013
New Revision: 1925
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1925&view=revision

Log:
make checking dlsym() result a little safer

Modified:
   nss-pam-ldapd/nslcd/nslcd.c

Modified: nss-pam-ldapd/nslcd/nslcd.c
==============================================================================
--- nss-pam-ldapd/nslcd/nslcd.c Fri Jan 18 15:34:12 2013        (r1924)
+++ nss-pam-ldapd/nslcd/nslcd.c Fri Jan 18 18:40:25 2013        (r1925)
@@ -2,7 +2,7 @@
    nslcd.c - ldap local connection daemon
 
    Copyright (C) 2006 West Consulting
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong
+   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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
@@ -114,7 +114,7 @@
 {
   fprintf(fp, "%s\n", PACKAGE_STRING);
   fprintf(fp, "Written by Luke Howard and Arthur de Jong.\n\n");
-  fprintf(fp, "Copyright (C) 1997-2012 Luke Howard, Arthur de Jong and West 
Consulting\n"
+  fprintf(fp, "Copyright (C) 1997-2013 Luke Howard, Arthur de Jong and West 
Consulting\n"
               "This is free software; see the source for copying conditions.  
There is NO\n"
               "warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.\n");
 }
@@ -651,7 +651,7 @@
   /* try to look up the flag */
   enable_flag = (int *)dlsym(handle, "_nss_ldap_enablelookups");
   error = dlerror();
-  if (error != NULL)
+  if ((enable_flag == NULL) || (error != NULL))
   {
     log_log(LOG_WARNING, "Warning: %s (probably older NSS module loaded)",
             error);
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/