]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Change '%u' to '%PRIu32' for uint32_t in wb_gettoken.c
authorPavel Filipenský <pfilipensky@samba.org>
Mon, 18 Jul 2022 13:28:10 +0000 (15:28 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 21 Jul 2022 13:47:31 +0000 (13:47 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/wb_gettoken.c

index dd8f0d37e71869f621ef29e312749f9489375adb..0c0f14fd1515f8f90f6b8fc90c05c6a8d7c12713 100644 (file)
@@ -127,7 +127,7 @@ static void wb_gettoken_gotgroups(struct tevent_req *subreq)
                return;
        }
 
-       D_DEBUG("Received %u group(s).\n", num_groups);
+       D_DEBUG("Received %"PRIu32" group(s).\n", num_groups);
        for (i = 0; i < num_groups; i++) {
                D_DEBUG("Adding SID %s.\n", dom_sid_str_buf(&groups[i], &buf));
                status = add_sid_to_array_unique(
@@ -153,7 +153,8 @@ static void wb_gettoken_gotgroups(struct tevent_req *subreq)
                return;
        }
 
-       D_DEBUG("Expand domain's aliases for %u SID(s).\n", state->num_sids);
+       D_DEBUG("Expand domain's aliases for %"PRIu32" SID(s).\n",
+               state->num_sids);
        subreq = wb_lookupuseraliases_send(state, state->ev, domain,
                                           state->num_sids, state->sids);
        if (tevent_req_nomem(subreq, req)) {
@@ -179,7 +180,7 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq)
                return;
        }
 
-       D_DEBUG("Got %u RID(s).\n", num_rids);
+       D_DEBUG("Got %"PRIu32" RID(s).\n", num_rids);
        status = wb_add_rids_to_sids(state, &state->num_sids, &state->sids,
                                     get_global_sam_sid(), num_rids, rids);
        if (tevent_req_nterror(req, status)) {
@@ -191,7 +192,8 @@ static void wb_gettoken_gotlocalgroups(struct tevent_req *subreq)
         * Now expand the builtin groups
         */
 
-       D_DEBUG("Expand the builtin groups for %u SID(s).\n", state->num_sids);
+       D_DEBUG("Expand the builtin groups for %"PRIu32" SID(s).\n",
+               state->num_sids);
        domain = find_domain_from_sid(&global_sid_Builtin);
        if (domain == NULL) {
                tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
@@ -221,7 +223,7 @@ static void wb_gettoken_gotbuiltins(struct tevent_req *subreq)
        if (tevent_req_nterror(req, status)) {
                return;
        }
-       D_DEBUG("Got %u RID(s).\n", num_rids);
+       D_DEBUG("Got %"PRIu32" RID(s).\n", num_rids);
        status = wb_add_rids_to_sids(state, &state->num_sids, &state->sids,
                                     &global_sid_Builtin, num_rids, rids);
        if (tevent_req_nterror(req, status)) {
@@ -242,10 +244,11 @@ NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                return status;
        }
        *num_sids = state->num_sids;
-       D_INFO("WB command gettoken end.\nReceived %u SID(s).\n", state->num_sids);
        for (i = 0; i < state->num_sids; i++) {
                struct dom_sid_buf sidbuf;
-               D_INFO("%u: %s\n", i, dom_sid_str_buf(&state->sids[i], &sidbuf));
+       D_INFO("WB command gettoken end.\nReceived %"PRIu32" SID(s).\n",
+              state->num_sids);
+               D_INFO("%"PRIu32": %s\n", i, dom_sid_str_buf(&state->sids[i], &sidbuf));
        }
 
        *sids = talloc_move(mem_ctx, &state->sids);
@@ -259,21 +262,23 @@ static NTSTATUS wb_add_rids_to_sids(TALLOC_CTX *mem_ctx,
                                    uint32_t num_rids, uint32_t *rids)
 {
        uint32_t i;
-       D_DEBUG("%u SID(s) will be uniquely added to the SID array.\n"
-               "Before the addition the array has %u SID(s).\n",
+
+       D_DEBUG("%"PRIu32" SID(s) will be uniquely added to the SID array.\n"
+               "Before the addition the array has %"PRIu32" SID(s).\n",
                num_rids, *pnum_sids);
+
        for (i = 0; i < num_rids; i++) {
                NTSTATUS status;
                struct dom_sid sid;
 
                sid_compose(&sid, domain_sid, rids[i]);
-
                status = add_sid_to_array_unique(
                        mem_ctx, &sid, psids, pnum_sids);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
                }
        }
-       D_DEBUG("After the addition the array has %u SID(s).\n", *pnum_sids);
+       D_DEBUG("After the addition the array has %"PRIu32" SID(s).\n",
+               *pnum_sids);
        return NT_STATUS_OK;
 }