From: Jim Jagielski Date: Thu, 8 Jan 2004 20:40:46 +0000 (+0000) Subject: If using apr_fnmatch() we should be using it's macros X-Git-Tag: 2.0.49~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33260120faa5fb442b891010fcc8aaf869964552;p=thirdparty%2Fapache%2Fhttpd.git If using apr_fnmatch() we should be using it's macros PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102234 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 9142680ea63..30427faee44 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -812,7 +812,7 @@ static char *find_default_item(char *bogus_name, apr_array_header_t *list) */ #ifdef CASE_BLIND_FILESYSTEM -#define MATCH_FLAGS FNM_CASE_BLIND +#define MATCH_FLAGS APR_FNM_CASE_BLIND #else #define MATCH_FLAGS 0 #endif @@ -1298,7 +1298,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent, #ifndef CASE_BLIND_FILESYSTEM if (pattern && (apr_fnmatch(pattern, dirent->name, - FNM_NOESCAPE | FNM_PERIOD) + APR_FNM_NOESCAPE | APR_FNM_PERIOD) != APR_SUCCESS)) return (NULL); #else /* !CASE_BLIND_FILESYSTEM */ @@ -1308,7 +1308,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent, * reliably - so we have to granularise at the OS level. */ if (pattern && (apr_fnmatch(pattern, dirent->name, - FNM_NOESCAPE | FNM_PERIOD | FNM_CASE_BLIND) + APR_FNM_NOESCAPE | APR_FNM_PERIOD | APR_FNM_CASE_BLIND) != APR_SUCCESS)) return (NULL); #endif /* !CASE_BLIND_FILESYSTEM */ diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index c75bf8c08c0..33b3fb0a0f4 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -855,11 +855,11 @@ static void ssl_check_public_cert(server_rec *s, } if (SSL_X509_getCN(ptemp, cert, &cn)) { - int fnm_flags = FNM_PERIOD|FNM_CASE_BLIND; + int fnm_flags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND; if (apr_fnmatch_test(cn) && (apr_fnmatch(cn, s->server_hostname, - fnm_flags) == FNM_NOMATCH)) + fnm_flags) == APR_FNM_NOMATCH)) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "%s server certificate wildcard CommonName (CN) `%s' " diff --git a/server/config.c b/server/config.c index 8936b960e0f..177f20c0b84 100644 --- a/server/config.c +++ b/server/config.c @@ -1611,7 +1611,7 @@ AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname, if (strcmp(dirent.name, ".") && strcmp(dirent.name, "..") && (apr_fnmatch(pattern, dirent.name, - FNM_PERIOD) == APR_SUCCESS)) { + APR_FNM_PERIOD) == APR_SUCCESS)) { fnew = (fnames *) apr_array_push(candidates); fnew->fname = ap_make_full_path(p, path, dirent.name); } diff --git a/server/request.c b/server/request.c index a89e03bb536..97625c49f0f 100644 --- a/server/request.c +++ b/server/request.c @@ -806,7 +806,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) && ((entry_core->d_components < seg) || (entry_core->d_is_fnmatch ? (apr_fnmatch(entry_core->d, r->filename, - FNM_PATHNAME) != APR_SUCCESS) + APR_FNM_PATHNAME) != APR_SUCCESS) : (strcmp(r->filename, entry_core->d) != 0)))) { continue; } @@ -1273,7 +1273,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r) if (entry_core->r ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0) : (entry_core->d_is_fnmatch - ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME) + ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME) : (strncmp(entry_core->d, cache->cached, len) || (entry_core->d[len - 1] != '/' && cache->cached[len] != '/' @@ -1422,7 +1422,7 @@ AP_DECLARE(int) ap_file_walk(request_rec *r) if (entry_core->r ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0) : (entry_core->d_is_fnmatch - ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME) + ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME) : strcmp(entry_core->d, cache->cached))) { continue; }