View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000491 | Pgpool-II | Bug | public | 2019-04-04 12:54 | 2019-04-09 14:33 |
| Reporter | eldarsudden | Assigned To | t-ishii | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| OS | Linux | OS Version | CentOS 7.5 | ||
| Product Version | 4.0.3 | ||||
| Target Version | 4.0.5 | ||||
| Summary | 0000491: MD5 Authentication doesn't work as expected in RAW mode with more than 1 backends | ||||
| Description | "If Pgpool-II is operated in raw mode or there's only 1 backend configured, you don't need to setup pool_passwd." declarated here: http://www.pgpool.net/docs/latest/en/html/auth-methods.html#AUTH-MD5 We are using pgpool in our environment with following parameters: enable_pool_hba = off pool_passwd = '' replication_mode = off master_slave_mode = off load_balance_mode = off With RAW mode (more than 1 backends) we are getting the following errors: "ERROR: unable to get password, password file descriptor is NULL". It works as expected when there's only 1 backend. I've made a patch for this and now seems perfectly fine. | ||||
| Additional Information | diff --git a/src/auth/pool_auth.c b/src/auth/pool_auth.c index 1f108fb..78316b8 100644 --- a/src/auth/pool_auth.c +++ b/src/auth/pool_auth.c @@ -484,7 +484,7 @@ pool_do_auth(POOL_CONNECTION frontend, POOL_CONNECTION_POOL cp) /* * check if we can use md5 authentication. */ - if (NUM_BACKENDS > 1) + if (!RAW_MODE && NUM_BACKENDS > 1) { if (get_auth_password(MASTER(cp), frontend, 0, &password, &passwordType) == false) @@ -1705,7 +1705,7 @@ do_md5(POOL_CONNECTION backend, POOL_CONNECTION frontend, int reauth, int pr char encbuf[POOL_PASSWD_LEN + 1]; char *pool_passwd = NULL; - if (NUM_BACKENDS == 1) + if (RAW_MODE || NUM_BACKENDS == 1) return do_md5_single_backend(backend, frontend, reauth, protoMajor); if (passwordType == PASSWORD_TYPE_AES) | ||||
| Tags | No tags attached. | ||||
|
|
Thank you for the report and patches. I will look into them. |
|
|
I confirmed that your patch definitely fixes the problem. Pgpool-II has been bugged by this since 4.0. So I am going to commit/push the patch to 4.0 stable and master tree. Thank you again! |
|
|
Fix committed/pushed as: https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=91b88ad4dc255474ec6777734dc9dc5aa468a8f6 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-04-04 12:54 | eldarsudden | New Issue | |
| 2019-04-04 17:59 | administrator | Assigned To | => t-ishii |
| 2019-04-04 17:59 | administrator | Status | new => assigned |
| 2019-04-04 21:25 | t-ishii | Note Added: 0002522 | |
| 2019-04-05 16:53 | t-ishii | Note Added: 0002524 | |
| 2019-04-05 17:00 | t-ishii | Status | assigned => feedback |
| 2019-04-05 17:00 | t-ishii | Target Version | => 4.0.5 |
| 2019-04-09 14:33 | t-ishii | Note Added: 0002538 | |
| 2019-04-09 14:33 | t-ishii | Status | feedback => resolved |