mirror of
https://github.com/samba-team/samba.git
synced 2025-08-24 21:49:29 +03:00
winbind: avoid using fstrcpy(dcname,...) in _dual_init_connection
domain->dcname was converted from fstring to char * by commit
14bae61ba3
.
Luckily this was only ever called with an empty string in
state->request->data.init_conn.dcname.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13294
Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
@ -781,7 +781,12 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
|
||||
[sizeof(state->request->data.init_conn.dcname)-1]='\0';
|
||||
|
||||
if (strlen(state->request->data.init_conn.dcname) > 0) {
|
||||
fstrcpy(domain->dcname, state->request->data.init_conn.dcname);
|
||||
TALLOC_FREE(domain->dcname);
|
||||
domain->dcname = talloc_strdup(domain,
|
||||
state->request->data.init_conn.dcname);
|
||||
if (domain->dcname == NULL) {
|
||||
return WINBINDD_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
init_dc_connection(domain, false);
|
||||
|
Reference in New Issue
Block a user