From 098bf64a03e5e7c054bd0e40717484d45c93d031 Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Tue, 14 Nov 2023 13:16:07 +0100 Subject: [PATCH] Don't provide 'uint64_t' as POPT_ARG_LONG. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sizes might not match on some platforms. Resolves: https://github.com/SSSD/sssd/issues/6790 Reviewed-by: Justin Stephenson Reviewed-by: Tomáš Halman --- src/p11_child/p11_child_common.c | 4 ++-- src/providers/ad/ad_gpo_child.c | 4 ++-- src/providers/ipa/selinux_child.c | 4 ++-- src/providers/krb5/krb5_child.c | 4 ++-- src/providers/proxy/proxy_child.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/p11_child/p11_child_common.c b/src/p11_child/p11_child_common.c index e49d1e20182..5eab9b063d4 100644 --- a/src/p11_child/p11_child_common.c +++ b/src/p11_child/p11_child_common.c @@ -164,7 +164,7 @@ int main(int argc, const char *argv[]) char *key_id = NULL; char *label = NULL; char *cert_b64 = NULL; - uint64_t chain_id = 0; + long chain_id = 0; bool wait_for_card = false; char *uri = NULL; @@ -325,7 +325,7 @@ int main(int argc, const char *argv[]) } sss_chain_id_set_format(DEBUG_CHAIN_ID_FMT_CID); - sss_chain_id_set(chain_id); + sss_chain_id_set((uint64_t)chain_id); DEBUG_INIT(debug_level, opt_logger); diff --git a/src/providers/ad/ad_gpo_child.c b/src/providers/ad/ad_gpo_child.c index 630a08c5b73..2f2807bec2d 100644 --- a/src/providers/ad/ad_gpo_child.c +++ b/src/providers/ad/ad_gpo_child.c @@ -659,7 +659,7 @@ main(int argc, const char *argv[]) poptContext pc; int dumpable = 1; int debug_fd = -1; - uint64_t chain_id; + long chain_id = 0; const char *opt_logger = NULL; errno_t ret; int sysvol_gpt_version = -1; @@ -718,7 +718,7 @@ main(int argc, const char *argv[]) } sss_chain_id_set_format(DEBUG_CHAIN_ID_FMT_RID); - sss_chain_id_set(chain_id); + sss_chain_id_set((uint64_t)chain_id); DEBUG_INIT(debug_level, opt_logger); diff --git a/src/providers/ipa/selinux_child.c b/src/providers/ipa/selinux_child.c index 8ca1bd1fcea..063bea44d21 100644 --- a/src/providers/ipa/selinux_child.c +++ b/src/providers/ipa/selinux_child.c @@ -220,7 +220,7 @@ int main(int argc, const char *argv[]) bool needs_update; const char *username; const char *opt_logger = NULL; - uint64_t chain_id; + long chain_id; struct poptOption long_options[] = { POPT_AUTOHELP @@ -269,7 +269,7 @@ int main(int argc, const char *argv[]) } sss_chain_id_set_format(DEBUG_CHAIN_ID_FMT_RID); - sss_chain_id_set(chain_id); + sss_chain_id_set((uint64_t)chain_id); DEBUG_INIT(debug_level, opt_logger); diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 710fd756763..704f6508224 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -4015,7 +4015,7 @@ int main(int argc, const char *argv[]) krb5_error_code kerr; uid_t fast_uid = 0; gid_t fast_gid = 0; - uint64_t chain_id = 0; + long chain_id = 0; struct cli_opts cli_opts = { 0 }; int sss_creds_password = 0; long dummy_long = 0; @@ -4111,7 +4111,7 @@ int main(int argc, const char *argv[]) } sss_chain_id_set_format(DEBUG_CHAIN_ID_FMT_RID); - sss_chain_id_set(chain_id); + sss_chain_id_set((uint64_t)chain_id); DEBUG_INIT(debug_level, opt_logger); diff --git a/src/providers/proxy/proxy_child.c b/src/providers/proxy/proxy_child.c index abcf74681e4..a86ac123ab7 100644 --- a/src/providers/proxy/proxy_child.c +++ b/src/providers/proxy/proxy_child.c @@ -538,7 +538,7 @@ int main(int argc, const char *argv[]) debug_log_file = talloc_asprintf(NULL, "proxy_child_%s", domain); if (!debug_log_file) return 2; - sss_chain_id_set(chain_id); + sss_chain_id_set((uint64_t)chain_id); DEBUG_INIT(debug_level, opt_logger);