gui: Fix permissions when creating configuration directory.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 8 Jun 2010 16:36:08 +0000 (09:36 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 8 Jun 2010 16:36:19 +0000 (09:36 -0700)
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html says
that the configuration directory should have mode 0700, so use that.

Reported by John Darrington.

src/ui/gui/psppire-conf.c

index dbcdf0e01f08d94907fedab3e43486e2a874c812..02cc2751212a2a0de931fe7a2b9e722b342255e2 100644 (file)
@@ -150,7 +150,7 @@ psppire_conf_init (PsppireConf *conf)
      to want to put files there. */
   dirname = g_get_user_config_dir ();
   if (stat (dirname, &s) == -1 && errno == ENOENT)
-    mkdir (dirname, 0777);
+    mkdir (dirname, 0700);
 
   conf->filename = g_strdup_printf ("%s/%s", dirname, "psppirerc");