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 2501974..33b8d60 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 */