Recent pg_regress changes break testing under SELinux

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Recent pg_regress changes break testing under SELinux
Дата
Msg-id 11718.1200684807@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Recent pg_regress changes break testing under SELinux  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Who decided this part of pg_regress.c was a good idea?
/* try to create the test tablespace dir if it doesn't exist */snprintf(testtablespace, MAXPGPATH, "%s/testtablespace",
abs_builddir);if(directory_exists(testtablespace))    rmtree(testtablespace, true);make_directory(testtablespace);
 

The regression test Makefile is responsible for preparing that
directory, not pg_regress.  This is important because in the Postgres
RPMs, we have to be careful to appease SELinux:

# The tests command the server to write into testtablespace and results.
# On a SELinux-enabled system this will fail unless we mark those directories
# as writable by the server.
cleandirs:-rm -rf testtablespace resultsmkdir testtablespace results[ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u
-robject_r -t postgresql_db_t testtablespace results
 

By blowing away the directory and remaking it, pg_regress causes this
carefully-applied labeling to be lost.

As far as I can see the rmtree/make_directory thrashing is useless, and
I'm going to remove it unless a pretty good counter-argument is made.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: testing result overview (was: 8.3 beta testing suggestions welcome)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal: generic function, constructor function