Fix unnecessary checks.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 23 Apr 2020 12:32:28 +0000 (21:32 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 23 Apr 2020 12:32:28 +0000 (21:32 +0900)
Patch contributed by sherlockcpp.
Discussion: https://www.pgpool.net/pipermail/pgpool-general/2020-April/007062.html

src/auth/pool_auth.c

index 12e6db61252adf8bb6be2a578964259f1ee5dbb8..8e385264e48f4b3fbd8a75706068d24dc30d3a95 100644 (file)
@@ -3,7 +3,7 @@
  * pgpool: a language independent connection pool server for PostgreSQL
  * written by Tatsuo Ishii
  *
- * Copyright (c) 2003-2019     PgPool Global Development Group
+ * Copyright (c) 2003-2020     PgPool Global Development Group
  *
  * Permission to use, copy, modify, and distribute this software and
  * its documentation for any purpose and without fee is hereby
@@ -1095,7 +1095,7 @@ do_clear_text_password(POOL_CONNECTION * backend, POOL_CONNECTION * frontend, in
        kind = send_password_packet(backend, protoMajor, pwd);
 
        /* if authenticated, save info */
-       if (!reauth && kind == AUTH_REQ_OK)
+       if (kind == AUTH_REQ_OK)
        {
                if (IS_MASTER_NODE_ID(backend->db_node_id))
                {
@@ -1238,7 +1238,7 @@ do_crypt(POOL_CONNECTION * backend, POOL_CONNECTION * frontend, int reauth, int
        pool_read(backend, &kind, sizeof(kind));
 
        /* if authenticated, save info */
-       if (!reauth && kind == 0)
+       if (kind == 0)
        {
                int                     msglen;