Permalink
Browse files

okssld calls setuid() which means we need to call prctl(PR_SET_DUMPAB…

…LE) in order to get coredumps from it under linux
  • Loading branch information...
1 parent 9e9119f commit 33022eb5bb79bf82077e09177de09dbc49dd1e12 @mmaxim mmaxim committed Nov 1, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 ssld/okssld.T
View
@@ -12,6 +12,10 @@
#include "tame_connectors.h"
#include "tame_io.h"
+#ifdef HAVE_LINUX_PRCTL_DUMP
+# include <sys/prctl.h>
+#endif /* HAVE_LINUX_PRCTL_DUMP */
+
//-----------------------------------------------------------------------
namespace okssl {
@@ -396,6 +400,13 @@ namespace okssl {
ret = true;
}
}
+
+#ifdef HAVE_LINUX_PRCTL_DUMP
+ if (prctl (PR_SET_DUMPABLE, 1) != 0) {
+ warn ("prctl(PR_SET_DUMPABLE, 1) failed: %m\n");
+ }
+#endif /* HAVE_LINUX_PRCTL_DUMP */
+
return ret;
}

0 comments on commit 33022eb

Please sign in to comment.