lists.arthurdejong.org
RSS feed

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

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

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



Author: arthur
Date: Sun Jun  5 10:54:12 2011
New Revision: 1468
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1468

Log:
simplify and correct find_rdn_value() to handle splitting attribute and value 
correctly

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

Modified: nss-pam-ldapd/nslcd/myldap.c
==============================================================================
--- nss-pam-ldapd/nslcd/myldap.c        Sun Jun  5 10:03:04 2011        (r1467)
+++ nss-pam-ldapd/nslcd/myldap.c        Sun Jun  5 10:54:12 2011        (r1468)
@@ -1446,16 +1446,15 @@
     /* check that RDN starts with attr */
     if (strncasecmp(exploded_rdn[i],attr,l)!=0)
       continue;
+    j=l;
     /* skip spaces */
-    for (j=l;isspace(exploded_rdn[i][j]);j++)
-      /* nothing here */;
+    while (isspace(exploded_rdn[i][j]) j++;
     /* ensure that we found an equals sign now */
     if (exploded_rdn[i][j]!='=')
       continue;
     j++;
     /* skip more spaces */
-    for (j++;isspace(exploded_rdn[i][j]);j++)
-      /* nothing here */;
+    while (isspace(exploded_rdn[i][j]) j++;
     /* ensure that we're not at the end of the string */
     if (exploded_rdn[i][j]=='\0')
       continue;
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits