/* Ensure null termination */
request->data.sid[sizeof(request->data.sid)-1]='\0';
- DBG_NOTICE("[%s (%u)] getusersids %s\n",
- cli->client_name,
- (unsigned int)cli->pid,
- request->data.sid);
+ D_NOTICE("[%s (%u)] Winbind external command GETUSERSIDS start.\n"
+ "sid=%s\n",
+ cli->client_name,
+ (unsigned int)cli->pid,
+ request->data.sid);
if (!string_to_sid(&state->sid, request->data.sid)) {
- DEBUG(1, ("Could not get convert sid %s from string\n",
- request->data.sid));
+ D_WARNING("Returning NT_STATUS_INVALID_PARAMETER.\n"
+ "Could not get convert sid %s from string\n",
+ request->data.sid);
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
return tevent_req_post(req, ev);
}
&state->sids);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
+ D_WARNING("wb_gettoken_recv failed with %s.\n",
+ nt_errstr(status));
return;
}
tevent_req_done(req);
req, struct winbindd_getusersids_state);
struct dom_sid_buf sidbuf;
NTSTATUS status;
- int i;
+ uint32_t i;
char *result;
if (tevent_req_is_nterror(req, &status)) {
- DEBUG(5, ("Could not convert sid %s: %s\n",
+ D_WARNING("Could not convert sid %s: %s\n",
dom_sid_str_buf(&state->sid, &sidbuf),
- nt_errstr(status)));
+ nt_errstr(status));
return status;
}
return NT_STATUS_NO_MEMORY;
}
+ D_NOTICE("Winbind external command GETUSERSIDS end.\n"
+ "Got %u SID(s).\n", state->num_sids);
for (i=0; i<state->num_sids; i++) {
+ D_NOTICE("%u: %s\n", i, dom_sid_str_buf(&state->sids[i], &sidbuf));
talloc_asprintf_addbuf(
&result,
"%s\n",
dom_sid_str_buf(&state->sids[i], &sidbuf));
}
-
response->data.num_entries = state->num_sids;
response->extra_data.data = result;
response->length += talloc_get_size(result);