NetBSD-Bugs archive

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

Re: bin/55815: tar opens device files

On Wed, Nov 25, 2020 at 03:55:01PM +0000, Robert Elz wrote:
>  I am not sure I understand the point here though, why is tar opening
>  files at all if it doesn't plan on reading from them?   Is this some
>  kind of optimisation attempt, where since most files will be regular
>  filesystem files, and will need to be opened, open() then fstat() has
>  one less pathname lookup (namei) than stat() followed when needed by open()
>  (the normal case)?    If so, we should just stop doing that, as it is broken,
>  and revert to the stat()+open() model (where the open only happens if we
>  want the data contained in the file, rather than just its name and attributes).
>  We need that for symnlinks too (ie: the stat() would actually be lstat()),
>  surely.

No, it is about ensuring that the extattr and ACL actually belong to the
same object as the rest of the permissions.


Home | Main Index | Thread Index | Old Index