Commits

Jason R. Coombs committed 049cd18 Merge

Merge pull request #16 (only 'password file is world readable' half, as the gdata fix may have issues, possibly changing ._client from a property to a method.

  • Participants
  • Parent commits 2a0d3fb, 2858b10

Comments (0)

Files changed (3)

 * Tweaked SecretService code to pass unicode to DBus, as unicode is the
   preferred format.
 * Issue #71 - Fixed logic in CryptedFileKeyring.
+* Unencrypted keyring file will be saved with user read/write (and not group
+  or world read/write).
 
 -----
 0.9.2
 * Sebastian Ramacher
 * Robert Leftwich
 * Kyle Stark
+* Daniel Holth

keyring/backend.py

 """
 import getpass
 import os
+import stat
 import sys
 import base64
 import copy
         old_location = os.path.join(os.path.expanduser('~'), self.filename)
         new_location = self.file_path
         keyring.util.loc_compat.relocate_file(old_location, new_location)
+        # user read/write only
+        try:
+            os.chmod(new_location, stat.S_IWRITE | stat.S_IREAD)
+        except OSError: # XXX fails during unit test against tmpfile
+            pass 
         # disable this function - it only needs to be run once
         self._relocate_file = lambda: None