mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 18:43:18 +08:00
Previously, catalog tables were not fully protected from malicious non-superusers. This PR fixes permission handling be severely restricting permissions to the catalog and instead using SECURITY DEFINER functions to alter the catalog when needed without giving users permission to do those same operations outside of these functions. In addition, these functions check for proper permissions themselves so are safe to use. This PR also makes sure that chunk tables have the same owner as the hypertable and correctly handles `ALTER TABLE...OWNER TO` commands to keep this info in sync.
10 lines
229 B
C
10 lines
229 B
C
#ifndef TIMESCALEDB_DDL_UTILS_H
|
|
#define TIMESCALEDB_DDL_UTILS_H
|
|
#include <postgres.h>
|
|
#include <fmgr.h>
|
|
|
|
PG_FUNCTION_INFO_V1(ddl_is_change_owner);
|
|
PG_FUNCTION_INFO_V1(ddl_change_owner_to);
|
|
|
|
#endif /* TIMESCALEDB_DDL_UTILS_H */
|