mirror of
https://github.com/postgres/postgres.git
synced 2026-02-20 08:20:55 -05:00
Use SELinux "db_table: { truncate }" to check if permission is granted to
TRUNCATE. Update example SELinux policy to grant needed permission for
TRUNCATE. Add new regression test to demonstrate a positive and negative
cases. Test will only be run if the loaded SELinux policy has the
"db_table: { truncate }" permission. Makes use of recent commit which added
object TRUNCATE hook. Patch by Yuli Khodorkovskiy with minor
editorialization by me. Not back-patched because the object TRUNCATE hook
was not.
Author: Yuli Khodorkovskiy
Reviewed-by: Joe Conway
Discussion: https://postgr.es/m/CAFL5wJcomybj1Xdw7qWmPJRpGuFukKgNrDb6uVBaCMgYS9dkaA%40mail.gmail.com
|
||
|---|---|---|
| .. | ||
| expected | ||
| sql | ||
| .gitignore | ||
| database.c | ||
| dml.c | ||
| hooks.c | ||
| label.c | ||
| launcher | ||
| Makefile | ||
| proc.c | ||
| relation.c | ||
| schema.c | ||
| selinux.c | ||
| sepgsql-regtest.te | ||
| sepgsql.h | ||
| sepgsql.sql.in | ||
| test_sepgsql | ||
| uavc.c | ||