Clean up quilt patches
[debian/pino.git] / debian / patches / 001_sec-accounts-file.diff
1 Description:
2 Author: Julien Valroff <julien@kirya.net>
3 Bug: http://code.google.com/p/pino-twitter/issues/detail?id=48
4 Forwarded: yes
5
6 --- a/src/accounts.vala
7 +++ b/src/accounts.vala
8 @@ -21,6 +21,7 @@
9  
10  using Xml;
11  using Gee;
12 +using GLib;
13  
14  namespace Auth {
15  
16 @@ -106,9 +107,13 @@
17                 var acc_file = File.new_for_path(acc_file_path);
18                 
19                 if(!acc_file.query_exists(null)) {
20 -                       //var pref_stream = pref_file.create(FileCreateFlags.NONE, null);
21 +                       var acc_stream = acc_file.create(FileCreateFlags.PRIVATE, null);
22                         is_new = true;
23                         return;
24 +               } else {
25 +                       // If accounts.xml already exists, make sure it is only readable by its owner
26 +                       // as it contains the credentials in clear text
27 +                       GLib.FileUtils.chmod(acc_file_path,0600);
28                 }
29                 
30                 //reading content