forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit661dd23
committed
Restrict access to reindex of shared catalogs for non-privileged users
A database owner running a database-level REINDEX has the possibility toalso do the operation on shared system catalogs without being an ownerof them, which allows him to block resources it should not have accessto. The same goes for a schema owner. For example, PostgreSQL would gounresponsive and even block authentication if a lock is waited forpg_authid. This commit makes sure that a user running a REINDEX SYSTEM,DATABASE or SCHEMA only works on the following relations:- The user is a superuser- The user is the table owner- The user is the database/schema owner, only if the relation worked onis not shared.Robert has worded most the documentation changes, and I have coded thecore part.Reported-by: Lloyd Albin, Jeremy SchneiderAuthor: Michael Paquier, Robert HaasReviewed by: Nathan Bossart, Kyotaro HoriguchiDiscussion:https://postgr.es/m/152512087100.19803.12733865831237526317@wrigleys.postgresql.orgDiscussion:https://postgr.es/m/20180805211059.GA2185@paquier.xyzBackpatch-through: 11- as the current behavior has been around for avery long time and could be disruptive for already released branches.1 parent59ef49d commit661dd23
File tree
2 files changed
+21
-4
lines changed- doc/src/sgml/ref
- src/backend/commands
2 files changed
+21
-4
lines changedLines changed: 9 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
232 | 237 |
| |
233 | 238 |
| |
234 | 239 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2415 | 2415 |
| |
2416 | 2416 |
| |
2417 | 2417 |
| |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
2418 | 2430 |
| |
2419 | 2431 |
| |
2420 | 2432 |
| |
|
0 commit comments
Comments
(0)