September 11 2017 | File::Path Security | Back Next |
But wait a minute! Is insufficient permissions the only reason we might be unable to chdir into $root?
No! What if, between here:
my ( $ldev, $lino, $perm ) = ( lstat $root )[ 0, 1, 2 ]
... and here:
if ( !chdir($root) ) {
... another process snuck in and changed what $root was
... perhaps from a directory to a symlink to a plain-text file?
Home Last TOC | Copyright © 2017 James E Keenan | Back Next |