Skip Menu |

This queue is for tickets about the Module-Find CPAN distribution.

Report information
The Basics
Id: 99055
Status: resolved
Priority: 0/
Queue: Module-Find

People
Owner: crenz [...] cpan.org
Requestors: ralf [...] camperquake.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.14



Subject: Don't check for file readability in _find
Date: Mon, 22 Sep 2014 18:08:40 +0200
To: bug-Module-Find [...] rt.cpan.org
From: Ralf Ertzinger <ralf [...] camperquake.de>
Version: 0.11 Perl version: 5.18.2 Linux 3.15.10 Module::Find is checking for file readability in _find() (via _wanted()) (/usr/share/perl5/vendor_perl/Module/Find.pm +164) This check is inaccurate in several ways in the presence of modern system capabilities like POSIX ACLs, SeLinux or AppArmor. - False negatives: a file is considered unreadable (and is thus ignored by for example findallmod()) even though it is readable by the user (happens when POSIX ACLs are used) - False positives: a file is considered readable even though it is not (happens when SeLinux or AppArmor are used) - The file permissions might change between calling findallmod() and the caller actually acting on the list Handling eventual failure in reading the files should be left to the caller which is best equipped to deal with it (it already has to take other kinds of read errors into account).
On Mon Sep 22 12:09:00 2014, ralf@camperquake.de wrote: Show quoted text
> Version: 0.11 > Perl version: 5.18.2 > Linux 3.15.10 > > Module::Find is checking for file readability in _find() (via _wanted()) > (/usr/share/perl5/vendor_perl/Module/Find.pm +164) > > This check is inaccurate in several ways in the presence of > modern system capabilities like POSIX ACLs, SeLinux or AppArmor. > > - False negatives: a file is considered unreadable (and is thus > ignored by for example findallmod()) even though it is readable by > the user (happens when POSIX ACLs are used) > > - False positives: a file is considered readable even though it is > not (happens when SeLinux or AppArmor are used) > > - The file permissions might change between calling findallmod() > and the caller actually acting on the list > > Handling eventual failure in reading the files should be left to > the caller which is best equipped to deal with it (it already has > to take other kinds of read errors into account).
Pull request for removing the readability check: https://github.com/crenz/Module-Find/pull/4 Cheers, Moritz
On 2015-01-01 08:07:52, MORITZ wrote: Show quoted text
> > Handling eventual failure in reading the files should be left to > > the caller which is best equipped to deal with it (it already has > > to take other kinds of read errors into account).
> > Pull request for removing the readability check: > https://github.com/crenz/Module-Find/pull/4
I don't think this should be changed for everyone by default. Instead, a configuration variable should be added (that defaults to the current behaviour) that the user can alter.
I've decided to take over the pull request and add it as default behavior. Let's see what user feedback is on this one.