diff options
author | Will Woods <wwoods@redhat.com> | 2008-09-04 12:15:38 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2008-09-04 12:15:38 -0400 |
commit | 8765e33c2267b1408bd4d11d1bf596ad1d53eb21 (patch) | |
tree | 1c008cf36ef00348d984214f09c57ccd572f443a /bugzilla | |
parent | 71bab41bf6068f464827700f68ab7cfbae51e7ab (diff) | |
download | python-bugzilla-8765e33c2267b1408bd4d11d1bf596ad1d53eb21.tar.gz python-bugzilla-8765e33c2267b1408bd4d11d1bf596ad1d53eb21.tar.xz python-bugzilla-8765e33c2267b1408bd4d11d1bf596ad1d53eb21.zip |
Create cookiefile with 0600 perms
Diffstat (limited to 'bugzilla')
-rw-r--r-- | bugzilla/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bugzilla/base.py b/bugzilla/base.py index 8024736..04b7883 100644 --- a/bugzilla/base.py +++ b/bugzilla/base.py @@ -100,6 +100,12 @@ class BugzillaBase(object): cj = cookielib.MozillaCookieJar(self.cookiefile) if os.path.exists(self.cookiefile): cj.load() + else: + # Create an empty file that's only readable by this user + old_umask = os.umask(0077) + f = open(self.cookiefile,"w") + f.close() + os.umask(old_umask) self._cookiejar = cj self._cookiejar.filename = self.cookiefile |