403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/security/openvpn-auth-ldap/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/security/openvpn-auth-ldap/files/patch-src_auth-ldap.m
Fix crash on close if there is no ctx.

--- src/auth-ldap.m.orig	2018-07-26 20:17:21 UTC
+++ src/auth-ldap.m
@@ -247,6 +247,9 @@ OPENVPN_EXPORT void
 {
     ldap_ctx *ctx = handle;
 
+    if (!ctx)
+        return;
+
     /* Clean up the configuration file */
     [ctx->config release];
 
@@ -545,7 +548,6 @@ openvpn_plugin_func_v1(openvpn_plugin_ha
     pool = [[TRAutoreleasePool alloc] init];
 
     username = get_env("username", envp);
-    TRString *userName=[[TRString alloc]initWithCString: username];
     password = get_env("password", envp);
     remoteAddress = get_env("ifconfig_pool_remote_ip", envp);
 
@@ -556,6 +558,8 @@ openvpn_plugin_func_v1(openvpn_plugin_ha
         goto cleanup;
     }
 
+    TRString *userName=[[TRString alloc]initWithCString: username];
+
     /* Create an LDAP connection */
     if (!(ldap = connect_ldap(ctx->config))) {
         [TRLog error: "LDAP connect failed."];

Youez - 2016 - github.com/yon3zu
LinuXploit