/bin/rm: fix removing symlinks with uchg/uappnd set
One error case described in FreeBSD PR bin/111226:
/bin/rm when running as super user and failing to unlink a
UF_APPEND|UF_IMMUTABLE protected symbolic link will reset the
UF_APPEND and UF_IMMUTABLE flags on the symbolic link's target (if
that target exists) - an object that /bin/rm should not touch! (Quote
from SUSv3: "The rm utility removes symbolic links themselves, not
the files they refer to, as a consequence of the dependence on the
unlink() functionality").
There was a failure case for /usr/bin/find as well, but swildner
recently synchronized find with FreeBSD and fixed that one.
Taken-from: FreeBSD SVN 193087 (30 MAY 2009)