The following changes enable coredumps.
diff -r ead18326c13b osaf/libs/core/common/daemon.c
--- a/osaf/libs/core/common/daemon.c Fri Sep 26 08:53:42 2014 +0200
+++ b/osaf/libs/core/common/daemon.c Wed Oct 01 23:14:08 2014 +0000
@@ -31,6 +31,7 @@
#include <limits.h>
#include <sys/stat.h>
#include <sys/file.h>
+#include <sys/prctl.h>
#include <configmake.h>
@@ -324,6 +325,7 @@
syslog(LOG_ERR, "setuid failed, uid=%d (%s)", pw->pw_uid,
strerror(errno));
exit(EXIT_FAILURE);
}
+ prctl(PR_SET_DUMPABLE, 1,0,0,0);
} else {
syslog(LOG_ERR, "invalid user name %s", __runas_username);
exit(EXIT_FAILURE);
diff -r ead18326c13b osaf/services/infrastructure/nid/scripts/opensafd.in
--- a/osaf/services/infrastructure/nid/scripts/opensafd.in Fri Sep 26
08:53:42 2014 +0200
+++ b/osaf/services/infrastructure/nid/scripts/opensafd.in Wed Oct 01
23:14:08 2014 +0000
@@ -98,12 +98,19 @@
}
enable_coredump() {
+ core_destination="/var/crash/opensaf"
core_size="unlimited"
core_pattern="/var/crash/opensaf/core_%t.%e.%p"
- if [ ! -d /var/crash/opensaf ]; then
- mkdir -p /var/crash/opensaf
- fi
+ if [ ! -d ${core_destination} ]; then
+ mkdir -p ${core_destination}
+ if [ -n "$OPENSAF_GROUP" ]; then
+ getent group $OPENSAF_GROUP > /dev/null && chgrp
$OPENSAF_GROUP ${core_destination}
+ fi
+ if [ -n "$OPENSAF_USER" ]; then
+ getent passwd $OPENSAF_USER > /dev/null && chown
$OPENSAF_USER ${core_destination}
+ fi
+ fi
if [ `ulimit -c` = 0 ]; then
ulimit -c $core_size
---
** [tickets:#230] core files are not getting formed for opensaf processes
running with user opensaf**
**Status:** unassigned
**Milestone:** future
**Created:** Wed May 15, 2013 10:42 AM UTC by Mathi Naickan
**Last Updated:** Fri Jul 26, 2013 11:07 AM UTC
**Owner:** nobody
Opensaf is running with user opensaf. Now did a 'kill -6 <pid>' of one of the
processes running with opensaf user. When tried the command on Node Directors,
they restarted but no corefile is observed in /var/crash/opensaf. When other
processes which are running with other users are killed, core file got
generated.
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets