[vdr] creating core dumps with 1.3.42

leo2 at pec.homeip.net leo2 at pec.homeip.net
Thu Feb 16 20:01:01 CET 2006


The current function to activate core-dumps for vdr running setuid ist only 
working for kernel > 2.6.13 ( says the comment in vdr.c ).
Actualy it is not working for 2.4.21 but it was easy an easy change, just 
replace
	prctl(PR_SET_DUMPABLE, 2, 0, 0, 0)
with 
	prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)

If you need the switch with "2" ( what does "2" mean for >2.6.13 ??) It could 
do something like:

if (prctl(PR_SET_DUMPABLE, 2, 0, 0, 0) < 0) {
  if (prctl(PR_SET_DUMPABLE, 1, 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
  }
}




More information about the vdr mailing list