lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.4-15-gfa6affc

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

nss-pam-ldapd branch master updated. 0.9.4-15-gfa6affc



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  fa6affc66e7829b56d728bb229e6c8fa628bde18 (commit)
      from  246aba5ef80d8385053be9205fe8984172a9fc08 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/nss-pam-ldapd/commit/?id=fa6affc66e7829b56d728bb229e6c8fa628bde18

commit fa6affc66e7829b56d728bb229e6c8fa628bde18
Author: Patrick McLean <chutzpah@gentoo.org>
Date:   Wed Mar 11 14:00:59 2015 -0700

    Fix formatting of size_t values
    
    In several places the code used a %d format to print a size_t variable.
    On amd64 at least size_t is an unsigned long, so use %lu instead.
    
    An alternative would be to use %ud for size_t and %zd fo ssize_t but not
    all platforms seem to support that formatter.

diff --git a/common/tio.c b/common/tio.c
index e00c8c8..8095dfb 100644
--- a/common/tio.c
+++ b/common/tio.c
@@ -478,8 +478,8 @@ int tio_close(TFILE *fp)
   retv = tio_flush(fp);
 #ifdef DEBUG_TIO_STATS
   /* dump statistics to stderr */
-  fprintf(stderr, "DEBUG_TIO_STATS READ=%d WRITTEN=%d\n", fp->bytesread,
-          fp->byteswritten);
+  fprintf(stderr, "DEBUG_TIO_STATS READ=%lu WRITTEN=%lu\n",
+          (unsigned long)fp->bytesread, (unsigned long)fp->byteswritten);
 #endif /* DEBUG_TIO_STATS */
   /* close file descriptor */
   if (close(fp->fd))
diff --git a/nslcd/attmap.c b/nslcd/attmap.c
index d024a59..5aad41f 100644
--- a/nslcd/attmap.c
+++ b/nslcd/attmap.c
@@ -276,8 +276,8 @@ const char *attmap_get_value(MYLDAP_ENTRY *entry, const 
char *attr,
       return NULL;
     if (strlen(values[0]) >= buflen)
     {
-      log_log(LOG_ERR, "attmap_get_value(): buffer too small (%d required)",
-              strlen(values[0]));
+      log_log(LOG_ERR, "attmap_get_value(): buffer too small (%lu required)",
+              (unsigned long) strlen(values[0]));
       return NULL;
     }
     strncpy(buffer, values[0], buflen);
diff --git a/nslcd/cfg.c b/nslcd/cfg.c
index 4928244..cec1b0c 100644
--- a/nslcd/cfg.c
+++ b/nslcd/cfg.c
@@ -457,8 +457,8 @@ static void add_uris_from_dns(const char *filename, int lnr,
       hostlist[strlen(hostlist) - 4] = '\0';
       if (mysnprintf(buf, sizeof(buf), "ldaps://%s", hostlist))
       {
-        log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%d 
required)",
-                strlen(hostlist) + 8);
+        log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%lu 
required)",
+                (unsigned long) strlen(hostlist) + 8);
         exit(EXIT_FAILURE);
       }
     }
@@ -469,8 +469,8 @@ static void add_uris_from_dns(const char *filename, int lnr,
         hostlist[strlen(hostlist) - 4] = '\0';
       if (mysnprintf(buf, sizeof(buf), "ldap://%s";, hostlist))
       {
-        log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%d 
required)",
-                strlen(hostlist) + 7);
+        log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%lu 
required)",
+                (unsigned long) strlen(hostlist) + 7);
         exit(EXIT_FAILURE);
       }
     }
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index d7adad3..8fe0bd9 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -1064,15 +1064,15 @@ int myldap_set_credentials(MYLDAP_SESSION *session, 
const char *dn,
   if (strlen(dn) >= sizeof(session->binddn))
   {
     log_log(LOG_ERR,
-            "myldap_set_credentials(): binddn buffer too small (%d required)",
-            strlen(dn));
+            "myldap_set_credentials(): binddn buffer too small (%lu required)",
+            (unsigned long) strlen(dn));
     return -1;
   }
   if (strlen(password) >= sizeof(session->bindpw))
   {
     log_log(LOG_ERR,
-            "myldap_set_credentials(): bindpw buffer too small (%d required)",
-            strlen(password));
+            "myldap_set_credentials(): bindpw buffer too small (%lu required)",
+            (unsigned long) strlen(password));
     return -1;
   }
   /* copy dn and password into session */
@@ -1729,8 +1729,8 @@ static char **myldap_get_ranged_values(MYLDAP_ENTRY 
*entry, const char *attr)
   /* build the attribute name to find */
   if (mysnprintf(attbuf, sizeof(attbuf), "%s;range=0-*", attr))
   {
-    log_log(LOG_ERR, "myldap_get_ranged_values(): attbuf buffer too small (%d 
required)",
-            strlen(attr) + 10);
+    log_log(LOG_ERR, "myldap_get_ranged_values(): attbuf buffer too small (%lu 
required)",
+            (unsigned long) strlen(attr) + 10);
     return NULL;
   }
   /* keep doing lookups untul we can't get any more results */

-----------------------------------------------------------------------

Summary of changes:
 common/tio.c   |    4 ++--
 nslcd/attmap.c |    4 ++--
 nslcd/cfg.c    |    8 ++++----
 nslcd/myldap.c |   12 ++++++------
 4 files changed, 14 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/