Skip Menu |
 

This queue is for tickets about the File-Permissions-Unix CPAN distribution.

Report information
The Basics
Id: 104370
Status: resolved
Priority: 0/
Queue: File-Permissions-Unix

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

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



Subject: Race in setModeFromFile()
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-17909-1431417033-1597.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 317
Download (untitled) / with headers
text/plain 317b
The setModeFromFile() first checks if source file exists and then stats the file and finally it uses the obtained mode. If the file is removed between the check and stat(), bad things will happen. I recommend completely remove the check for file existence and check if the stat() succeeded (returned non-empty list).
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17909-1431417033-1597.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-17909-1431417033-1597.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4033-1452344158-1170.104370-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 95
Bump to 0.1.0 to fix this. This also depreciates error 3. This also affects the method chmod.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.