return [name]
return []
try:
- return getafsgroups.getAfsGroupMembers(name, config.authz[0].cell)
+ return getafsgroups.getAfsGroupMembers(name, config.authz.cells[0].cell)
except getafsgroups.AfsProcessError:
return []
def getAfsGroupMembers(group, cell):
encrypt = True
- for c in config.authz:
- if c.type == 'afs' and c.cell == cell and hasattr(c, 'auth'):
+ for c in config.authz.cells:
+ if c.cell == cell and hasattr(c, 'auth'):
encrypt = c.auth
subprocess.check_call(['aklog', cell], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(["pts", "membership", "-encrypt" if encrypt else '-noauth', group, '-c', cell],
return admin
admin = 'system:' + admin
try:
- if user in getafsgroups.getAfsGroupMembers(admin, config.authz[0].cell):
+ if user in getafsgroups.getAfsGroupMembers(admin, config.authz.cells[0].cell):
return admin
except getafsgroups.AfsProcessError, e:
errmsg = str(e)
#!/bin/sh
cells () {
- for i in $(invirt-getconf -l authz); do
- if [ afs = "$(invirt-getconf authz.$i.type)" ]; then
- invirt-getconf authz.$i.cell
- fi
+ for i in $(invirt-getconf -l authz.cells); do
+ invirt-getconf authz.cells.$i.cell
done
}
kinit -k -t /etc/invirt/keytab daemon/$(hostname -f)