From 1de9a257a0cf9458857b8f98e54dad5213168bd2 Mon Sep 17 00:00:00 2001 From: William Roberts Date: Mon, 23 Mar 2020 12:20:39 -0500 Subject: [PATCH] libsemanage/Makefile: add -fno-semantic-interposition Add -fno-semantic-interposition to CFLAGS. This will restore the DSO infrastructures protections to insure internal callers of exported symbols call into libselinux and not something loading first in the library list. Clang has this enabled by default. Acked-by: Stephen Smalley Signed-off-by: William Roberts --- libsemanage/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index f6780dc6..606ce1c6 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -53,7 +53,8 @@ SRCS= $(filter-out $(GENERATED),$(sort $(wildcard *.c))) OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo -CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute +CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute \ + -fno-semantic-interposition SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ -Wno-unused-parameter