NetBSD-Bugs archive

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

kern/41236: tmpfs_rename doesn't handle hardlinks correctly



>Number:         41236
>Category:       kern
>Synopsis:       tmpfs_rename doesn't handle hardlinks correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 17 02:35:00 +0000 2009
>Originator:     YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost>
>Release:        NetBSD 5.99.10
>Organization:

>Environment:
        
        
System: NetBSD kaeru 5.99.10
Architecture: i386
Machine: i386
>Description:
        tmpfs_rename() doesn't handle hardlinks correctly.

        /* If source and target are the same file, there is nothing to do. */
        if (fvp == tvp) {
                error = 0;
                goto out;
        }

        actually, it should remove the "from" link in that case.

>How-To-Repeat:

        % ls
        % touch a
        % ln a b
        % mv a b
        % ls
        a  b
        % 

>Fix:

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index