mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Use sid_to_string directly
It seems a bit pointless to do a fstrcpy(dst, sid_string_static(src)) (This used to be commit c221c246b10e2dbbd54a9af2dc45de2eae237380)
This commit is contained in:
parent
7b01537679
commit
d899b8c56a
@ -608,7 +608,7 @@ void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_
|
||||
if (_sidtostring) {
|
||||
_sidtostring(username_str,&qt->sid,_numeric);
|
||||
} else {
|
||||
fstrcpy(username_str,sid_string_static(&qt->sid));
|
||||
sid_to_string(username_str, &qt->sid);
|
||||
}
|
||||
|
||||
if (_verbose) {
|
||||
|
@ -75,7 +75,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
|
||||
ZERO_STRUCT(request);
|
||||
ZERO_STRUCT(response);
|
||||
|
||||
fstrcpy(request.data.sid, sid_string_static(sid));
|
||||
sid_to_string(request.data.sid, sid);
|
||||
|
||||
/* Make request */
|
||||
|
||||
@ -134,7 +134,7 @@ bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
|
||||
ZERO_STRUCT(request);
|
||||
ZERO_STRUCT(response);
|
||||
|
||||
fstrcpy(request.data.sid, sid_string_static(domain_sid));
|
||||
sid_to_string(request.data.sid, domain_sid);
|
||||
|
||||
len = 0;
|
||||
buflen = 0;
|
||||
|
@ -175,7 +175,7 @@ static void lookupsid_recv(TALLOC_CTX *mem_ctx, bool success,
|
||||
|
||||
ZERO_STRUCT(request);
|
||||
request.cmd = WINBINDD_LOOKUPSID;
|
||||
fstrcpy(request.data.sid, sid_string_static(&s->sid));
|
||||
sid_to_string(request.data.sid, &s->sid);
|
||||
|
||||
do_async_domain(mem_ctx, root_domain, &request, lookupsid_recv2,
|
||||
(void *)cont, s);
|
||||
@ -209,7 +209,7 @@ void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
|
||||
|
||||
ZERO_STRUCT(request);
|
||||
request.cmd = WINBINDD_LOOKUPSID;
|
||||
fstrcpy(request.data.sid, sid_string_static(sid));
|
||||
sid_to_string(request.data.sid, sid);
|
||||
|
||||
if ( (s = TALLOC_ZERO_P(mem_ctx, struct lookupsid_state)) == NULL ) {
|
||||
DEBUG(0, ("winbindd_lookupsid_async: talloc failed\n"));
|
||||
@ -795,7 +795,7 @@ void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
|
||||
|
||||
ZERO_STRUCT(request);
|
||||
request.cmd = WINBINDD_GETUSERDOMGROUPS;
|
||||
fstrcpy(request.data.sid, sid_string_static(user_sid));
|
||||
sid_to_string(request.data.sid, user_sid);
|
||||
|
||||
do_async_domain(mem_ctx, domain, &request, gettoken_recvdomgroups,
|
||||
NULL, state);
|
||||
|
@ -466,8 +466,7 @@ void winbindd_domain_info(struct winbindd_cli_state *state)
|
||||
domain->name);
|
||||
fstrcpy(state->response.data.domain_info.alt_name,
|
||||
domain->alt_name);
|
||||
fstrcpy(state->response.data.domain_info.sid,
|
||||
sid_string_static(&domain->sid));
|
||||
sid_to_string(state->response.data.domain_info.sid, &domain->sid);
|
||||
|
||||
state->response.data.domain_info.native_mode =
|
||||
domain->native_mode;
|
||||
@ -499,8 +498,7 @@ static void domain_info_init_recv(void *private_data, bool success)
|
||||
domain->name);
|
||||
fstrcpy(state->response.data.domain_info.alt_name,
|
||||
domain->alt_name);
|
||||
fstrcpy(state->response.data.domain_info.sid,
|
||||
sid_string_static(&domain->sid));
|
||||
sid_to_string(state->response.data.domain_info.sid, &domain->sid);
|
||||
|
||||
state->response.data.domain_info.native_mode =
|
||||
domain->native_mode;
|
||||
|
@ -668,8 +668,7 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
|
||||
|
||||
fstrcpy(state->response.data.domain_info.name, domain->name);
|
||||
fstrcpy(state->response.data.domain_info.alt_name, domain->alt_name);
|
||||
fstrcpy(state->response.data.domain_info.sid,
|
||||
sid_string_static(&domain->sid));
|
||||
sid_to_string(state->response.data.domain_info.sid, &domain->sid);
|
||||
|
||||
state->response.data.domain_info.native_mode
|
||||
= domain->native_mode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user