AP_DECLARE(gid_t) ap_gname2id(const char *name);
/**
* Given the name of an object in the file system determine if it is a directory
+ * @param p The pool to allocate out of
* @param name The name of the object to check
* @return 1 if it is a directory, 0 otherwise
- * @deffunc int ap_is_rdirectory(const char *name)
+ * @deffunc int ap_is_rdirectory(apr_pool_t *p, const char *name)
*/
-AP_DECLARE(int) ap_is_rdirectory(const char *name);
+AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *name);
/**
* Given the name of an object in the file system determine if it is a directory - this version is symlink aware
+ * @param p The pool to allocate out of
* @param name The name of the object to check
* @return 1 if it is a directory, 0 otherwise
- * @deffunc int ap_is_directory(const char *name)
+ * @deffunc int ap_is_directory(apr_pool_t *p, const char *name)
*/
-AP_DECLARE(int) ap_is_directory(const char *name);
+AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *name);
/**
* Given a pathname in file, extract the directory and chdir to that directory
* @param file The file who's directory we wish to switch to
}
arg = ap_os_canonical_filename(cmd->pool, arg);
- if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(arg)) {
+ if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(cmd->pool, arg)) {
if (cmd->server->is_virtual) {
ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, cmd->pool,
"Warning: DocumentRoot [%s] does not exist",
arg = ap_os_canonical_filename(cmd->pool, arg);
- if (!ap_is_directory(arg)) {
+ if (!ap_is_directory(cmd->pool, arg)) {
return "ServerRoot must be a valid directory";
}
ap_server_root = arg;
* horrible loops). If so, let's recurse and toss it back into
* the function.
*/
- if (ap_is_rdirectory(fname)) {
+ if (ap_is_rdirectory(ptemp, fname)) {
apr_dir_t *dirp;
int current;
apr_array_header_t *candidates = NULL;
return x;
}
-AP_DECLARE(int) ap_is_directory(const char *path)
+AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *path)
{
apr_finfo_t finfo;
- if (apr_stat(&finfo, path, NULL) == -1)
+ if (apr_stat(&finfo, path, p) == -1)
return 0; /* in error condition, just return no */
return (finfo.filetype == APR_DIR);
}
-AP_DECLARE(int) ap_is_rdirectory(const char *path)
+AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *path)
{
apr_finfo_t finfo;
- if (apr_lstat(&finfo, path, NULL) == -1)
+ if (apr_lstat(&finfo, path, p) == -1)
return 0; /* in error condition, just return no */
return (finfo.filetype == APR_DIR);