MCPcopy Create free account
hub / github.com/apache/httpd / ap_os_is_path_absolute

Function ap_os_is_path_absolute

server/util.c:229–238  ·  view source on GitHub ↗

We actually compare the canonical root to this root, (but we don't * waste time checking the case), since every use of this function in * httpd-2.1 tests if the path is 'proper', meaning we've already passed * it through apr_filepath_merge, or we haven't. */

Source from the content-addressed store, hash-verified

227 * it through apr_filepath_merge, or we haven't.
228 */
229AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
230{
231 const char *newpath;
232 const char *ourdir = dir;
233 if (apr_filepath_root(&newpath, &dir, 0, p) != APR_SUCCESS
234 || strncmp(newpath, ourdir, strlen(newpath)) != 0) {
235 return 0;
236 }
237 return 1;
238}
239
240AP_DECLARE(int) ap_is_matchexp(const char *str)
241{

Callers 6

slotmem_filenamesFunction · 0.85
translate_userdirFunction · 0.85
mod_negotiation.cFile · 0.85
vhost_alias_setFunction · 0.85
hook_uri2fileFunction · 0.85
hook_fixupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected