forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb7e51b3
committed
Make inherited LOCK TABLE perform access permission checks on parent table only.
Previously, LOCK TABLE command through a parent table checkedthe permissions on not only the parent table but also the childrentables inherited from it. This was a bug and inherited queries shouldperform access permission checks on the parent table only. Thiscommit fixes LOCK TABLE so that it does not check the permissionon children tables.This patch is applied only in the master branch. We decided not toback-patch because it's not hard to imagine that there are someapplications expecting the old behavior and the change breaks theirsecurity.Author: Amit LangoteReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/CAHGQGwE+GauyG7POtRfRwwthAGwTjPQYdFHR97+LzA4RHGnJxA@mail.gmail.com1 parent958f9fb commitb7e51b3
File tree
5 files changed
+37
-27
lines changed- src
- backend/commands
- test/regress
- expected
- sql
5 files changed
+37
-27
lines changedLines changed: 11 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| |||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
62 |
| - | |
| 62 | + | |
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
111 |
| - | |
112 |
| - | |
113 |
| - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
114 | 114 |
| |
115 | 115 |
| |
116 |
| - | |
| 116 | + | |
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
127 | 126 |
| |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
137 |
| - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
138 | 130 |
| |
139 |
| - | |
140 | 131 |
| |
141 | 132 |
| |
142 | 133 |
| |
| |||
162 | 153 |
| |
163 | 154 |
| |
164 | 155 |
| |
165 |
| - | |
166 |
| - | |
167 | 156 |
| |
168 | 157 |
| |
169 | 158 |
| |
| |||
241 | 230 |
| |
242 | 231 |
| |
243 | 232 |
| |
244 |
| - | |
| 233 | + | |
245 | 234 |
| |
246 | 235 |
| |
247 | 236 |
| |
|
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
142 |
| - | |
| 141 | + | |
| 142 | + | |
143 | 143 |
| |
144 | 144 |
| |
| 145 | + | |
145 | 146 |
| |
146 |
| - | |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| 151 | + | |
| 152 | + | |
| 153 | + | |
150 | 154 |
| |
151 | 155 |
| |
152 | 156 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
716 | 716 |
| |
717 | 717 |
| |
718 | 718 |
| |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
719 | 726 |
| |
720 | 727 |
| |
721 | 728 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 |
| - | |
105 |
| - | |
| 104 | + | |
| 105 | + | |
106 | 106 |
| |
107 | 107 |
| |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 |
| |
109 | 113 |
| |
110 | 114 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
462 | 468 |
| |
463 | 469 |
| |
464 | 470 |
| |
|
0 commit comments
Comments
(0)