From 53f8750fa56b5e8d40b4ee63734f743c2a815f46 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Fri, 20 Mar 2015 17:10:43 -0400 Subject: [PATCH] set proper default permissions for created files --- src/launcher/launcher.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/launcher/launcher.cpp b/src/launcher/launcher.cpp index 4da6eb9..adc2d86 100644 --- a/src/launcher/launcher.cpp +++ b/src/launcher/launcher.cpp @@ -16,6 +16,11 @@ #include "osregistry.h" #include "cfile.h" +#ifdef PLAT_UNIX +#include +#include +#endif + #ifndef MAKE_FS1 #include "res/fs2_background.xpm" #include "res/fs2_btn_help.xpm" @@ -66,6 +71,11 @@ IMPLEMENT_APP(LauncherApp) bool LauncherApp::OnInit() { +#ifdef PLAT_UNIX + // make sure we create files with user access only + umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); +#endif + Launcher *frame = new Launcher(NULL); frame->Show(); -- 2.39.2