[Bug 39366] New: FILE_ATTRIBUTE_READONLY and FILE_ATTRIBUTE_HIDDEN should perhaps use BSD flags

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Oct 1 17:51:36 CDT 2015


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 at winehq.org
          Reporter: guy at 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.



More information about the wine-bugs mailing list