]> git.street.me.uk Git - andy/viking.git/commitdiff
keeping OSM password safe
authorGleb Smirnoff <glebius@glebius.int.ru>
Sat, 17 Oct 2009 08:23:51 +0000 (10:23 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Sat, 17 Oct 2009 08:24:33 +0000 (10:24 +0200)
Since preferences files saves OSM login credentials,
it'll be better to store it in secret.

Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
src/preferences.c

index a8eb942c3478e77f0af2fd2ae90ab283cd8f7839..5b723c7d672e686014f70f7586a7940e20a053c7 100644 (file)
@@ -221,6 +221,10 @@ static gboolean preferences_save_to_file()
 
   // TODO: error checking
   FILE *f = g_fopen(fn, "w");
+  /* Since preferences files saves OSM login credentials,
+   * it'll be better to store it in secret.
+   */
+  g_chmod(fn, 0600);
   g_free ( fn );
 
   if ( f ) {