[4/4] server: Do not limit execute file access to .exe and .com files.
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Mar 15 06:07:49 CDT 2011
This is the final patch which makes the permissions check on a just
created temp file return success for the installer in the bug 26288.
---
server/file.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/server/file.c b/server/file.c
index 20a5e06..2856bb9 100644
--- a/server/file.c
+++ b/server/file.c
@@ -196,16 +196,12 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
else
mode = (attrs & FILE_ATTRIBUTE_READONLY) ? 0444 : 0666;
- if (len >= 4 &&
- (!strcasecmp( name + len - 4, ".exe" ) || !strcasecmp( name + len - 4, ".com" )))
- {
- if (mode & S_IRUSR)
- mode |= S_IXUSR;
- if (mode & S_IRGRP)
- mode |= S_IXGRP;
- if (mode & S_IROTH)
- mode |= S_IXOTH;
- }
+ if (mode & S_IRUSR)
+ mode |= S_IXUSR;
+ if (mode & S_IRGRP)
+ mode |= S_IXGRP;
+ if (mode & S_IROTH)
+ mode |= S_IXOTH;
access = generic_file_map_access( access );
--
1.7.3.5
More information about the wine-patches
mailing list