1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

Fix a segv in winbindd caused by trying to free an fstring. Make a copy of the machine_password and machine_account strings in all conditional paths so that SAFE_FREE() will always be valid.

This commit is contained in:
Gerald (Jerry) Carter 2007-12-17 17:33:48 -06:00 committed by Michael Adam
parent fb04894949
commit 10a8cf19d6

View File

@ -1759,11 +1759,15 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
domain_name = domain->name;
goto schannel;
} else {
machine_password = conn_pwd;
machine_account = conn->cli->user_name;
machine_password = SMB_STRDUP(conn_pwd);
machine_account = SMB_STRDUP(conn->cli->user_name);
domain_name = conn->cli->domain;
}
if (!machine_password || !machine_account) {
result = NT_STATUS_NO_MEMORY;
goto done;
}
/* We have an authenticated connection. Use a NTLMSSP SPNEGO
authenticated SAMR pipe with sign & seal. */