>From 1013735e1c09c7c2a261e3cfac84f54d288fb999 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 17 Jul 2013 14:03:41 +0200 Subject: [PATCH 12/16] Fix formating of variables with type defined in stdint.h --- src/providers/ldap/sdap_access.c | 6 ++++-- src/providers/ldap/sdap_reinit.c | 6 ++++-- src/providers/proxy/proxy_child.c | 5 +++-- src/providers/proxy/proxy_init.c | 3 ++- src/responder/nss/nsssrv_services.c | 14 ++++++++------ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c index 9ea9077551b71d494947c7bfd7477ac8ddf227a2..b5b62814cb5db984d9e9151df0ea4a765c7a1330 100644 --- a/src/providers/ldap/sdap_access.c +++ b/src/providers/ldap/sdap_access.c @@ -32,6 +32,7 @@ #include #include "util/util.h" +#include "util/sss_format.h" #include "db/sysdb.h" #include "providers/ldap/ldap_common.h" #include "providers/ldap/sdap.h" @@ -338,8 +339,9 @@ static errno_t sdap_account_expired_ad(struct pam_data *pd, expiration_time = ldb_msg_find_attr_as_uint64(user_entry, SYSDB_AD_ACCOUNT_EXPIRES, 0); - DEBUG(9, ("Expiration time for user [%s] is [%lld].\n", - pd->user, expiration_time)); + DEBUG(SSSDBG_TRACE_ALL, + ("Expiration time for user [%s] is [%"PRIu64"].\n", + pd->user, expiration_time)); if (uac & UAC_ACCOUNTDISABLE) { diff --git a/src/providers/ldap/sdap_reinit.c b/src/providers/ldap/sdap_reinit.c index b273c1a66cca5e78ab3c281c684feab93f476471..2f4aa0c651a3261b173a60b16dcb7a795967cc3c 100644 --- a/src/providers/ldap/sdap_reinit.c +++ b/src/providers/ldap/sdap_reinit.c @@ -24,6 +24,7 @@ #include #include "util/util.h" +#include "util/sss_format.h" #include "providers/ldap/ldap_common.h" #include "db/sysdb.h" #include "db/sysdb_services.h" @@ -208,8 +209,9 @@ static void sdap_reinit_cleanup_done(struct tevent_req *subreq) if (tevent_req_is_error(subreq, &tstate, &err)) { ret = err; - DEBUG(SSSDBG_CRIT_FAILURE, ("Domain enumeration failed [%d]: %s\n", - err, strerror(err))); + DEBUG(SSSDBG_CRIT_FAILURE, + ("Domain enumeration failed [%"PRIu64"d]: %s\n", + err, strerror(err))); goto fail; } diff --git a/src/providers/proxy/proxy_child.c b/src/providers/proxy/proxy_child.c index efdf9120a8ec529283aa3f2c6cacd98d659a6ef7..5d34fc0800ca017f685e66931b89b5e895ac97b5 100644 --- a/src/providers/proxy/proxy_child.c +++ b/src/providers/proxy/proxy_child.c @@ -40,6 +40,7 @@ #include "popt.h" #include "util/util.h" +#include "util/sss_format.h" #include "confdb/confdb.h" #include "dbus/dbus.h" #include "sbus/sssd_dbus.h" @@ -410,8 +411,8 @@ int proxy_child_send_id(struct sbus_connection *conn, return ENOMEM; } - DEBUG(4, ("Sending ID to Proxy Backend: (%d,%ld)\n", - version, id)); + DEBUG(SSSDBG_FUNC_DATA, ("Sending ID to Proxy Backend: (%d,%"PRIu32")\n", + version, id)); ret = dbus_message_append_args(msg, DBUS_TYPE_UINT16, &version, diff --git a/src/providers/proxy/proxy_init.c b/src/providers/proxy/proxy_init.c index 2b154a0703c686c0c2e5074f20bf1690bc5242cb..ec2b193569baefd4cb2f617ed8e15bdcf547f736 100644 --- a/src/providers/proxy/proxy_init.c +++ b/src/providers/proxy/proxy_init.c @@ -22,6 +22,7 @@ along with this program. If not, see . */ +#include "util/sss_format.h" #include "providers/proxy/proxy.h" static int client_registration(DBusMessage *message, @@ -415,7 +416,7 @@ static int client_registration(DBusMessage *message, return EIO; } - DEBUG(4, ("Proxy client [%ld] connected\n", cli_id)); + DEBUG(SSSDBG_FUNC_DATA, ("Proxy client [%"PRIu32"] connected\n", cli_id)); /* Check the hash table */ key.type = HASH_KEY_ULONG; diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c index dccc2f40789ead31b8d76bf9a6c1f0e53334cfbb..27125ff92c99a6f5817e1e8e2c1b4deca2b3dc58 100644 --- a/src/responder/nss/nsssrv_services.c +++ b/src/responder/nss/nsssrv_services.c @@ -23,6 +23,7 @@ #include #include "util/util.h" +#include "util/sss_format.h" #include "responder/nss/nsssrv.h" #include "responder/nss/nsssrv_private.h" #include "responder/nss/nsssrv_services.h" @@ -225,7 +226,7 @@ getserv_send(TALLOC_CTX *mem_ctx, /* If negatively cached, return we didn't find it */ if (ret == EEXIST) { DEBUG(SSSDBG_TRACE_FUNC, - ("Service [%lu:%s] does not exist in [%s]! " + ("Service [%"PRIu16":%s] does not exist in [%s]! " "(negative cache)\n", port, SVC_PROTO_CASED ? SVC_PROTO_CASED : "", @@ -248,7 +249,7 @@ getserv_send(TALLOC_CTX *mem_ctx, /* Check the cache */ DEBUG(SSSDBG_TRACE_FUNC, - ("Checking cache for [%lu:%s@%s]\n", + ("Checking cache for [%"PRIu16":%s@%s]\n", port, SVC_PROTO_CASED ? SVC_PROTO_CASED : "", dom->name)); @@ -291,7 +292,8 @@ getserv_send(TALLOC_CTX *mem_ctx, * We'll log an error and continue. */ DEBUG(SSSDBG_MINOR_FAILURE, - ("Could not set negative cache for [%lu][%s]\n", + ("Could not set negative cache for " + "[%"PRIu16"][%s]\n", state->port, SVC_PROTO_CASED)); } } @@ -502,7 +504,7 @@ static void lookup_service_done(struct tevent_req *subreq) &state->res); } else { DEBUG(SSSDBG_TRACE_FUNC, - ("Re-checking cache for [%lu:%s@%s]\n", + ("Re-checking cache for [%"PRIu16":%s@%s]\n", state->port, SVC_PROTO_CASED ? SVC_PROTO_CASED : "", dom->name)); @@ -540,7 +542,7 @@ static void lookup_service_done(struct tevent_req *subreq) * We'll log an error and continue. */ DEBUG(SSSDBG_MINOR_FAILURE, - ("Could not set negative cache for [%lu][%s]\n", + ("Could not set negative cache for [%"PRIu16"][%s]\n", state->port, SVC_PROTO_CASED)); } } @@ -1146,7 +1148,7 @@ int nss_cmd_getservbyport(struct cli_ctx *cctx) dctx->protocol = service_protocol; DEBUG(SSSDBG_TRACE_FUNC, - ("Requesting info for service on port [%lu/%s]\n", + ("Requesting info for service on port [%"PRIu16"/%s]\n", port, service_protocol ? service_protocol : "")); /* All port lookups are multidomain searches */ -- 1.8.3.1