summaryrefslogtreecommitdiffstats
path: root/git-interface
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-23 14:18:15 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-27 13:04:03 +0200
commit4da759e638d13c857f9f02c6513b91bd0ccea73b (patch)
treeba09c5a304bd5d074c10522b6730895469a71cfe /git-interface
parente93f198edef454d179e6524d5162de0a014e5649 (diff)
downloadaurweb-4da759e638d13c857f9f02c6513b91bd0ccea73b.tar.xz
git-update: Allow privileged users to bypass blacklist
Fixes FS#45410. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface')
-rwxr-xr-xgit-interface/git-update.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index f697eb8..3987087 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -185,6 +185,7 @@ sha1_new = sys.argv[3]
user = os.environ.get("AUR_USER")
pkgbase = os.environ.get("AUR_PKGBASE")
+privileged = (os.environ.get("AUR_PRIVILEGED", '0') == '1')
if refname != "refs/heads/master":
die("pushing to a branch other than master is restricted")
@@ -295,7 +296,7 @@ for pkgname in srcinfo.GetPackageNames():
pkginfo = srcinfo.GetMergedPackage(pkgname)
pkgname = pkginfo['pkgname']
- if pkgname in blacklist:
+ if pkgname in blacklist and not privileged:
die('package is blacklisted: {:s}'.format(pkginfo['pkgname']))
cur.execute("SELECT COUNT(*) FROM Packages WHERE Name = %s AND " +