lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1940 - nss-pam-ldapd-0.8/nss

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

nss-pam-ldapd commit: r1940 - nss-pam-ldapd-0.8/nss



Author: arthur
Date: Sun Apr 28 13:29:52 2013
New Revision: 1940
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1940&view=revision

Log:
fix the text representation of shadow information for nscd on Solaris

Modified:
   nss-pam-ldapd-0.8/nss/shadow.c

Modified: nss-pam-ldapd-0.8/nss/shadow.c
==============================================================================
--- nss-pam-ldapd-0.8/nss/shadow.c      Sun Apr 28 13:15:17 2013        (r1939)
+++ nss-pam-ldapd-0.8/nss/shadow.c      Sun Apr 28 13:29:52 2013        (r1940)
@@ -96,24 +96,24 @@
   /* snprintf writes a terminating \0 on Solaris */
   snprintf(buffer,buflen,"%s:%s:",result->sp_namp,result->sp_pwdp);
   if (result->sp_lstchg>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_lstchg);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_lstchg);
   strlcat(buffer,":",buflen);
   if (result->sp_min>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_min);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_min);
   strlcat(buffer,":",buflen);
   if (result->sp_max>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_max);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_max);
   strlcat(buffer,":",buflen);
   if (result->sp_warn>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_warn);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_warn);
   strlcat(buffer,":",buflen);
   if (result->sp_inact>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_inact);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_inact);
   strlcat(buffer,":",buflen);
   if (result->sp_expire>=0)
-    snprintf(buffer,buflen-strlen(buffer)-1,"%d:",result->sp_expire);
+    snprintf(buffer,buflen-strlen(buffer)-1,"%d",result->sp_expire);
   strlcat(buffer,":",buflen);
-  if (result->sp_flag>=0)
+  if (result->sp_flag>0)
     snprintf(buffer,buflen-strlen(buffer)-1,"%x",result->sp_flag);
   if (strlen(buffer)>=buflen-1)
     return NULL;
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/