1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 19:31:14 CEST 2011 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2011-07-11 15:12:40 +02:00
parent cf4832d010
commit 7c10b5e033

View File

@ -2742,13 +2742,19 @@ void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
for (domain = domain_list(); domain != NULL; domain = domain->next) {
char sockaddr[INET6_ADDRSTRLEN];
const struct sockaddr *sa;
socklen_t sa_len;
if (!cli_state_is_connected(domain->conn.cli)) {
continue;
}
client_socket_addr(domain->conn.cli->fd, sockaddr,
sizeof(sockaddr));
sa = (const struct sockaddr *)(void *)&domain->conn.cli->src_ss;
sa_len = sizeof(domain->conn.cli->src_ss);
print_sockaddr_len(sockaddr, sizeof(sockaddr),
sa, sa_len);
if (strequal(sockaddr, addr)) {
cli_state_disconnect(domain->conn.cli);
}