Loading include/http_core.h +4 −2 Original line number Diff line number Diff line Loading @@ -184,10 +184,12 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r); * setting. The result is the (double reverse checked) * hostname, or NULL if any of the lookups fail. * </PRE> * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address * string is returned * @return The remote hostname * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type) * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip) */ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type); AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip); /** * Retrieve the login name of the remote user. Undef if it could not be Loading modules/aaa/mod_access.c +4 −2 Original line number Diff line number Diff line Loading @@ -341,10 +341,12 @@ static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method) case T_HOST: if (!gothost) { int remotehost_is_ip; remotehost = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_DOUBLE_REV); REMOTE_DOUBLE_REV, &remotehost_is_ip); if ((remotehost == NULL) || is_ip(remotehost)) if ((remotehost == NULL) || remotehost_is_ip) gothost = 1; else gothost = 2; Loading modules/loggers/mod_log_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -303,7 +303,7 @@ static const char *constant_item(request_rec *dummy, char *stuff) static const char *log_remote_host(request_rec *r, char *a) { return ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); REMOTE_NAME, NULL); } static const char *log_remote_address(request_rec *r, char *a) Loading modules/mappers/mod_rewrite.c +2 −2 Original line number Diff line number Diff line Loading @@ -3138,7 +3138,7 @@ static void rewritelog(request_rec *r, int level, const char *text, ...) } rhost = ap_get_remote_host(conn, r->server->module_config, REMOTE_NOLOOKUP); REMOTE_NOLOOKUP, NULL); if (rhost == NULL) { rhost = "UNKNOWN-HOST"; } Loading Loading @@ -3409,7 +3409,7 @@ static char *lookup_variable(request_rec *r, char *var) } else if (strcasecmp(var, "REMOTE_HOST") == 0) { result = (char *)ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); r->per_dir_config, REMOTE_NAME, NULL); } else if (strcasecmp(var, "REMOTE_USER") == 0) { result = r->user; Loading modules/metadata/mod_setenvif.c +1 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static int match_headers(request_rec *r) break; case SPECIAL_REMOTE_HOST: val = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); REMOTE_NAME, NULL); break; case SPECIAL_REMOTE_USER: val = r->user; Loading Loading
include/http_core.h +4 −2 Original line number Diff line number Diff line Loading @@ -184,10 +184,12 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r); * setting. The result is the (double reverse checked) * hostname, or NULL if any of the lookups fail. * </PRE> * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address * string is returned * @return The remote hostname * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type) * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip) */ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type); AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip); /** * Retrieve the login name of the remote user. Undef if it could not be Loading
modules/aaa/mod_access.c +4 −2 Original line number Diff line number Diff line Loading @@ -341,10 +341,12 @@ static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method) case T_HOST: if (!gothost) { int remotehost_is_ip; remotehost = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_DOUBLE_REV); REMOTE_DOUBLE_REV, &remotehost_is_ip); if ((remotehost == NULL) || is_ip(remotehost)) if ((remotehost == NULL) || remotehost_is_ip) gothost = 1; else gothost = 2; Loading
modules/loggers/mod_log_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -303,7 +303,7 @@ static const char *constant_item(request_rec *dummy, char *stuff) static const char *log_remote_host(request_rec *r, char *a) { return ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); REMOTE_NAME, NULL); } static const char *log_remote_address(request_rec *r, char *a) Loading
modules/mappers/mod_rewrite.c +2 −2 Original line number Diff line number Diff line Loading @@ -3138,7 +3138,7 @@ static void rewritelog(request_rec *r, int level, const char *text, ...) } rhost = ap_get_remote_host(conn, r->server->module_config, REMOTE_NOLOOKUP); REMOTE_NOLOOKUP, NULL); if (rhost == NULL) { rhost = "UNKNOWN-HOST"; } Loading Loading @@ -3409,7 +3409,7 @@ static char *lookup_variable(request_rec *r, char *var) } else if (strcasecmp(var, "REMOTE_HOST") == 0) { result = (char *)ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); r->per_dir_config, REMOTE_NAME, NULL); } else if (strcasecmp(var, "REMOTE_USER") == 0) { result = r->user; Loading
modules/metadata/mod_setenvif.c +1 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static int match_headers(request_rec *r) break; case SPECIAL_REMOTE_HOST: val = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); REMOTE_NAME, NULL); break; case SPECIAL_REMOTE_USER: val = r->user; Loading