diff -Nru openvpn-auth-ldap-2.0.3/debian/changelog openvpn-auth-ldap-2.0.3/debian/changelog --- openvpn-auth-ldap-2.0.3/debian/changelog 2014-10-14 17:14:09.000000000 +0000 +++ openvpn-auth-ldap-2.0.3/debian/changelog 2017-04-20 13:39:42.000000000 +0000 @@ -1,3 +1,10 @@ +openvpn-auth-ldap (2.0.3-6.1ubuntu1) artful; urgency=medium + + * Add patch from Aaron Peschel (~foxpass-dev) to fix a network timeout + crash. (LP: #1602813) + + -- Andreas Hasenack Thu, 20 Apr 2017 13:39:42 +0000 + openvpn-auth-ldap (2.0.3-6.1) unstable; urgency=low * Non-maintainer upload. diff -Nru openvpn-auth-ldap-2.0.3/debian/patches/openvpn_ldap_timeout_fix-lp1602813.patch openvpn-auth-ldap-2.0.3/debian/patches/openvpn_ldap_timeout_fix-lp1602813.patch --- openvpn-auth-ldap-2.0.3/debian/patches/openvpn_ldap_timeout_fix-lp1602813.patch 1970-01-01 00:00:00.000000000 +0000 +++ openvpn-auth-ldap-2.0.3/debian/patches/openvpn_ldap_timeout_fix-lp1602813.patch 2017-04-20 13:39:42.000000000 +0000 @@ -0,0 +1,35 @@ +Description: Properly check ldap_result() return code + Properly check ldap_result() return code so that a timeout error is + also caught and an assertion error is avoided. + Patch assembled by Aaron Peschel in https://pad.lv/1602813 + from upstream merges https://git.io/v9LtS and https://git.io/v9Lt1 + +Forwarded: n/a, backport from upstream +Author: Andreas Hasenack +Original-Author: Aaron Peschel https://launchpad.net/~foxpass-dev +Origin: upstream, https://git.io/v9LtS and https://git.io/v9Lt1 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1602813 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861107 +Patch-Name: openvpn_ldap_timeout_fix-lp1602813.patch +Last-Update: 2017-04-24 + +--- a/src/LFLDAPConnection.m ++++ b/src/LFLDAPConnection.m +@@ -175,7 +175,7 @@ + /* Wait for the result */ + timeout.tv_sec = _timeout; + timeout.tv_usec = 0; +- if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) { ++ if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) { + err = ldap_get_errno(ldapConn); + if (err == LDAP_TIMEOUT) + ldap_abandon_ext(ldapConn, msgid, NULL, NULL); +@@ -383,7 +383,7 @@ + } + + /* Wait for the result */ +- if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) { ++ if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) { + err = ldap_get_errno(ldapConn); + if (err == LDAP_TIMEOUT) + ldap_abandon_ext(ldapConn, msgid, NULL, NULL); diff -Nru openvpn-auth-ldap-2.0.3/debian/patches/series openvpn-auth-ldap-2.0.3/debian/patches/series --- openvpn-auth-ldap-2.0.3/debian/patches/series 2014-10-14 17:14:09.000000000 +0000 +++ openvpn-auth-ldap-2.0.3/debian/patches/series 2017-04-20 13:39:42.000000000 +0000 @@ -2,3 +2,4 @@ gobjc_4.7_runtime.patch openvpn_ldap_simpler_add_handler_4 auth-ldap-gnustep.patch +openvpn_ldap_timeout_fix-lp1602813.patch