[RFC] Handle process token groups in server/file.c::sd_to_mode

Ben Peddell klightspeed at netspace.net.au
Tue Nov 17 07:02:42 CST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Chitescu wrote:
> Hi!
>
> How should server/file.c sd_to_mode() deal with filesystems that don't
> support full POSIX ownership and access permissions? It is quite
> popular to mount FAT filesystems - either from a removable media or a
> partition shared with a Windows installation.
>
> Furthermore, there could be symlinks to such files so filesystem
> capability should be detected somehow from the file itself.

The only portable way I can think of is having certain "drives" marked
as e.g. FAT32 (instead of NTFS), and having
dlls/ntdll/sec.c::NtSetSecurityObject() either fake success, or (with
support from other areas) do whatever it does on FAT32 (and I don't know
what that is).

The fstatvfs portability function in libport only reports filesystem
space, and not type or id, so that cannot be used to portably detect
what type of filesystem the file sits on.

> Since recently I am unable to patch WoW since it started to call
> SetFileSecurity on the program directory which is located on a FAT32
> partition. Everything appears owned by root but with rwxrwxrwx access.
> Wine tries to set ---rwx--- which is, to say the least, not commonly
> seen.
>
> http://bugs.winehq.org/show_bug.cgi?id=20643

The World of Warcraft Launcher tries to set the directory to Full Access
only to the Users group, which wine currently does put the user in.
This is a World of Warcraft bug in that it also affects Windows users.
However, it exposes a shortcoming in the ACL handling in wine.

The setting to ---???--- is one of the bugs I am hoping to fix with this
patch.  Currently, server/file.c::sd_to_mode() only honours owner and
world permissions, and does not look at what groups the owner is a
member of.

After this patch, the Launcher (through wine) should set the permissions
to rwx???--- if the user owns the directory.

I can see multiple bug reports in bugs.winehq.org involving either
programs removing the owner permissions or FAT32 mounts not working due
to failed permission setting.

<http://bugs.winehq.org/show_bug.cgi?id=17672>
  Wine denies access to Oracle Client install folder
<http://bugs.winehq.org/show_bug.cgi?id=20357>
  Problem with wine creating folders on installs
<http://bugs.winehq.org/show_bug.cgi?id=19588>
  Wine is setting incorrect permissions in some instances
<http://bugs.winehq.org/show_bug.cgi?id=10067>
  Steam Failed to set file attrbutes
<http://bugs.winehq.org/show_bug.cgi?id=17776>
  Installing on Fat32 partitions seems to be impossible nowadays
<http://bugs.winehq.org/show_bug.cgi?id=18359>
  InstallShield fails with "Access Denied" dialog when trying to install
to FAT32 volume
<http://bugs.winehq.org/show_bug.cgi?id=20643>
  World of Warcraft launcher tries to change folder permissions (Not a
Wine bug)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksCnvIACgkQTHDAI68NsumTLwCdGcE4Pd52d/P1yAZThqSSEefk
Z9cAnRjBdMy0TbF0ET1NGKm7Nbs+lx1h
=+HHN
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list