Index: pool_auth.c =================================================================== RCS file: /cvsroot/pgpool/pgpool-II/pool_auth.c,v retrieving revision 1.25 diff -c -r1.25 pool_auth.c *** pool_auth.c 17 Aug 2010 02:22:17 -0000 1.25 --- pool_auth.c 20 Sep 2010 04:27:36 -0000 *************** *** 5,11 **** * pgpool: a language independent connection pool server for PostgreSQL * written by Tatsuo Ishii * ! * Copyright (c) 2003-2009 PgPool Global Development Group * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby --- 5,11 ---- * pgpool: a language independent connection pool server for PostgreSQL * written by Tatsuo Ishii * ! * Copyright (c) 2003-2010 PgPool Global Development Group * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby *************** *** 131,136 **** --- 131,138 ---- authkind = ntohl(authkind); + pool_debug("pool_do_auth: auth kind:%d", authkind); + /* trust? */ if (authkind == 0) { *************** *** 833,838 **** --- 835,848 ---- if (!RAW_MODE && NUM_BACKENDS > 1) { + /* Read password entry from pool_passwd */ + pool_passwd = pool_get_passwd(frontend->username); + if (!pool_passwd) + { + pool_debug("do_md5: %s does not exist in pool_passwd", frontend->username); + return -1; + } + /* master? */ if (IS_MASTER_NODE_ID(backend->db_node_id)) { *************** *** 852,864 **** } /* Check the password using my salt + pool_passwd */ - pool_passwd = pool_get_passwd(frontend->username); - if (!pool_passwd) - { - pool_debug("do_md5: %s does not exist in pool_passwd", frontend->username); - return -1; - } - pg_md5_encrypt(pool_passwd+strlen("md5"), salt, sizeof(salt), encbuf); if (strcmp(password, encbuf)) { --- 862,867 ----