From 1e922a353a14f5f231040595a93af3054ea41664 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 7 Dec 2009 22:05:27 -0500 Subject: [PATCH] Update the cherrypy branch to use authz.afs.cells instead of just authz.cells, to stay in sync with r2590. (Again, this isn't really a cherry-pick, but whatever) svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2717 --- code/cache_acls.py | 2 +- code/getafsgroups.py | 2 +- code/main.py | 2 +- code/validation.py | 2 +- invirt-cache-acls | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/cache_acls.py b/code/cache_acls.py index 75f4720..7ae4ac8 100755 --- a/code/cache_acls.py +++ b/code/cache_acls.py @@ -39,7 +39,7 @@ def expandName(name): return [name] return [] try: - return getafsgroups.getAfsGroupMembers(name, config.authz.cells[0].cell) + return getafsgroups.getAfsGroupMembers(name, config.authz.afs.cells[0].cell) except getafsgroups.AfsProcessError: return [] diff --git a/code/getafsgroups.py b/code/getafsgroups.py index dcb8ee6..1c6b82e 100755 --- a/code/getafsgroups.py +++ b/code/getafsgroups.py @@ -30,7 +30,7 @@ class AfsProcessError(Exception): def getAfsGroupMembers(group, cell): encrypt = True - for c in config.authz.cells: + for c in config.authz.afs.cells: if c.cell == cell and hasattr(c, 'auth'): encrypt = c.auth if encrypt: diff --git a/code/main.py b/code/main.py index f235c53..3655352 100755 --- a/code/main.py +++ b/code/main.py @@ -86,7 +86,7 @@ class InvirtWeb(View): def __getattr__(self, name): if name in ("admin", "overlord"): - if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.cells[0].cell): + if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.afs.cells[0].cell): raise InvalidInput('username', cherrypy.request.login, 'Not in admin group %s.' % config.adminacl) cherrypy.request.state = State(cherrypy.request.login, isadmin=True) diff --git a/code/validation.py b/code/validation.py index fc9b969..9b7a0b0 100755 --- a/code/validation.py +++ b/code/validation.py @@ -222,7 +222,7 @@ def testAdmin(user, admin, machine): return admin admin = 'system:' + admin try: - if user in getafsgroups.getAfsGroupMembers(admin, config.authz.cells[0].cell): + if user in getafsgroups.getAfsGroupMembers(admin, config.authz.afs.cells[0].cell): return admin except getafsgroups.AfsProcessError, e: errmsg = str(e) diff --git a/invirt-cache-acls b/invirt-cache-acls index 922d9ba..79a7650 100755 --- a/invirt-cache-acls +++ b/invirt-cache-acls @@ -1,7 +1,7 @@ #!/bin/sh cells () { - for i in $(invirt-getconf -l authz.cells); do - invirt-getconf authz.cells.$i.cell + for i in $(invirt-getconf -l authz.afs.cells); do + invirt-getconf authz.afs.cells.$i.cell done } kinit -k -t /etc/invirt/keytab daemon/$(hostname -f) -- 1.7.9.5