[Bug 200735] creating softlink does not check for source file existence or corruption

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=200735

Theodore Tso (tytso@xxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tytso@xxxxxxx
         Resolution|---                         |INVALID

--- Comment #3 from Theodore Tso (tytso@xxxxxxx) ---
This is working as intended.  All a symbolic link is a text string which is
interpreted at the time that the symbolic link is dereferenced (e.g., when you
try to open a pathname that contains a symbolic link).   

The destination of the symlink doesn't even need to exist.  In fact, it's not
checked at all:

% ln -s "When in the Course of human events, it becomes necessary for one
people to dissolve the political bands which have connected them with another,
and to assume among the powers of the earth, the separate and equal station to
which the Laws of Nature and of Nature’s God entitle them, a decent respect to
the opinions of mankind requires that they should declare the causes which
impel them to the separation." test-link

% ls -l test-link 
4 lrwxrwxrwx 1 tytso tytso 408 Aug  5 18:43 test-link -> 'When in the Course of
human events, it becomes necessary for one people to dissolve the political
bands which have connected them with another, and to assume among the powers of
the earth, the separate and equal station to which the Laws of Nature and of
Nature’s God entitle them, a decent respect to the opinions of mankind requires
that they should declare the causes which impel them to the separation.'

% cat test-link
cat: test-link: File name too long

As you can see, we don't even try to evaluate the symlink to see if it is a
valid file name (filenames can not be longer than 255 characters, and this is
408 characters).

This is all working as intended and in fact it is what is required by the POSIX
standard.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux