summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-21 21:51:11 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-21 23:33:48 +0200
commit2b1fc7c0d30b6fbef3cb61775f37062fdc2c9656 (patch)
treebeccc76a4e9e33f8b50edf0b02094bbf402ce531
parentebe258dd4091c00cf2ca3d6648cf4d60cb682ee1 (diff)
downloadsamba-2b1fc7c0d30b6fbef3cb61775f37062fdc2c9656.tar.gz
samba-2b1fc7c0d30b6fbef3cb61775f37062fdc2c9656.tar.bz2
samba-2b1fc7c0d30b6fbef3cb61775f37062fdc2c9656.zip
s3:winbindd_cm: remove unused checks for address family
If we got a connection, we don't need to check what address family it uses. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jul 21 23:33:48 CEST 2011 on sn-devel-104
-rw-r--r--source3/winbindd/winbindd_cm.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 25f639872e..7df6bf8160 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -792,12 +792,6 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- struct sockaddr peeraddr;
- socklen_t peeraddr_len;
-
- struct sockaddr_in *peeraddr_in =
- (struct sockaddr_in *)(void *)&peeraddr;
-
DEBUG(10,("cm_prepare_connection: connecting to DC %s for domain %s\n",
controller, domain->name ));
@@ -823,37 +817,6 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
(*cli)->use_kerberos = True;
- peeraddr_len = sizeof(peeraddr);
-
- if ((getpeername((*cli)->fd, &peeraddr, &peeraddr_len) != 0)) {
- DEBUG(0,("cm_prepare_connection: getpeername failed with: %s\n",
- strerror(errno)));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- if ((peeraddr_len != sizeof(struct sockaddr_in))
-#ifdef HAVE_IPV6
- && (peeraddr_len != sizeof(struct sockaddr_in6))
-#endif
- ) {
- DEBUG(0,("cm_prepare_connection: got unexpected peeraddr len %d\n",
- peeraddr_len));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
- if ((peeraddr_in->sin_family != PF_INET)
-#ifdef HAVE_IPV6
- && (peeraddr_in->sin_family != PF_INET6)
-#endif
- ) {
- DEBUG(0,("cm_prepare_connection: got unexpected family %d\n",
- peeraddr_in->sin_family));
- result = NT_STATUS_UNSUCCESSFUL;
- goto done;
- }
-
result = cli_negprot(*cli);
if (!NT_STATUS_IS_OK(result)) {