lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r2059 - in nss-pam-ldapd-0.7: . nslcd

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

nss-pam-ldapd commit: r2059 - in nss-pam-ldapd-0.7: . nslcd



Author: arthur
Date: Sun Dec  8 18:18:05 2013
New Revision: 2059
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=2059&view=revision

Log:
extra sanity check to ensure not too many file descriptors are open (r1935 from 
0.8, a9aea20 from 0.9)

Modified:
   nss-pam-ldapd-0.7/   (props changed)
   nss-pam-ldapd-0.7/nslcd/nslcd.c

Modified: nss-pam-ldapd-0.7/nslcd/nslcd.c
==============================================================================
--- nss-pam-ldapd-0.7/nslcd/nslcd.c     Sun Dec  8 17:01:29 2013        (r2058)
+++ nss-pam-ldapd-0.7/nslcd/nslcd.c     Sun Dec  8 18:18:05 2013        (r2059)
@@ -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
@@ -106,7 +106,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");
 }
@@ -281,6 +281,11 @@
     log_log(LOG_ERR,"cannot create socket: %s",strerror(errno));
     exit(EXIT_FAILURE);
   }
+  if (sock>=FD_SETSIZE)
+  {
+    log_log(LOG_ERR,"socket file descriptor number too high (%d)",sock);
+    exit(EXIT_FAILURE);
+  }
   /* remove existing named socket */
   if (unlink(NSLCD_SOCKET)<0)
   {
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/