09af57c Fix following symlinks when processing the fixup list

Authored and Committed by odubaj 2 years ago
    Fix following symlinks when processing the fixup list
    
    The previous fix in b41daecb5 was incomplete. Fixup entries are
    given the original path without calling cleanup_pathname().
    To make sure we don't follow a symlink, we must strip trailing
    slashes from the path.
    
    The fixup entries are always directories. Make sure we try to modify
    only directories by providing O_DIRECTORY to open() (if supported)
    and if it fails to check directory via lstat().
    
        
file modified
+6 -1