lkml.org 
[lkml]   [1998]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 2.1.125 doesn't dump core on SIGSEGV
    On Mon, Oct 19, 1998 at 02:53:26AM +0100, Alan Cox wrote:

    > No its because whoever wrote the code to do the 2.1.x core dump
    > sanity checks was using decaff by mistake. The logic doesnt make
    > sense at all

    I'm currently using Alexander Kjeldaas patch to allow coredumps, and
    its seems sane (dumps with root, not suid, sgid, etc. though).

    The current code will follow link though, so a hard or soft link to
    /etc/passwd somewhere where you might expect root to dump core is
    still very dangerous.

    I think this is probably best solved by stat'ing `core' before:

    dentry = open_namei(corefile, O_CREAT | 2 | O_TRUNC, 0600);

    is executed:

    - if the file is a link, coredumps should fail

    - if the file is a regular file, only one referrence to the inode
    is permissable


    Now, this means tricks like `ln -s /dev/null core' no longer work,
    but in this instance, it doesn't matter.

    Is there some ligitimate reasons why we might want to allow core to
    follow links of write to a file thats has multiple referrences?




    -cw

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:0.019 / U:31.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site