pgpool2.git / summary / log / commit / refs
commit 79a3c053afa03dce485e354da5fcc0abc417f62d
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Mon Jul 26 00:23:38 2010 +0000
Fix pool_passwd handling. It broke pass to config file, and caused
reload config failure.
main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index c52f41eae..889114bef 100644
--- a/main.c
+++ b/main.c
@@ -313,9 +313,12 @@ int main(int argc, char **argv)
if (strcmp("", pool_config->pool_passwd))
{
char pool_passwd[POOLMAXPATHLEN+1];
+ char dirnamebuf[POOLMAXPATHLEN+1];
+ strncpy(dirnamebuf, conf_file, sizeof(dirnamebuf));
+ dirname(dirnamebuf);
snprintf(pool_passwd, sizeof(pool_passwd), "%s/%s",
- dirname(conf_file), pool_config->pool_passwd);
+ dirnamebuf, pool_config->pool_passwd);
pool_init_pool_passwd(pool_passwd);
}
[parent: 4f06dabc965c]