Patch is provided by Danylo Hlynskyi.
<listitem>
<para>
<!--
- Specify the password file name for authentication.
- Default value is <literal>"pool_passwd"</literal>.
+ Specify the path (absolute or relative) to password file for
+ authentication. Default value is <literal>"pool_passwd"</literal>.
+ A relative path will be interpreted with respect to the directory
+ where configuration file is placed.
Specifying <literal>''</literal> (empty) disables the use
of password file.
-->
- ่ช่จผใซ็จใใใในใฏใผใใใกใคใซใฎใใกใคใซๅใๆๅฎใใพใใ
- ใใใฉใซใๅคใฏ<literal>"pool_passwd"</literal>ใงใใ
+ ่ช่จผ็จใฎใในใฏใผใใใกใคใซใธใฎใใน(็ตถๅฏพใในใพใใฏ็ธๅฏพใใน)ใๆๅฎใใพใใ
+ ใใใฉใซใๅคใฏ<literal>"pool_passwd"</literal>ใงใใ
+ ็ธๅฏพใในใฏใ่จญๅฎใใกใคใซใ็ฝฎใใใฆใใใใฃใฌใฏใใชใๅบๆบใจใใฆใใพใใ
<literal>''</literal>๏ผ็ฉบๆๅญๅ๏ผใๆๅฎใใใจ ใในใฏใผใใใกใคใซใฎไฝฟ็จใฏ็กๅนใซใชใใพใใ
</para>
<para>
</term>
<listitem>
<para>
- Specify the password file name for authentication.
- Default value is <literal>"pool_passwd"</literal>.
+ Specify the path (absolute or relative) to password file for
+ authentication. Default value is <literal>"pool_passwd"</literal>.
+ A relative path will be interpreted with respect to the directory
+ where configuration file is placed.
Specifying <literal>''</literal> (empty) disables the use
of password file.
</para>
char dirnamebuf[POOLMAXPATHLEN + 1];
char *dirp;
- strlcpy(dirnamebuf, conf_file, sizeof(dirnamebuf));
- dirp = dirname(dirnamebuf);
- snprintf(pool_passwd, sizeof(pool_passwd), "%s/%s",
- dirp, pool_config->pool_passwd);
+ if (pool_config->pool_passwd[0] != '/')
+ {
+ strlcpy(dirnamebuf, conf_file, sizeof(dirnamebuf));
+ dirp = dirname(dirnamebuf);
+ snprintf(pool_passwd, sizeof(pool_passwd), "%s/%s",
+ dirp, pool_config->pool_passwd);
+ }
+ else
+ strlcpy(pool_passwd, pool_config->pool_passwd,
+ sizeof(pool_passwd));
+
pool_init_pool_passwd(pool_passwd, POOL_PASSWD_R);
}