https://bugs.winehq.org/show_bug.cgi?id=50773
Bug ID: 50773 Summary: SetFileAttributesA(FILE_ATTRIBUTE_READONLY) on a symlink doesn't stick Product: Wine-staging Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: martin@martin.st CC: erich.e.hoover@gmail.com, leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Created attachment 69569 --> https://bugs.winehq.org/attachment.cgi?id=69569 Testcase
Similarly to https://bugs.winehq.org/show_bug.cgi?id=50772 (making directories readonly), calling SetFileAttributesA(FILE_ATTRIBUTE_READONLY) on a symlink and then querying the attributes doesn't show the newly set attribute.
https://bugs.winehq.org/show_bug.cgi?id=50773
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |6.3
https://bugs.winehq.org/show_bug.cgi?id=50773
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #1 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Maybe bug 50772 combined with bug 50766 (Use of non-null terminated string returned by readlink() breaks symlinks handling).
Regards.
https://bugs.winehq.org/show_bug.cgi?id=50773
--- Comment #2 from Erich E. Hoover erich.e.hoover@gmail.com --- I don't believe that there's a straightforward way to implement this, see https://linux.die.net/man/2/fchmodat: AT_SYMLINK_NOFOLLOW If pathname is a symbolic link, do not dereference it: instead operate on the link itself. This flag is not currently implemented.
https://bugs.winehq.org/show_bug.cgi?id=50773
--- Comment #3 from Martin Storsjö martin@martin.st --- (In reply to Erich E. Hoover from comment #2)
I don't believe that there's a straightforward way to implement this, see https://linux.die.net/man/2/fchmodat: AT_SYMLINK_NOFOLLOW If pathname is a symbolic link, do not dereference it: instead operate on the link itself. This flag is not currently implemented.
Ok, fair enough - if this one can't be practically implemented, the cases where it matters in the testsuite I'm trying to run can be skipped fairly easily.
https://bugs.winehq.org/show_bug.cgi?id=50773
--- Comment #4 from Erich E. Hoover erich.e.hoover@gmail.com --- (In reply to Martin Storsjö from comment #3)
... Ok, fair enough - if this one can't be practically implemented, the cases where it matters in the testsuite I'm trying to run can be skipped fairly easily.
It does look like BSD supports this, and Linux has a few patches (that have not been accepted) to try and support some aspects of it. So, I'd say this might be doable at some point - but it's unlikely we can support it right now.