Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644906 - app-crypt/gkeys-0.2: Seeds.load method wrongly opens seedfile in write mode
Summary: app-crypt/gkeys-0.2: Seeds.load method wrongly opens seedfile in write mode
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo-keys project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-01-18 04:28 UTC by Zac Medico
Modified: 2018-01-18 04:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-01-18 04:28:46 UTC
This issue prevents `gkeys list-key -C gentoo --keydir release -n snapshot` from working for non-root users. This patch fixes it:

diff --git a/gkeys/gkeys/seed.py b/gkeys/gkeys/seed.py
index 96bd8b2..7d17643 100644
--- a/gkeys/gkeys/seed.py
+++ b/gkeys/gkeys/seed.py
@@ -68,5 +68,5 @@ class Seeds(object):
         self.seeds = {}
         try:
-            with open(self.filename, "r+") as seedfile:
+            with open(self.filename, "r") as seedfile:
                 seedlines = json.load(seedfile)
         except IOError as err: