Commit 5ecc0d7
committed
Restrict lo_import()/lo_export() via SQL permissions not hard-wired checks.
While it's generally unwise to give permissions on these functions to
anyone but a superuser, we've been moving away from hard-wired permission
checks inside functions in favor of using the SQL permission system to
control access. Bring lo_import() and lo_export() into compliance with
that approach.
In particular, this removes the manual configuration option
ALLOW_DANGEROUS_LO_FUNCTIONS. That dates back to 1999 (commit 4cd4a54);
it's unlikely anyone has used it in many years. Moreover, if you really
want such behavior, now you can get it with GRANT ... TO PUBLIC instead.
Michael Paquier
Discussion: https://postgr.es/m/CAB7nPqRHmNOYbETnc_2EjsuzSM00Z+BWKv9sy6tnvSd5gWT_JA@mail.gmail.com1 parent 6c3a7ba commit 5ecc0d7
File tree
6 files changed
+19
-31
lines changed- src
- backend
- catalog
- libpq
- include
- catalog
- test/regress
- expected
- sql
6 files changed
+19
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| 1118 | + | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | 1122 | | |
1122 | 1123 | | |
1123 | 1124 | | |
| 1125 | + | |
1124 | 1126 | | |
1125 | 1127 | | |
1126 | 1128 | | |
| |||
1138 | 1140 | | |
1139 | 1141 | | |
1140 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1141 | 1147 | | |
1142 | 1148 | | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1143 | 1153 | | |
1144 | 1154 | | |
1145 | 1155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | 451 | | |
460 | 452 | | |
461 | 453 | | |
| |||
514 | 506 | | |
515 | 507 | | |
516 | 508 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | 509 | | |
526 | 510 | | |
527 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 75 | | |
86 | 76 | | |
87 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | | - | |
1362 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1363 | 1366 | | |
1364 | 1367 | | |
1365 | 1368 | | |
| |||
1388 | 1391 | | |
1389 | 1392 | | |
1390 | 1393 | | |
1391 | | - | |
1392 | | - | |
| 1394 | + | |
1393 | 1395 | | |
1394 | 1396 | | |
1395 | 1397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
842 | 844 | | |
843 | 845 | | |
844 | 846 | | |
| |||
0 commit comments