Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: rgw: DUMPABLE flag is cleared by setuid preventing coredumps #13845

Merged
merged 1 commit into from Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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