summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-11 14:58:41 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-11 18:18:30 +0200
commitcf4832d01069c7c91744ace97b6566c24b5ab7bc (patch)
treed4e123cfef3a6ab8ac4cccaa370a1cb4b52cb2f7
parent7a795ffeb42253b46a05771188d1b5f2961b990f (diff)
downloadsamba-cf4832d01069c7c91744ace97b6566c24b5ab7bc.tar.gz
samba-cf4832d01069c7c91744ace97b6566c24b5ab7bc.tar.bz2
samba-cf4832d01069c7c91744ace97b6566c24b5ab7bc.zip
s3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()
metze
-rw-r--r--source3/winbindd/winbindd_cm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index a14fe13f74..2f78d7ae8f 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1442,6 +1442,8 @@ static void store_current_dc_in_gencache(const char *domain_name,
struct cli_state *cli)
{
char addr[INET6_ADDRSTRLEN];
+ const struct sockaddr *sa;
+ socklen_t sa_len;
char *key = NULL;
char *value = NULL;
@@ -1449,7 +1451,11 @@ static void store_current_dc_in_gencache(const char *domain_name,
return;
}
- get_peer_addr(cli->fd, addr, sizeof(addr));
+ sa = (const struct sockaddr *)(void *)&cli->dest_ss;
+ sa_len = sizeof(cli->dest_ss);
+
+ print_sockaddr_len(addr, sizeof(addr),
+ sa, sa_len);
key = current_dc_key(talloc_tos(), domain_name);
if (key == NULL) {