[pgpool-committers: 694] pgpool: Fix race condition when using pool_get_passwd. The file descrip

Tatsuo Ishii ishii at postgresql.org
Mon Oct 29 22:36:47 JST 2012


Fix race condition when using pool_get_passwd. The file descriptor to
pool_passwd is opened in pgpool main and pgpool child inherits
it. When concurrent connections try to authenticate md5 method, they
call pool_get_passwd and seek the fd and cause random md5 auth failure
because underlying fd is shared. Fix is, let individual pgpool child
open the file by calling pool_reopen_passwd_file.
Problem reported and analyzed by Jason Slagle in pgpool-general:1141.

Note that this patch requires commit d5930588747f1d0759411f494714a7909efe5e35
which allows to reload to recognize md5 password change.
I know this is not fix but the fix above requires this commit.

Branch
------
V3_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=4fee4e994380b6b0c3baebc2a46ade9f9867ee8b

Modified Files
--------------
child.c            |   14 ++++++++++++++
doc/pgpool-en.html |    3 ++-
doc/pgpool-ja.html |    3 ++-
pool_passwd.c      |   14 ++++++++++++++
pool_passwd.h      |    1 +
5 files changed, 33 insertions(+), 2 deletions(-)



More information about the pgpool-committers mailing list