From ce7eb8d4ffdd3d11f6364fe6bc3d2acb04c31d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Sat, 21 Sep 2024 20:07:54 -0400 Subject: [PATCH] Call elfctl -e +noprotmax in binaries that do JS Prevents crashes on modern FreeBSD systems that default to implicit PROT_MAX in the JS code. (It's possible that +wxneeded will be needed too.. still experimenting) --- src/sbbs3/GNUmakefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sbbs3/GNUmakefile b/src/sbbs3/GNUmakefile index 5982cc3fa3..0124845942 100644 --- a/src/sbbs3/GNUmakefile +++ b/src/sbbs3/GNUmakefile @@ -175,6 +175,10 @@ $(SBBS): $(JS_DEPS) $(CRYPT_DEPS) $(OBJS) $(LIBS) $(EXTRA_SBBS_DEPENDS) $(ENCODE ifeq ($(os), netbsd) paxctl +m $(SBBS) endif +ifeq ($(os), freebsd) + elfctl -e +noprotmax $(SBBS) +endif + # FTP Server Link Rule $(FTPSRVR): $(MTOBJODIR)/ftpsrvr.o @@ -263,6 +267,9 @@ $(JSDOOR): $(JSDOOR_OBJS) $(XPDEV_LIB) $(ENCODE_LIB) $(HASH_LIB) $(CIOLIB-MT) | ifeq ($(os), netbsd) paxctl +m $(JSDOOR) endif +ifeq ($(os), freebsd) + elfctl -e +noprotmax $(JSDOOR) +endif # JSEXEC $(JSEXEC): $(JSEXEC_OBJS) $(SBBS) $(CIOLIB-MT) | $(EXEODIR) @@ -271,6 +278,9 @@ $(JSEXEC): $(JSEXEC_OBJS) $(SBBS) $(CIOLIB-MT) | $(EXEODIR) ifeq ($(os), netbsd) paxctl +m $(JSEXEC) endif +ifeq ($(os), freebsd) + elfctl -e +noprotmax $(JSDOOR) +endif # ANS2ASC $(ANS2ASC): $(OBJODIR)/ans2asc.o $(OBJODIR)/sauce.o $(XPDEV_LIB) | $(EXEODIR) -- GitLab