pgsql: Simplify validate_exec() by using access(2) to check file
В списке pgsql-committers по дате отправления:
| От | tgl@postgresql.org (Tom Lane) |
|---|---|
| Тема | pgsql: Simplify validate_exec() by using access(2) to check file |
| Дата | |
| Msg-id | 20100114001406.723627541B9@cvs.postgresql.org обсуждение исходный текст |
| Ответы |
Re: pgsql: Simplify validate_exec() by using
access(2) to check file
|
| Список | pgsql-committers |
Log Message:
-----------
Simplify validate_exec() by using access(2) to check file permissions,
rather than trying to implement the equivalent logic by hand. The motivation
for the original coding appears to have been to check with the effective uid's
permissions not the real uid's; but there is no longer any difference, because
we don't run the postmaster setuid (indeed, main.c enforces that they're the
same). Using access() means we will get it right in situations the original
coding failed to handle, such as ACL-based permissions. Besides it's a lot
shorter, cleaner, and more thread-safe. Per bug #5275 from James Bellinger.
Modified Files:
--------------
pgsql/src/port:
exec.c (r1.66 -> r1.67)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/exec.c?r1=1.66&r2=1.67)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера