httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1638520 - in /httpd/mod_ftp/trunk: ./ include/ modules/ftp/
Date Tue, 11 Nov 2014 22:58:28 GMT
Author: wrowe
Date: Tue Nov 11 22:58:27 2014
New Revision: 1638520

URL: http://svn.apache.org/r1638520
Log:
Introduce the HOST command (and XWEL command for diagnostics), and support for
TLS-SNI provided hostname via an implicit HOST invocation. Corrects headers
and fields to ensure the host names are initialized at the appropriate times,
and that the orig_server maps to the correct host.  This is known to work
correctly with the latest Filezilla (uses SNI by default), for both Explicit
and Implicit SSL connections on httpd-2.2, but the SSL logic is known to be
broken for the data channel on httpd-2.4 (likely not a regression).



Modified:
    httpd/mod_ftp/trunk/CHANGES-FTP
    httpd/mod_ftp/trunk/include/mod_ftp.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_internal.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
    httpd/mod_ftp/trunk/modules/ftp/mod_ftp.c

Modified: httpd/mod_ftp/trunk/CHANGES-FTP
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/CHANGES-FTP?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/CHANGES-FTP (original)
+++ httpd/mod_ftp/trunk/CHANGES-FTP Tue Nov 11 22:58:27 2014
@@ -1,5 +1,17 @@
 Changes in 1.0.1:
 
+  *) Introduce HOST command to change virtual host context, and invoke an
+     implicit HOST command for the default hostname, resulting in the 220
+     message and welcome text. Until authorization, the user may repeatedly
+     re-issue the HOST command. [William Rowe]
+
+  *) Support TLS-SNI hostname and issue an implicit HOST command upon any
+     TLS-SNI connection. For Explicit SSL connections, this results in
+     the initial 220 message and welcome text, however with Implicit SSL
+     connections, the implicit HOST response is surpressed, because that
+     220 message and welcome text are unexpected (234 is the correct
+     response). [William Rowe]
+
   *) Pick up httpd 2.4 required changes for compilation. [William Rowe]
  
   *) Resolve a crash-bug when built against 2.2.29 and later, due to

Modified: httpd/mod_ftp/trunk/include/mod_ftp.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/include/mod_ftp.h?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/include/mod_ftp.h (original)
+++ httpd/mod_ftp/trunk/include/mod_ftp.h Tue Nov 11 22:58:27 2014
@@ -55,6 +55,9 @@
 extern "C" {
 #endif
 
+/* FTP Reply No-Op */
+
+#define FTP_NO_REPLY                        0
 
 /* FTP Reply Codes */
 
@@ -165,6 +168,8 @@ typedef struct ftp_dir_config
 #define ftp_set_module_config(v,val) \
     ap_set_module_config(v, &ftp_module, val)
 
+#define FTP_HOST_LEN_T 255
+ 
 /*
  * FTP connection structure.  Each connection to the server will
  * have an ftp_connection structure associated with it.
@@ -179,7 +184,7 @@ typedef struct ftp_connection
     /* User information */
     apr_pool_t *login_pool;   /* Child of c->pool reset on every USER cmd */
     int logged_in;
-    const char *host;
+    char *host;               /* A buffer of FTP_HOST_LEN_T + 1 bytes */
     const char *user;
     const char *authorization;
     int login_attempts;
@@ -219,6 +224,8 @@ typedef struct ftp_connection
     apr_bucket_brigade *next_bb; /* Holding brigade for request look-ahead */
     char *next_request;       /* The next control command */
     apr_size_t next_reqsize;  /* Size of the next control command */
+
+    int host_set;             /* True if host is a writable c->pool buffer */
 } ftp_connection;
 
 /*

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Tue Nov 11 22:58:27 2014
@@ -137,13 +137,6 @@ static int ftp_run_handler(request_rec *
     int res;
 
     /*
-     * Set the authorization header and the user name for all requests.  This
-     * information may not be needed for all   requests, but is required for
-     * logging purposes.
-     */
-    ftp_set_authorization(r);
-
-    /*
      * Run the header parser hook for mod_setenv.  For conditional logging,
      * etc
      */
@@ -654,6 +647,75 @@ static int ftp_cmd_help(request_rec *r, 
     return FTP_REPLY_HELP_MESSAGE;
 }
 
+static int ftp_cmd_host(request_rec *r, const char *arg)
+{
+    ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
+    conn_rec *c = r->connection;
+    ftp_server_config *fsc = ftp_get_module_config(r->server->module_config);
+    apr_time_t prev_timeout;
+    apr_status_t rv;
+
+    /* HOST is disallowed following authentication */
+    if (fc->logged_in) {
+        return FTP_REPLY_BAD_SEQUENCE;
+    }
+
+    r->server = fc->orig_server = c->base_server;
+    r->per_dir_config = r->server->lookup_defaults;
+
+    if (!fc->host || !fc->host_set) {
+        fc->host = apr_palloc(c->pool, FTP_HOST_LEN_T + 1);
+        fc->host_set = 1;
+    }
+    apr_cpystrn(fc->host, arg, FTP_HOST_LEN_T + 1);
+    r->hostname = fc->host;
+
+    /*
+     * This is normally set in the dispatcher, but since we just read the
+     * hostname, we need to re-set the Host: header
+     */
+    ftp_set_authorization(r);
+
+    ap_update_vhost_from_headers(r);
+
+    fc->orig_server = r->server;
+
+    /*
+     * Toggle to the HOST-based vhost's timeout mode,
+     * since we may have switched to another server
+     */
+    fsc = ftp_get_module_config(r->server->module_config);
+    r->per_dir_config = r->server->lookup_defaults;
+
+    /* We have potentially changed virtual
+     * host contexts; reset to the proper timeout_login
+     */
+    rv = apr_socket_timeout_get(fc->cntlsock, &prev_timeout);
+    if (rv != APR_SUCCESS || prev_timeout != fsc->timeout_login) {
+        rv = apr_socket_timeout_set(fc->cntlsock,
+                                    fsc->timeout_login * APR_USEC_PER_SEC);
+        if (rv != APR_SUCCESS)
+            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, r->server,
+                         "Couldn't set SO_TIMEOUT socket option");
+    }
+
+    /* Check if this is an AUTH request, and silence the output */
+    if ((fc->auth == FTP_AUTH_TLS || fc->auth == FTP_AUTH_SSL) &&
+            fc->is_secure == 0) {
+        fc->is_secure = 1;
+        return FTP_NO_REPLY;
+    }
+
+    /* 220 response with new host's welcome message */
+    rv = ftp_send_welcome(fc, r->pool);
+    if (rv != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_INFO, rv, fc->orig_server,
+                     "Error sending server welcome string");
+    }
+
+    return FTP_REPLY_SERVICE_READY;
+}
+
 static int common_list(request_rec *r, const char *arg, int is_list)
 {
     ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
@@ -2749,28 +2811,31 @@ static int ftp_cmd_user(request_rec *r, 
         ftp_limitlogin_loggedout(c);
     }
     fc->logged_in = 0;
-    r->server = fc->orig_server = c->base_server;
+    if (!fc->host_set)
+        fc->orig_server = c->base_server;
+    r->server = fc->orig_server;
     r->per_dir_config = r->server->lookup_defaults;
-    r->hostname = fc->host = NULL;
+    r->hostname = fc->host;
     apr_pool_clear(fc->login_pool);
 
     fc->user = username = apr_pstrdup(fc->login_pool, arg);
 
     /*
      * Identify virtual host (user@{hostname}) for named vhost lookup, and
-     * split from user name if so configured.
+     * split from user name if so configured.  Invalid for HOST or TLS_SNI.
      */
-    if ((hostname = ap_strchr(username, '@')) != NULL) {
+    hostname = ap_strchr(username, '@');
+
+    if (!fc->host_set && (hostname != NULL)) {
         /*
          * Toggle to the Host:-based vhost's timeout mode to process this
          * login request
          */
         if (fsc->options & FTP_OPT_VHOST_BY_USER) {
-            r->hostname = hostname + 1;
+            r->hostname = fc->host = hostname + 1;
 
             ap_update_vhost_from_headers(r);
 
-            fc->host = r->hostname;
             fc->orig_server = r->server;
         }
     }
@@ -2800,7 +2865,7 @@ static int ftp_cmd_user(request_rec *r, 
     }
 
     if ((fsc->options & FTP_OPT_REQUIRESSL) && !fc->is_secure) {
-        r->hostname = fc->host = NULL;
+        r->hostname = fc->host;
         fc->user = ftp_unknown_username;
         fc->authorization = NULL;
         r->server = fc->orig_server = c->base_server;
@@ -2827,6 +2892,24 @@ static int ftp_cmd_user(request_rec *r, 
     return FTP_REPLY_USER_OK;
 }
 
+static int ftp_cmd_xwel(request_rec *r, const char *arg)
+{
+    ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
+    conn_rec *c = r->connection;
+    ftp_server_config *fsc = ftp_get_module_config(r->server->module_config);
+    apr_time_t prev_timeout;
+    apr_status_t rv;
+
+    /* 220 response with new host's welcome message */
+    rv = ftp_send_welcome(fc, r->pool);
+    if (rv != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_INFO, rv, fc->orig_server,
+                     "Error sending server welcome string");
+    }
+
+    return FTP_REPLY_SERVICE_READY;
+}
+
 void ftp_register_core_cmds(apr_pool_t *p)
 {
 
@@ -2893,6 +2976,10 @@ void ftp_register_core_cmds(apr_pool_t *
                  FTP_TAKE0 | FTP_TAKE1,
                  "[ <sp> <string> ]");
 
+    ftp_hook_cmd("HOST", ftp_cmd_host, FTP_HOOK_LAST,
+                 FTP_TAKE1 | FTP_NEW_FEAT,
+                 "<sp> hostname");
+
     ftp_hook_cmd("LANG", NULL, FTP_HOOK_LAST,
                  FTP_TAKE1,
                  "<sp> lang-code");
@@ -3062,4 +3149,9 @@ void ftp_register_core_cmds(apr_pool_t *
                        FTP_NO_HELP | FTP_NEED_LOGIN | FTP_TAKE1,
                        "<sp> path-name");
 
+    /* Unadvertised test command to determine working host */
+    ftp_hook_cmd("XWEL", ftp_cmd_xwel, FTP_HOOK_LAST,
+                 FTP_NO_HELP | FTP_TAKE0,
+                 "(replay welcome greeting)");
+
 }

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_connection.c Tue Nov 11 22:58:27 2014
@@ -42,6 +42,7 @@ static void initialize_ftp_connection(co
      * members that we need to.
      */
     fc->connection = c;
+    fc->host = c->base_server->server_hostname;
     fc->user = ftp_unknown_username;
     fc->auth = FTP_AUTH_NONE;
     fc->prot = FTP_PROT_CLEAR;
@@ -112,23 +113,20 @@ apr_status_t ftp_ssl_init(conn_rec *cdat
  *
  * Returns: apr_status_t
  */
-static apr_status_t ftp_send_welcome(ftp_connection *fc)
+apr_status_t ftp_send_welcome(ftp_connection *fc, apr_pool_t *pool)
 {
     conn_rec *c = fc->connection;
     ftp_server_config *fsc;
-    apr_status_t rv;
+    apr_status_t rv = APR_SUCCESS;
 
     fsc = ftp_get_module_config(fc->orig_server->module_config);
 
     /* Check if a login message has been configured */
     if (fsc->banner_message) {
         if (fsc->banner_message_isfile) {
-            rv = ftp_show_file(c->output_filters, fc->data_pool,
+            rv = ftp_show_file(c->output_filters, pool,
                                FTP_REPLY_SERVICE_READY, fc,
                                fsc->banner_message);
-            if (rv != APR_SUCCESS) {
-                return rv;
-            }
         }
         else {
             char outbuf[BUFSIZ];
@@ -136,24 +134,10 @@ static apr_status_t ftp_send_welcome(ftp
             ftp_message_generate(fc, fsc->banner_message,
                                  outbuf, sizeof(outbuf));
 
-            rv = ftp_reply(fc, c->output_filters, fc->data_pool,
+            rv = ftp_reply(fc, c->output_filters, pool,
                            FTP_REPLY_SERVICE_READY, 1, outbuf);
-
-            if (rv != APR_SUCCESS) {
-                return rv;
-            }
         }
     }
-
-    rv = ftp_reply(fc, c->output_filters, fc->data_pool,
-                   FTP_REPLY_SERVICE_READY, 0,
-                   "%s FTP Server (%s) ready.",
-                   fc->orig_server->server_hostname,
-#if AP_MODULE_MAGIC_AT_LEAST(20060905,0)
-                   ap_get_server_banner());
-#else
-                   ap_get_server_version());
-#endif
     return rv;
 }
 
@@ -174,6 +158,7 @@ int ftp_process_connection(conn_rec *c)
     extern ap_filter_rec_t *ftp_ssl_input_filter_handle;
     extern ap_filter_rec_t *ftp_ssl_output_filter_handle;
     ftp_server_config *fsc;
+    char *sni_hostname;
 
     fsc = ftp_get_module_config(c->base_server->module_config);
 
@@ -228,15 +213,26 @@ int ftp_process_connection(conn_rec *c)
         fc->auth = FTP_AUTH_SSL;
         fc->prot = FTP_PROT_PRIVATE;
         fc->is_secure = 1;
-    }
 
-    rv = ftp_send_welcome(fc);
-    if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_INFO, rv, fc->orig_server,
-                     "Error sending server welcome string");
-        return OK;
+        sni_hostname = ftp_ssl_var_lookup(fc->login_pool, fc->orig_server,
+                                          c, NULL, "SSL_TLS_SNI");
+        if (sni_hostname && *sni_hostname) {
+            fc->host = sni_hostname;
+        }
     }
 
+    /* Oct '14 by wrowe: removed ftp_send_welcome and substituted an
+     * injected 'HOST' command for this newly supported feature.  Per
+     * RFC, that HOST command always repeats the given server's welcome
+     * sequence and 220 status, rendering send_welcome redundant.
+     *
+     * The actual fc->host -> fc->orig_server can *only* be determined
+     * in the context of an actual request, and at this point in connection
+     * flow there is no request.  The dummy HOST request provides this.
+     */
+    fc->next_request = apr_psprintf(fc->login_pool, "HOST %s", fc->host);
+    fc->next_reqsize = strlen(fc->next_request);
+
     /*
      * Begin processing requests
      */
@@ -293,7 +289,31 @@ int ftp_process_connection(conn_rec *c)
                                         fc->ssl_output_ctx, NULL, c);
             ap_add_input_filter_handle(ftp_ssl_input_filter_handle,
                                        fc->ssl_input_ctx, NULL, c);
-            fc->is_secure = 1;
+
+            /* Initialize control connection */
+            if ((rv = ftp_ssl_init(c)) != APR_SUCCESS) {
+                /*
+                 * Error initializing the connection, most likely from a client
+                 * attempting to connect w/o SSL.  Just drop the connection
+                 */
+                ap_log_error(APLOG_MARK, APLOG_INFO, rv, fc->orig_server,
+                             "Error initializing SSL connection.  Client "
+                             "connecting without SSL?");
+                return OK;
+            }
+
+            sni_hostname = ftp_ssl_var_lookup(fc->login_pool, fc->orig_server,
+                                              c, NULL, "SSL_TLS_SNI");
+            if (sni_hostname && *sni_hostname) {
+                fc->host = sni_hostname;
+                fc->host_set = 0;
+                fc->next_request = apr_psprintf(fc->login_pool, "HOST %s",
+                                                                fc->host);
+                fc->next_reqsize = strlen(fc->next_request);
+            }
+            else {
+                fc->is_secure = 1;
+            }
         }
     }
     if (fc->logged_in) {

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_internal.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_internal.h?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_internal.h (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_internal.h Tue Nov 11 22:58:27 2014
@@ -64,8 +64,10 @@
 
 #ifdef FTP_APXS_BUILD
 #include "mod_log_config.h"
+#include "mod_ssl.h"
 #else
 #include "../../modules/loggers/mod_log_config.h"
+#include "../../modules/ssl/mod_ssl.h"
 #endif
 
 #if APR_HAVE_UNISTD_H
@@ -188,10 +190,14 @@ typedef struct ftp_direntry
 
 extern ap_filter_rec_t *ftp_input_filter_handle;
 
+extern APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *ftp_ssl_var_lookup;
+
 /* Routines for handling incoming connections
  *
  * ftp_connection.c
  */
+apr_status_t ftp_send_welcome(ftp_connection *fc, apr_pool_t *pool);
+
 int ftp_process_connection(conn_rec *c);
 
 /* Placeholder of "unknown" username (not valid for ftp_cmd_pass)

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.c?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.c Tue Nov 11 22:58:27 2014
@@ -607,6 +607,11 @@ request_rec *ftp_read_request(ftp_connec
 #endif
     }
 
+    /* Set Host/Auth headers prior to post_read_request, because SSL
+     * uses this phase to validate the hostname.
+     */
+    ftp_set_authorization(r);
+
     /*
      * PHP does initializations of important data structures in the
      * post_read_request phase.
@@ -743,6 +748,20 @@ void ftp_send_response(request_rec *r, i
     }
 
     switch (status) {
+    case FTP_NO_REPLY:
+        /* Sending no response */
+        break;
+
+    case FTP_REPLY_SERVICE_READY:
+        ftp_reply(fc, c->output_filters, r->pool, FTP_REPLY_SERVICE_READY, 0,
+                  "%s FTP Server (%s) ready.",
+                  fc->orig_server->server_hostname,
+#if AP_MODULE_MAGIC_AT_LEAST(20060905,0)
+                  ap_get_server_banner());
+#else
+                  ap_get_server_version());
+#endif
+        break;
     case FTP_REPLY_SYSTEM_TYPE:
         ftp_reply(fc, c->output_filters, r->pool, FTP_REPLY_SYSTEM_TYPE, 0,
                   apr_pstrcat(r->pool, "UNIX Type: L8 System: \"",

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h Tue Nov 11 22:58:27 2014
@@ -15,8 +15,8 @@
 const int ftp_response_types[] = {
     110, 120, 125, 150, 200, 202, 211, 212, 213, 214, 215, 220, 221, 225, 226, 227, 229,
230, 232, 234, 250, 257, 331, 332, 350, 421, 425, 426, 450, 451, 452, 500, 501, 502, 503,
504, 522, 530, 532, 536, 550, 551, 552, 553, 554, 555, 0 };
 
-#define WWW_MIB_TOTAL_FTP_REQUESTS 43
+#define WWW_MIB_TOTAL_FTP_REQUESTS 45
 
 const char *ftp_request_types[] ={
-    "CWD", "MKD", "PWD", "RMD", "ABOR", "ACCT", "ALLO", "APPE", "AUTH", "CDUP", "DELE", "EPRT",
"EPSV", "FEAT", "HELP", "LANG", "LIST", "MDTM", "MODE", "NLST", "NOOP", "OPTS", "PASS", "PASV",
"PBSZ", "PORT", "PROT", "QUIT", "REIN", "REST", "RETR", "RNFR", "RNTO", "SITE", "SIZE", "SMNT",
"STAT", "STOR", "STOU", "STRU", "SYST", "TYPE", "USER", NULL };
+    "CWD", "MKD", "PWD", "RMD", "ABOR", "ACCT", "ALLO", "APPE", "AUTH", "CDUP", "DELE", "EPRT",
"EPSV", "FEAT", "HELP", "HOST", "LANG", "LIST", "MDTM", "MODE", "NLST", "NOOP", "OPTS", "PASS",
"PASV", "PBSZ", "PORT", "PROT", "QUIT", "REIN", "REST", "RETR", "RNFR", "RNTO", "SITE", "SIZE",
"SMNT", "STAT", "STOR", "STOU", "STRU", "SYST", "TYPE", "USER", "XWEL", NULL };
 

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_util.c?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_util.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_util.c Tue Nov 11 22:58:27 2014
@@ -421,12 +421,14 @@ struct ftp_direntry *ftp_direntry_get(re
 void ftp_set_authorization(request_rec *r)
 {
     ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
-    if (fc->user == ftp_unknown_username)
-        return;
-    r->hostname = apr_pstrdup(r->pool, fc->host);
-    r->user = apr_pstrdup(r->pool, fc->user);
-    apr_table_setn(r->headers_in, "Host", r->hostname);
-    apr_table_setn(r->headers_in, "Authorization", fc->authorization);
+    if (fc->host) {
+        r->hostname = apr_pstrdup(r->pool, fc->host);
+        apr_table_setn(r->headers_in, "Host", r->hostname);
+    }
+    if (fc->user && (fc->user != ftp_unknown_username)) {
+        r->user = apr_pstrdup(r->pool, fc->user);
+        apr_table_setn(r->headers_in, "Authorization", fc->authorization);
+    }
 }
 
 /* ftp_set_uri: Setup r->uri based on a file argument and user's

Modified: httpd/mod_ftp/trunk/modules/ftp/mod_ftp.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/mod_ftp.c?rev=1638520&r1=1638519&r2=1638520&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/mod_ftp.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/mod_ftp.c Tue Nov 11 22:58:27 2014
@@ -27,6 +27,8 @@ ap_filter_rec_t *ftp_content_length_filt
 ap_filter_rec_t *ftp_ssl_input_filter_handle;
 ap_filter_rec_t *ftp_ssl_output_filter_handle;
 
+APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *ftp_ssl_var_lookup = NULL;
+
 /* Register callbacks for mod_log_config. */
 static int ftp_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
 {
@@ -80,6 +82,8 @@ static int ftp_post_config(apr_pool_t *p
 
     ap_add_version_component(p, FTP_SERVER_STRING);
 
+    ftp_ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
+
     /*
      * Unless disabled, advertise that UTF8 filenames are preferred/permitted
      * RFC2640 never -requires- UTF8 names



Mime
View raw message