Changeset 8d36a62 for asadb/util
- Timestamp:
- Dec 19, 2011, 8:30:04 PM (14 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- 8cb8a9c
- Parents:
- 5543d51
- git-author:
- Alex Dehnert <adehnert@…> (12/18/11 04:22:58)
- git-committer:
- Alex Dehnert <adehnert@…> (12/19/11 20:30:04)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asadb/util/sync_moira_authz.py
r5543d51 r8d36a62 7 7 import os 8 8 import sys 9 import subprocess 9 10 10 11 if __name__ == '__main__': … … 17 18 18 19 import mit 20 import settings 19 21 20 22 class DjangoConnector(object): … … 113 115 def __init__(self, *args, **kwargs): 114 116 super(AFSConnector, self).__init__(*args, **kwargs) 115 # TODO: possibly kinit and aklog117 self.login() 116 118 self.pts = afs.pts.PTS(sec=afs.pts.PTS_ENCRYPT, cell='athena.mit.edu', ) 119 def login(self, ): 120 if settings.KRB_KEYTAB: 121 kinit_cmd = ['kinit', '-k', '-t', settings.KRB_KEYTAB, settings.KRB_PRINCIPAL, ] 122 subprocess.check_call(kinit_cmd) 123 subprocess.check_call(['aklog', 'athena', ]) 124 117 125 def get_members(self, groupname, ): 118 126 afs_members = self.pts.getEntry("system:%s" % (groupname, )).members
Note: See TracChangeset
for help on using the changeset viewer.