dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 29ee270deee5f3c0b049f612245a734e626b6b33 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Fri, 24 Oct 2014 18:27:07 +0200
Subject: [PATCH 49/64] sdap_print_server: use getpeername() to get server
 address

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
---
 src/providers/ldap/sdap_async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 560d13789b88b7b7f3a09558fa2d2844f0fa036e..a6954620bd0f27b5f2d2e45563af9d1440d9cf7c 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -1107,7 +1107,7 @@ static void sdap_print_server(struct sdap_handle *sh)
         return;
     }
 
-    ret = getsockname(fd, (struct sockaddr *) &ss, &ss_len);
+    ret = getpeername(fd, (struct sockaddr *) &ss, &ss_len);
     if (ret == -1) {
         DEBUG(SSSDBG_MINOR_FAILURE, "getsockname failed\n");
         return;
-- 
1.9.3