forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit602a9ef
committed
Make LOAD of an already-loaded library into a no-op, instead of attempting
to unload and re-load the library.The difficulty with unloading a library is that we haven't defined safeprotocols for doing so. In particular, there's no safe mechanism forgetting out of a "hook" function pointer unless libraries are unloadedin reverse order of loading. And there's no mechanism at all for undefininga custom GUC variable, so GUC would be left with a pointer to an old valuethat might or might not still be valid, and very possibly wouldn't be inthe same place anymore.While the unload and reload behavior had some usefulness in easingdevelopment of new loadable libraries, it's of no use whatever to normalusers, so just disabling it isn't giving up that much. Someday we mightcare to expend the effort to develop safe unload protocols; but even ifwe did, there'd be little certainty that every third-party loadable modulewas following them, so some security restrictions would still be needed.Back-patch to 8.2; before that, LOAD was superuser-only anyway.Security: unprivileged users could crash backend. CVE not assigned yet1 parent187e5d8 commit602a9ef
File tree
4 files changed
+23
-19
lines changed- doc/src/sgml
- ref
- src/backend/utils/fmgr
4 files changed
+23
-19
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
528 | 528 |
| |
529 | 529 |
| |
530 | 530 |
| |
531 |
| - | |
532 |
| - | |
| 531 | + | |
533 | 532 |
| |
534 | 533 |
| |
535 | 534 |
| |
|
Lines changed: 8 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 |
| |
40 | 39 |
| |
41 | 40 |
| |
|
Lines changed: 4 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
1481 | 1481 |
| |
1482 | 1482 |
| |
1483 | 1483 |
| |
1484 |
| - | |
1485 |
| - | |
1486 |
| - | |
| 1484 | + | |
1487 | 1485 |
| |
1488 | 1486 |
| |
1489 | 1487 |
| |
| |||
1509 | 1507 |
| |
1510 | 1508 |
| |
1511 | 1509 |
| |
1512 |
| - | |
1513 |
| - | |
| 1510 | + | |
| 1511 | + | |
1514 | 1512 |
| |
1515 | 1513 |
| |
1516 | 1514 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
385 | 385 |
| |
386 | 386 |
| |
387 | 387 |
| |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
388 | 394 |
| |
389 | 395 |
| |
390 | 396 |
| |
391 | 397 |
| |
| 398 | + | |
392 | 399 |
| |
393 | 400 |
| |
394 | 401 |
| |
| |||
436 | 443 |
| |
437 | 444 |
| |
438 | 445 |
| |
| 446 | + | |
439 | 447 |
| |
440 | 448 |
| |
441 | 449 |
| |
|
0 commit comments
Comments
(0)