lkml.org 
[lkml]   [1996]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: How does chown(2) works with symlinks?

    >> Linus wrote:
    >>If you use "chown()" on the pathname it will change the synlink itself

    > This also protects against all sorts of nasty games with symlinks,
    > for example the well - known xterm bug, where the program did, as root,

    > open("somefile");
    > <=== user could do a "rm somefile; ln -s /etc/profile somefile"
    > chown(user,group,"somefile");

    I don't know this problem; a race-condition in the xterm code.

    When symlinks were first introduced, in some implementations the support
    was less than perfect. Setting .plan to be a symlink to an unaccessible
    file and then 'finger usrname', and a nice race condition with some
    printer daemons. Not the kernel's fault, and definitly not the fault
    of chown(2) for following symlinks in those implementations :)

    markhe


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