Re: Bad file access on the rise

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

 



On Sun, Jun 09, 2013 at 11:05:44AM -0400, Doug Ledford wrote:

> And really, we've spent more time on this thread than it would take
> Lennart to fix PA.  Just a quick stat and check of uid before trying to
> remove the stale files and this would all go away.  Sure, your stat and
> remove could race, but this is nothing more than a garbage collection
> process anyway, so who cares?  We'll just get it next time.

"Stat and then open" is inherently open to race conditions. In this 
specific case it probably doesn't realistically matter, but it's not 
behaviour that should be encouraged. The only way to know for certain 
whether you're going to be able to open or unlink a file is to attempt 
to open or unlink that file, and we shouldn't encourage people to think 
otherwise.

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux