summaryrefslogtreecommitdiff
path: root/modules/mappers
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2016-06-13 23:20:20 +0000
committerGraham Leggett <minfrin@apache.org>2016-06-13 23:20:20 +0000
commit964d61a7d57695dde4dc6101c1fc947936e01dae (patch)
treeef788e08cee0e625e611fba54b63df7812955c82 /modules/mappers
parentf4e190ae9250c2e815cb0be1e4cdda2ef1caa154 (diff)
downloadhttpd-964d61a7d57695dde4dc6101c1fc947936e01dae.tar.gz
mod_userdir: Constify and save a few bytes in the conf pool when parsing
"UserDir" directive Submitted by: jailletc36 Reviewed by: jim, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1748332 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/mappers')
-rw-r--r--modules/mappers/mod_userdir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c
index b181e278d8..1ec0e9010d 100644
--- a/modules/mappers/mod_userdir.c
+++ b/modules/mappers/mod_userdir.c
@@ -89,7 +89,7 @@ module AP_MODULE_DECLARE_DATA userdir_module;
typedef struct {
int globally_disabled;
- char *userdir;
+ const char *userdir;
apr_table_t *enabled_users;
apr_table_t *disabled_users;
} userdir_config;
@@ -137,7 +137,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
&userdir_module);
char *username;
const char *usernames = arg;
- char *kw = ap_getword_conf(cmd->pool, &usernames);
+ char *kw = ap_getword_conf(cmd->temp_pool, &usernames);
apr_table_t *usertable;
/* Since we are a raw argument, it is possible for us to be called with
@@ -173,7 +173,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
* If the first (only?) value isn't one of our keywords, just copy
* the string to the userdir string.
*/
- s_cfg->userdir = apr_pstrdup(cmd->pool, arg);
+ s_cfg->userdir = arg;
return NULL;
}
/*
@@ -182,7 +182,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
*/
while (*usernames) {
username = ap_getword_conf(cmd->pool, &usernames);
- apr_table_setn(usertable, username, kw);
+ apr_table_setn(usertable, username, "1");
}
return NULL;
}