[Bug 39366] New: FILE_ATTRIBUTE_READONLY and FILE_ATTRIBUTE_HIDDEN should perhaps use BSD flags
https://bugs.winehq.org/show_bug.cgi?id=39366 Bug ID: 39366 Summary: FILE_ATTRIBUTE_READONLY and FILE_ATTRIBUTE_HIDDEN should perhaps use BSD flags Product: Wine Version: 1.7.9 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: guy(a)alum.mit.edu 4.4-Lite introduced per-file flags, which show up as the st_flags field of "struct stat" and can be set with the chflags() and fchflags() calls. For plain files, the UF_IMMUTABLE flag corresponds pretty closely to the Windows FILE_ATTRIBUTE_READONLY flag. OS X added the UF_HIDDEN flag. so that its kernel SMB client could report the Windows FILE_ATTRIBUTE_HIDDEN flag to userland. It might be useful for Wine to, on systems with the st_flags field in "struct stat" and the chflags() call, to report that a file is read-only if UF_IMMUTABLE is set, even if the file's permissions allow reading, and to set UF_IMMUTABLE as well as turning read permissions off if FILE_ATTRIBUTE_READONLY is set. (You probably want to turn off file permissions in case the file is on a server; the server might not support setting that flag if, for example, it's an NFS server.) On OSes that have them *and* that have UF_HIDDEN, the same (modulo file permissions) should perhaps be done for FILE_ATTRIBUTE_HIDDEN. This has been discussed in the past; see the thread starting at https://www.winehq.org/pipermail/wine-devel/2009-October/079038.html (It might also be worth looking at supporting NT ACLs on UN*Xes that have NT-style ACLs; OS X's ACLs are NT-style, and other UN*Xes might support them even if they call them NFSv4-style ACLs.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39366 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39366 --- Comment #1 from Sebastian Lackner <sebastian(a)fds-team.de> --- Isn't this basically a duplicate of https://bugs.winehq.org/show_bug.cgi?id=9158? I don't see why we need a second bug report just to suggest a different way to implement it. Also, the feature is BSD/OSX specific and we still need a different implementation on Linux. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39366 Guy Harris <guy(a)alum.mit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|FILE_ATTRIBUTE_READONLY and |FILE_ATTRIBUTE_READONLY and |FILE_ATTRIBUTE_HIDDEN |FILE_ATTRIBUTE_HIDDEN |should perhaps use BSD |should perhaps use st_flags |flags |on BSD/OS X --- Comment #2 from Guy Harris <guy(a)alum.mit.edu> --- (In reply to Sebastian Lackner from comment #1)
Isn't this basically a duplicate of https://bugs.winehq.org/show_bug.cgi?id=9158?
No. For one thing, this enhancement request also mentions FILE_ATTRIBUTE_READONLY, which bug 9158 doesn't, and, for another, that bug seems to be talking about workarounds for the lack of FILE_ATTRIBUTE_HIDDEN support.
I don't see why we need a second bug report just to suggest a different way to implement it.
It's only "different" because the way you'd implement them would be OS-dependent. That bug refers to bug 15679, which has what appears to be a way to implement FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM on platforms that support fsetxattr() etc. by adding a special extended attribute. You could get away with that on OS X 10.4 or later, But It Would Be Wrong, at least for FILE_ATTRIBUTE_HIDDEN, given that OS X 10.5 and later implement the native hidden flag as UF_HIDDEN - as does Samba for OS X - so implementing it that way *on OS X* would mean code running under Wine would see the same hidden flag that native code does.
Also, the feature is BSD/OSX specific and we still need a different implementation on Linux.
Yeah, I thought the "BSD" in the title would have made it sufficiently explicit that this was a suggestion for a *platform-specific* change. Sorry about that; I've changed the title to make it clearer. One possibility for a "different implementation on Linux" is the one in bug 15679, which is *not* in the master branch in the Wine git repository. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39366 Joel Holdsworth <joel(a)airwebreathe.org.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joel(a)airwebreathe.org.uk -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla