From 6a7f3fa4b4b5c61ee3d130672d5e37eeb2e279ff Mon Sep 17 00:00:00 2001 From: deuce <> Date: Tue, 29 Aug 2006 00:55:23 +0000 Subject: [PATCH] thread_suid_broken symbol must be in libsbbs.so. This suggests that the test for NPTL should be in there too and that every app which uses threads, set*id(), and libsbbs.so should call it. Does jsexec do this? If not, should it? --- src/sbbs3/main.cpp | 3 +++ src/sbbs3/sbbs.h | 6 ++++++ src/sbbs3/sbbscon.c | 4 ---- src/sbbs3/sbbscon.h | 10 ---------- 4 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 src/sbbs3/sbbscon.h diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index e3ac019d7f..d3d364a02c 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -91,6 +91,9 @@ static WORD last_node; static bool terminate_server=false; static str_list_t recycle_semfiles; static str_list_t shutdown_semfiles; +#ifdef _THREAD_SUID_BROKEN +int thread_suid_broken=TRUE; /* NPTL is no longer broken */ +#endif extern "C" { diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index a754d7f9a5..79be76860f 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -69,6 +69,12 @@ #endif +#ifdef _THREAD_SUID_BROKEN +extern int thread_suid_broken; /* NPTL is no longer broken */ +#else +#define thread_suid_broken FALSE +#endif + /******************/ /* ANSI C Library */ /******************/ diff --git a/src/sbbs3/sbbscon.c b/src/sbbs3/sbbscon.c index 33db19a6bd..cbb26eadf2 100644 --- a/src/sbbs3/sbbscon.c +++ b/src/sbbs3/sbbscon.c @@ -200,10 +200,6 @@ static const char* web_usage = "Web server settings:\n" "\tw- disable Web server (no services module)\n" "\n" ; -#ifdef _THREAD_SUID_BROKEN -int thread_suid_broken=TRUE; /* NPTL is no longer broken */ -#endif - static int lputs(int level, char *str) { static pthread_mutex_t mutex; diff --git a/src/sbbs3/sbbscon.h b/src/sbbs3/sbbscon.h deleted file mode 100644 index 090111bd79..0000000000 --- a/src/sbbs3/sbbscon.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _SBBSCON_H_ -#define _SBBSCON_H_ - -#ifdef _THREAD_SUID_BROKEN -extern int thread_suid_broken; /* NPTL is no longer broken */ -#else -#define thread_suid_broken FALSE -#endif - -#endif -- GitLab