diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-05 12:58:59 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-05 12:58:59 +0100 |
commit | d13a7457bd7276a29b02b0cb9b00c363dafcb0e1 (patch) | |
tree | 3e8dd6ce98a7a087a153ba048c3ce343bb422298 /vdr.c | |
parent | 0de4b0b043f75725487b3db77b8e176273ff418a (diff) | |
download | vdr-d13a7457bd7276a29b02b0cb9b00c363dafcb0e1.tar.gz vdr-d13a7457bd7276a29b02b0cb9b00c363dafcb0e1.tar.bz2 |
Enabled generating a core dump if VDR is run with a different user id
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.248 2006/02/04 14:49:12 kls Exp $ + * $Id: vdr.c 1.249 2006/02/05 12:57:10 kls Exp $ */ #include <getopt.h> @@ -97,6 +97,10 @@ static bool SetUser(const char *UserName) fprintf(stderr, "vdr: cannot set user id %u: %s\n", (unsigned int)user->pw_uid, strerror(errno)); return false; } + if (prctl(PR_SET_DUMPABLE, 2, 0, 0, 0) < 0) { + fprintf(stderr, "vdr: warning - cannot set dumpable: %s\n", strerror(errno)); + // always non-fatal, and will not work with kernel < 2.6.13 + } } return true; } |