mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Allow sepgsql labels to depend on object name.
The main change here is to call security_compute_create_name_raw() rather than security_compute_create_raw(). This ups the minimum requirement for libselinux from 2.0.99 to 2.1.10, but it looks like most distributions will have picked that up before 9.3 is out. KaiGai Kohei
This commit is contained in:
24
configure
vendored
24
configure
vendored
@ -9710,9 +9710,9 @@ fi
|
||||
# for contrib/sepgsql
|
||||
if test "$with_selinux" = yes; then
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for selinux_status_open in -lselinux" >&5
|
||||
$as_echo_n "checking for selinux_status_open in -lselinux... " >&6; }
|
||||
if test "${ac_cv_lib_selinux_selinux_status_open+set}" = set; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for security_compute_create_name in -lselinux" >&5
|
||||
$as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
|
||||
if test "${ac_cv_lib_selinux_security_compute_create_name+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
@ -9730,11 +9730,11 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char selinux_status_open ();
|
||||
char security_compute_create_name ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return selinux_status_open ();
|
||||
return security_compute_create_name ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@ -9760,12 +9760,12 @@ $as_echo "$ac_try_echo") >&5
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then
|
||||
ac_cv_lib_selinux_selinux_status_open=yes
|
||||
ac_cv_lib_selinux_security_compute_create_name=yes
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_selinux_selinux_status_open=no
|
||||
ac_cv_lib_selinux_security_compute_create_name=no
|
||||
fi
|
||||
|
||||
rm -rf conftest.dSYM
|
||||
@ -9773,9 +9773,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_selinux_status_open" >&5
|
||||
$as_echo "$ac_cv_lib_selinux_selinux_status_open" >&6; }
|
||||
if test "x$ac_cv_lib_selinux_selinux_status_open" = x""yes; then
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
|
||||
$as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
|
||||
if test "x$ac_cv_lib_selinux_security_compute_create_name" = x""yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBSELINUX 1
|
||||
_ACEOF
|
||||
@ -9783,8 +9783,8 @@ _ACEOF
|
||||
LIBS="-lselinux $LIBS"
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:$LINENO: error: library 'libselinux', version 2.0.99 or newer, is required for SELinux support" >&5
|
||||
$as_echo "$as_me: error: library 'libselinux', version 2.0.99 or newer, is required for SELinux support" >&2;}
|
||||
{ { $as_echo "$as_me:$LINENO: error: library 'libselinux', version 2.1.10 or newer, is required for SELinux support" >&5
|
||||
$as_echo "$as_me: error: library 'libselinux', version 2.1.10 or newer, is required for SELinux support" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user