OSDN Git Service

Don't make "replication" magical as a user name, only as a database name, in pg_hba...
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 10 Apr 2011 18:51:26 +0000 (14:51 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 12 Apr 2011 11:44:23 +0000 (07:44 -0400)
Per gripe from Josh Berkus. Backported from commit ed557a373c406bbb2a1843544ebbd856ca4cac47.

src/backend/libpq/hba.c

index 4e1cff3..c746c19 100644 (file)
@@ -490,6 +490,8 @@ check_role(const char *role, Oid roleid, char *param_str)
                                return true;
                }
                else if (strcmp(tok, role) == 0 ||
+                                (strcmp(tok, "replication\n") == 0 && 
+                                 strcmp(role,"replication") ==0) ||
                                 strcmp(tok, "all\n") == 0)
                        return true;
        }