Ignore:
Timestamp:
Feb 14, 2009, 10:18:26 PM (15 years ago)
Author:
broder
Message:

Don't encrypt requests to the PRDB if config.authz.auth is set to False.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/getafsgroups.py

    • Property svn:executable set to *
    r1959 r2119  
    22import pprint
    33import subprocess
     4from invirt.config import structs as config
    45
    56# import ldap
     
    2930
    3031def getAfsGroupMembers(group, cell):
     32    encrypt = True
     33    for c in config.authz:
     34        if c.type == 'afs' and c.cell == cell and hasattr(c, 'auth'):
     35            encrypt = c.auth
    3136    subprocess.check_call(['aklog', cell], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    32     p = subprocess.Popen(["pts", "membership", "-encrypt", group, '-c', cell],
     37    p = subprocess.Popen(["pts", "membership", "-encrypt" if encrypt else '-noauth', group, '-c', cell],
    3338                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    3439    err = p.stderr.read()
Note: See TracChangeset for help on using the changeset viewer.