Use an umask fo 077 to protect profile storage
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 24 Aug 2009 04:08:36 +0000 (21:08 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 24 Aug 2009 04:08:36 +0000 (21:08 -0700)
src/main.c

index ac62312..9742125 100644 (file)
@@ -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