summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-11 15:12:40 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-11 19:31:13 +0200
commit7c10b5e03379782841d0e58910c579647b75e39c (patch)
tree7c983f5416d30d044d91cfb2074bbf5a2244e9b1
parentcf4832d01069c7c91744ace97b6566c24b5ab7bc (diff)
downloadsamba-7c10b5e03379782841d0e58910c579647b75e39c.tar.gz
samba-7c10b5e03379782841d0e58910c579647b75e39c.tar.bz2
samba-7c10b5e03379782841d0e58910c579647b75e39c.zip
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
-rw-r--r--source3/winbindd/winbindd_cm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 2f78d7ae8f..9d3a855681 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -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);
}