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: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Deadline: 2020-05-19
Assignee: Gentoo-keys project
URL:
Whiteboard:
Keywords: PATCH, PMASKED
Depends on:
Blocks:
 
Reported: 2018-01-18 04:28 UTC by Zac Medico
Modified: 2020-05-23 09:31 UTC (History)
1 user (show)

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:
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-04-19 12:12:25 UTC
app-crypt/gkeys is last rited now.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-23 09:31:21 UTC
Removing.