From dd5b303250b55a730273447e09801c699882da6b Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 23 Aug 2009 21:08:36 -0700 Subject: [PATCH] Use an umask fo 077 to protect profile storage --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index ac62312..9742125 100644 --- a/src/main.c +++ b/src/main.c @@ -112,6 +112,7 @@ int main(int argc, char *argv[]) DBusConnection *conn; DBusError err; struct sigaction sa; + mode_t old_umask; #ifdef NEED_THREADS if (g_thread_supported() == FALSE) @@ -156,6 +157,8 @@ int main(int argc, char *argv[]) perror("Failed to create storage directory"); } + old_umask = umask(077); + main_loop = g_main_loop_new(NULL, FALSE); #ifdef NEED_THREADS -- 2.7.4