From 45d8a085662f7689c0b6978cf2e33845f6095000 Mon Sep 17 00:00:00 2001 From: Laszlo Szekeres Date: Fri, 4 Mar 2016 20:33:06 -0500 Subject: Fix SELinux signatures in runtime The SELinux function signatures have changed between version 2.2 and 2.3. In particular, the type of the "security context" parameter was changed from char * to const char *, with the following patch: SELinuxProject/selinux@9eb9c9327563014ad6a807814e7975424642d5b9. Recent Linux distributions (e.g. Ubuntu 15.10) ship with the updated version of libselinux. This change makes the SELinux runtime compatible with the newer versions of the library by replacing security_context_t with its original char * definition and defining it as const only if the installed library does so. Whether the system uses const char * types is detected with the configure script. Fixes klee/klee#303. --- include/klee/Config/config.h.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/klee/Config/config.h.in b/include/klee/Config/config.h.in index 9adf7306..008b2f90 100644 --- a/include/klee/Config/config.h.in +++ b/include/klee/Config/config.h.in @@ -69,6 +69,10 @@ /* Z3 needs a Z3_context passed to Z3_get_error_msg() */ #undef HAVE_Z3_GET_ERROR_MSG_NEEDS_CONTEXT +/* Define to empty or 'const' depending on how SELinux qualifies its security + context parameters. */ +#undef KLEE_SELINUX_CTX_CONST + /* LLVM version is release (instead of development) */ #undef LLVM_IS_RELEASE -- cgit 1.4.1