[bug #66374] Permissions errors from unnecessary attemp to read symlink targets
Adam Dinwoodie <[email protected]>
| Newsgroups | gmane.comp.gnu.findutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Follow-up Comment #2, bug #66374 (group findutils):
Yes, you're quite right; I was being imprecise. The program doesn't need to
actually read the symlink target, only check its type.
Nonetheless, find should be able to determine that it does not need to stat
the symlink target, because in all the examples, the -lname predicate is
listed first and will unambiguously determine whether any other tests need to
be performed. The stat call is unnecessary regardless of permissions issues,
and in this particular scenario, causes find to produce errors that it should
be able to avoid.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66374>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZxzviAAKCRCqLAuaBUf3 TjgUAP4nHPuXO+D0On85X1thb0UqrpXFycdqqYrqHzgYJPR2awEAsRgGuhYv9dfH MEwMx0KmmNguI345h7eK9z3qHePPfgU= =lcQe -----END PGP SIGNATURE-----