From a977b9542d18da2cde5ce03cb75e403c6630f5e2 Mon Sep 17 00:00:00 2001 From: Bjoern Tropf Date: Tue, 5 Jan 2010 15:52:15 +0100 Subject: Check write permission before fetching the list of overlays --- layman/db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layman/db.py b/layman/db.py index db4a4c5..90cd87e 100644 --- a/layman/db.py +++ b/layman/db.py @@ -265,6 +265,11 @@ class RemoteDB(Overlays): mpath = self.path(url) + # Check for sufficient privileges + if not os.access(mpath, os.W_OK): + OUT.warn('You do not have permission to update the cache') + return + try: # Fetch the remote list -- cgit v1.2.3-1-g7c22