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

PR body:
"""
The cache-req debug string representation uses a wrong format
specifier for by-ID requests.
%d should be replaced with  %"SPRIgid".

Resolves: https://pagure.io/SSSD/sssd/issue/3570
"""

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 c2bdfaea56e6823fc88705128bce2ee66235f636 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  %"SPRIgid".

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..160aa47f2 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:%"SPRIgid"@%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..7a1d48370 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:%"SPRIgid"@%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