creating core dumps with 1.3.42

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
  }
}



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux