>From 24706e6b5cd581c37de69be60268f83e911e29c9 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sat, 13 Jul 2013 15:25:47 +0200 Subject: [PATCH 01/19] Fix formating of variables with type: long --- src/krb5_plugin/sssd_krb5_locator_plugin.c | 2 +- src/providers/krb5/krb5_child.c | 2 +- src/providers/krb5/krb5_common.c | 2 +- src/providers/ldap/ldap_auth.c | 7 ++++--- src/providers/ldap/ldap_common.c | 5 +++-- src/providers/ldap/sdap_access.c | 7 ++++--- src/util/util.h | 4 ++-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c index 402fd03e7e45644c65581c7c6f14fe8d7bf2e894..725687ddcf559e251ee54d1005f862bd6d0af4f8 100644 --- a/src/krb5_plugin/sssd_krb5_locator_plugin.c +++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c @@ -171,7 +171,7 @@ static int get_krb5info(const char *realm, struct sssd_ctx *ctx, } if (port < 0 || port > 65535) { - PLUGIN_DEBUG(("Illegal port number [%d], assuming default.\n", + PLUGIN_DEBUG(("Illegal port number [%ld], assuming default.\n", port)); port = 0; } diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 4f56736de152d1443add8b69db261faf3b75529f..8738be163157a355009228cb410303e87868bc7b 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -127,7 +127,7 @@ static void sss_krb5_expire_callback_func(krb5_context context, void *data, DEBUG(1, ("Time to expire out of range.\n")); return; } - DEBUG(SSSDBG_TRACE_INTERNAL, ("exp_time: [%d]\n", exp_time)); + DEBUG(SSSDBG_TRACE_INTERNAL, ("exp_time: [%ld]\n", exp_time)); blob = talloc_array(kr->pd, uint32_t, 2); if (blob == NULL) { diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c index dedb734fc397d3df3eb7717b19c56051fb2243bb..80eaeb56fac7a81446c04c58d63d47914de739d0 100644 --- a/src/providers/krb5/krb5_common.c +++ b/src/providers/krb5/krb5_common.c @@ -653,7 +653,7 @@ static errno_t _krb5_servers_init(struct be_ctx *ctx, } if (port < 1 || port > 65535) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Illegal port number [%d].\n", port)); + DEBUG(SSSDBG_CRIT_FAILURE, ("Illegal port number [%ld].\n", port)); ret = EINVAL; goto done; } diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c index e5b6365816af6bcf42554da7f6491b98241c5c45..dcaea75c0b7833b8a1eb00232ab92ea09f7a7f00 100644 --- a/src/providers/ldap/ldap_auth.c +++ b/src/providers/ldap/ldap_auth.c @@ -115,9 +115,10 @@ static errno_t check_pwexpire_kerberos(const char *expire_date, time_t now, tzset(); expire_time -= timezone; - DEBUG(9, ("Time info: tzname[0] [%s] tzname[1] [%s] timezone [%d] " - "daylight [%d] now [%d] expire_time [%d].\n", tzname[0], - tzname[1], timezone, daylight, now, expire_time)); + DEBUG(SSSDBG_TRACE_ALL, + ("Time info: tzname[0] [%s] tzname[1] [%s] timezone [%ld] " + "daylight [%d] now [%d] expire_time [%d].\n", tzname[0], + tzname[1], timezone, daylight, now, expire_time)); if (difftime(now, expire_time) > 0.0) { DEBUG(4, ("Kerberos password expired.\n")); diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index f7ad71182a4f46a20386e70ffda129347c5e3d87..0df5afe8eab3f68f56dd47b1c01f2692b612c160 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -1578,8 +1578,9 @@ errno_t string_to_shadowpw_days(const char *s, long *d) } if (l < -1) { - DEBUG(1, ("Input string contains not allowed negative value [%d].\n", - l)); + DEBUG(SSSDBG_CRIT_FAILURE, + ("Input string contains not allowed negative value [%ld].\n", + l)); return EINVAL; } diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c index 53df7b0eeb3bb2bdbede6c126fb004658dea2656..b381fc40570fb1fabe88255a6543c06453a7d9ce 100644 --- a/src/providers/ldap/sdap_access.c +++ b/src/providers/ldap/sdap_access.c @@ -433,9 +433,10 @@ static bool nds_check_expired(const char *exp_time_str) tzset(); expire_time -= timezone; now = time(NULL); - DEBUG(9, ("Time info: tzname[0] [%s] tzname[1] [%s] timezone [%d] " - "daylight [%d] now [%d] expire_time [%d].\n", tzname[0], - tzname[1], timezone, daylight, now, expire_time)); + DEBUG(SSSDBG_TRACE_ALL, + ("Time info: tzname[0] [%s] tzname[1] [%s] timezone [%ld] " + "daylight [%d] now [%d] expire_time [%d].\n", tzname[0], + tzname[1], timezone, daylight, now, expire_time)); if (difftime(now, expire_time) > 0.0) { DEBUG(4, ("NDS account expired.\n")); diff --git a/src/util/util.h b/src/util/util.h index c2c31f5d50e86315a3e751daf49cf594550bc7c6..67f60a5862b2d6c77b0e26b100a8e66f5ae9032f 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -128,7 +128,7 @@ errno_t set_debug_file_from_fd(const int fd); memcpy(__debug_macro_datetime, ctime(&__debug_macro_tv.tv_sec), 19); \ __debug_macro_datetime[19] = '\0'; \ if (debug_microseconds) { \ - debug_fn("(%s:%.6d %d) [%s] [%s] (%#.4x): ", \ + debug_fn("(%s:%.6ld %d) [%s] [%s] (%#.4x): ", \ __debug_macro_datetime, __debug_macro_tv.tv_usec, \ __debug_macro_year, debug_prg_name, \ __FUNCTION__, __debug_macro_newlevel); \ @@ -169,7 +169,7 @@ errno_t set_debug_file_from_fd(const int fd); memcpy(__debug_macro_datetime, ctime(&__debug_macro_tv.tv_sec), 19); \ __debug_macro_datetime[19] = '\0'; \ if (debug_microseconds) { \ - debug_fn("(%s:%.6d %d) [%s] [%s] (%#.4x): %s\n", \ + debug_fn("(%s:%.6ld %d) [%s] [%s] (%#.4x): %s\n", \ __debug_macro_datetime, __debug_macro_tv.tv_usec, \ __debug_macro_year, debug_prg_name, \ function, __debug_macro_newlevel, message); \ -- 1.8.3.1