URL: https://github.com/SSSD/sssd/pull/448
Author: amitkumar50
 Title: #448: common: Correction of cache_req debug string ID format
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/448/head:pr448
git checkout pr448
From 9d269123e53af313a538c31d467863d27615868b Mon Sep 17 00:00:00 2001
From: amitkuma <amitk...@redhat.com>
Date: Tue, 14 Nov 2017 13:59:12 +0530
Subject: [PATCH] common: Correction of cache_req debug string ID format

The cache-req debug string representation uses a wrong format
specifier for by-ID requests.
%d should be replaced with  %"SPRIid",%"SPRIuid",%"SPRIgid"
at appropriate places.

Resolves: https://pagure.io/SSSD/sssd/issue/3570
---
 src/responder/common/cache_req/plugins/cache_req_group_by_id.c  | 2 +-
 src/responder/common/cache_req/plugins/cache_req_object_by_id.c | 2 +-
 src/responder/common/cache_req/plugins/cache_req_user_by_id.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/responder/common/cache_req/plugins/cache_req_group_by_id.c b/src/responder/common/cache_req/plugins/cache_req_group_by_id.c
index 5ca64283a..dfb62fd23 100644
--- a/src/responder/common/cache_req/plugins/cache_req_group_by_id.c
+++ b/src/responder/common/cache_req/plugins/cache_req_group_by_id.c
@@ -31,7 +31,7 @@ cache_req_group_by_id_create_debug_name(TALLOC_CTX *mem_ctx,
                                         struct cache_req_data *data,
                                         struct sss_domain_info *domain)
 {
-    return talloc_asprintf(mem_ctx, "GID:%d@%s", data->id, domain->name);
+    return talloc_asprintf(mem_ctx, "GID:%"SPRIgid"@%s", data->id, domain->name);
 }
 
 static errno_t
diff --git a/src/responder/common/cache_req/plugins/cache_req_object_by_id.c b/src/responder/common/cache_req/plugins/cache_req_object_by_id.c
index 339bd4f5f..85cb907f4 100644
--- a/src/responder/common/cache_req/plugins/cache_req_object_by_id.c
+++ b/src/responder/common/cache_req/plugins/cache_req_object_by_id.c
@@ -31,7 +31,7 @@ cache_req_object_by_id_create_debug_name(TALLOC_CTX *mem_ctx,
                                          struct cache_req_data *data,
                                          struct sss_domain_info *domain)
 {
-    return talloc_asprintf(mem_ctx, "ID:%d@%s", data->id, domain->name);
+    return talloc_asprintf(mem_ctx, "ID:%"SPRIid"@%s", data->id, domain->name);
 }
 
 static errno_t
diff --git a/src/responder/common/cache_req/plugins/cache_req_user_by_id.c b/src/responder/common/cache_req/plugins/cache_req_user_by_id.c
index 913f9be5b..d04cc83d4 100644
--- a/src/responder/common/cache_req/plugins/cache_req_user_by_id.c
+++ b/src/responder/common/cache_req/plugins/cache_req_user_by_id.c
@@ -31,7 +31,7 @@ cache_req_user_by_id_create_debug_name(TALLOC_CTX *mem_ctx,
                                        struct cache_req_data *data,
                                        struct sss_domain_info *domain)
 {
-    return talloc_asprintf(mem_ctx, "UID:%d@%s", data->id, domain->name);
+    return talloc_asprintf(mem_ctx, "UID:%"SPRIuid"@%s", data->id, domain->name);
 }
 
 static errno_t
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to