1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Fix up problems in write_auth_file and parsing of the auth file.

In particular, make hba.c cope with zero-length tokens, which it
never did properly before.  Also, enforce rolcanlogin.
This commit is contained in:
Tom Lane
2005-06-28 22:16:45 +00:00
parent 0eaa36a16a
commit 6561372c57
4 changed files with 236 additions and 148 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.153 2005/06/28 19:51:22 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.154 2005/06/28 22:16:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -859,6 +859,9 @@ RenameRole(const char *oldname, const char *newname)
ReleaseSysCache(oldtuple);
heap_close(rel, NoLock);
/*
* Set flag to update flat auth file at commit.
*/
auth_file_update_needed();
}
@ -902,6 +905,11 @@ GrantRole(GrantRoleStmt *stmt)
stmt->grantee_roles, grantee_ids,
stmt->admin_opt);
}
/*
* Set flag to update flat auth file at commit.
*/
auth_file_update_needed();
}
/*