smbd: Ensure we grant owner sid in check_parent_access_fsp()
[samba.git] / source3 / winbindd / winbindd_getsidaliases.c
index de323a192514274a8c0b700d75f352cf320562a4..bf8fcddf5657e6b599cc5af98d4c122c1f1483e0 100644 (file)
@@ -37,7 +37,7 @@ struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
        struct tevent_req *req, *subreq;
        struct winbindd_getsidaliases_state *state;
        struct winbindd_domain *domain;
-       uint32_t num_sids;
+       uint32_t num_sids, i;
        struct dom_sid *sids;
 
        req = tevent_req_create(mem_ctx, &state,
@@ -87,9 +87,12 @@ struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
                 cli->client_name,
                 (unsigned int)cli->pid,
                 request->data.sid);
-       for (i = 0; i < num_sids; i++) {
-               struct dom_sid_buf sidstr;
-               D_NOTICE("%u: %s\n", i, dom_sid_str_buf(&sids[i], &sidstr));
+       if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) {
+               for (i = 0; i < num_sids; i++) {
+                       struct dom_sid_buf sidstr;
+                       D_NOTICE("%"PRIu32": %s\n",
+                                i, dom_sid_str_buf(&sids[i], &sidstr));
+               }
        }
 
        subreq = wb_lookupuseraliases_send(state, ev, domain, num_sids, sids);
@@ -134,7 +137,7 @@ NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
        sidlist = talloc_strdup(response, "");
 
        D_NOTICE("Winbind external command GETSIDALIASES end.\n"
-                "Received %u alias(es).\n",
+                "Received %"PRIu32" alias(es).\n",
                 state->num_aliases);
        for (i=0; i<state->num_aliases; i++) {
                struct dom_sid sid;
@@ -143,7 +146,7 @@ NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
 
                talloc_asprintf_addbuf(
                        &sidlist, "%s\n", dom_sid_str_buf(&sid, &tmp));
-               D_NOTICE("%u: %s\n", i, dom_sid_str_buf(&sid, &tmp));
+               D_NOTICE("%"PRIu32": %s\n", i, dom_sid_str_buf(&sid, &tmp));
        }
 
        if (sidlist == NULL) {