Symbolic links can be anything because a symbol can represent any number of things, to any number of programs/OS's/people. Like symbols in the physical world, a symbol can be made of anything and be made for anything. Their is no need for validation as the target already exists on the system and or the user would have access to it via their privilege any way.
If you really want that behavior to stop. You could create a script to check if it is going to point to it self and return an error if it does and create the link if it doesn't. After the script is made then you can create an alias for ln that points to your script.
Could look something like the following:
#!/bin/bash
if [ "$1" == "$2" ]
then
echo "ERROR pointing to self!"
else
ln "$1" "$2"
fi
ln
that way that I would check if the new symbolic link triggers the error and print - at least - a warning. My question is why is the obvious useless constellation allowed.mv
,cp
, etc. all check and print an error for this condition, which, contrary to what you say, it's not an "erroneous modification of the file system" (symlinks by definition, are not validated and can contain anything).