mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
gensec_krb5: restore ipv6 support for kpasswd
We need to offer as much space we have in order to get the address out of tsocket_address_bsd_sockaddr(). This fixes a regression in commit43c808f2ff
. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14750 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit0388a8f33b
)
This commit is contained in:
parent
a6447a1dce
commit
c1662a8122
@ -149,8 +149,9 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security, bool
|
||||
struct samba_sockaddr addr;
|
||||
bool ok;
|
||||
|
||||
addr.sa_socklen = sizeof(addr.u);
|
||||
sockaddr_ret = tsocket_address_bsd_sockaddr(
|
||||
tlocal_addr, &addr.u.sa, sizeof(addr.u.sa));
|
||||
tlocal_addr, &addr.u.sa, addr.sa_socklen);
|
||||
if (sockaddr_ret < 0) {
|
||||
talloc_free(gensec_krb5_state);
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
@ -170,8 +171,9 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security, bool
|
||||
struct samba_sockaddr addr;
|
||||
bool ok;
|
||||
|
||||
addr.sa_socklen = sizeof(addr.u);
|
||||
sockaddr_ret = tsocket_address_bsd_sockaddr(
|
||||
tremote_addr, &addr.u.sa, sizeof(addr.u.sa));
|
||||
tremote_addr, &addr.u.sa, addr.sa_socklen);
|
||||
if (sockaddr_ret < 0) {
|
||||
talloc_free(gensec_krb5_state);
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user