Fix SetFileAttributes to honor the umask (rather than making files
world-writable).
diff --git a/dlls/kernel/kernel_main.c b/dlls/kernel/kernel_main.c
index d04290a..aef6d0c 100644
--- a/dlls/kernel/kernel_main.c
+++ b/dlls/kernel/kernel_main.c
@@ -23,10 +23,12 @@
#include <assert.h>
#include <ctype.h>
#include <string.h>
+#include <sys/stat.h>
#include "winbase.h"
#include "wine/winbase16.h"
+#include "file.h"
#include "global.h"
#include "miscemu.h"
#include "module.h"
@@ -43,6 +45,10 @@
{
HMODULE16 hModule;
+ /* Get the umask */
+ FILE_umask = umask(0777);
+ umask( FILE_umask );
+
/* Setup codepage info */
CODEPAGE_Init();