Skip to content

Commit

Permalink
Merge pull request #13657 from badone/wip-rgw-setuid-no-coredump
Browse files Browse the repository at this point in the history
rgw: set dumpable flag after setuid post ff0e521

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
  • Loading branch information
badone committed Mar 1, 2017
2 parents 8d179d2 + bc458d3 commit f321309
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 @@ -532,6 +536,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 f321309

Please sign in to comment.