summaryrefslogtreecommitdiff
path: root/security/sssd2/files/patch-src__util__server.c
blob: b8901158149cbb2bc6265b5686a222f582a123b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- src/util/server.c.orig	2024-01-12 12:05:40 UTC
+++ src/util/server.c
@@ -30,17 +30,12 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <signal.h>
-#include <sys/prctl.h>
 #include <ldb.h>
 #include "util/util.h"
 #include "confdb/confdb.h"
 #include "util/sss_chain_id.h"
 #include "util/sss_chain_id_tevent.h"
 
-#ifdef HAVE_PRCTL
-#include <sys/prctl.h>
-#endif
-
 static TALLOC_CTX *autofree_ctx;
 
 static void server_atexit(void)
@@ -317,10 +312,13 @@ static void setup_signals(void)
     BlockSignals(false, SIGTERM);
 
 #ifndef HAVE_PRCTL
-        /* If prctl is not defined on the system, try to handle
-         * some common termination signals gracefully */
+    /* If prctl is not defined on the system, try to handle
+     * some common termination signals gracefully */
+    (void) sig_segv_abrt; /* unused */
+    /*
     CatchSignal(SIGSEGV, sig_segv_abrt);
     CatchSignal(SIGABRT, sig_segv_abrt);
+    */
 #endif
 
 }
@@ -749,6 +747,8 @@ int server_setup(const char *name, bool is_responder,
         DEBUG(SSSDBG_FATAL_FAILURE, "Failed to determine "CONFDB_MONITOR_DUMPABLE"\n");
         return ret;
     }
+
+#ifdef HAVE_PRCTL
     ret = prctl(PR_SET_DUMPABLE, dumpable ? 1 : 0);
     if (ret != 0) {
         DEBUG(SSSDBG_CRIT_FAILURE, "Failed to set PR_SET_DUMPABLE\n");
@@ -756,6 +756,7 @@ int server_setup(const char *name, bool is_responder,
     } else if (!dumpable) {
         DEBUG(SSSDBG_IMPORTANT_INFO, "Core dumps are disabled!\n");
     }
+#endif
 
     sss_chain_id_setup(ctx->event_ctx);