Skip to content

Commit

Permalink
Merge pull request #13845 from smithfarm/wip-19147-kraken
Browse files Browse the repository at this point in the history
kraken: rgw: DUMPABLE flag is cleared by setuid preventing coredumps

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
  • Loading branch information
smithfarm committed Apr 12, 2017
2 parents 5abdffe + e40f48d commit cfed98a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rgw/rgw_main.cc
Expand Up @@ -64,6 +64,10 @@
#include "include/types.h"
#include "common/BackTrace.h"

#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif

#define dout_subsys ceph_subsys_rgw

using namespace std;
Expand Down Expand Up @@ -517,6 +521,12 @@ int main(int argc, const char **argv)
realm_watcher.add_watcher(RGWRealmNotify::Reload, reloader);
realm_watcher.add_watcher(RGWRealmNotify::ZonesNeedPeriod, pusher);

#if defined(HAVE_SYS_PRCTL_H)
if (prctl(PR_SET_DUMPABLE, 1) == -1) {
cerr << "warning: unable to set dumpable flag: " << cpp_strerror(errno) << std::endl;
}
#endif

wait_shutdown();

derr << "shutting down" << dendl;
Expand Down

0 comments on commit cfed98a

Please sign in to comment.