Merge branch 'principals-with-host'
This commit is contained in:
commit
b005b18e89
3 changed files with 2 additions and 9 deletions
|
@ -22,7 +22,7 @@ def serve_principal(cfg, sshUser, principals):
|
|||
+'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s')
|
||||
|
||||
for p in util.getAllowedSSHPrincipals(config=cfg).split() :
|
||||
print TEMPLATE % dict(user=sshUser, principals=p)
|
||||
print TEMPLATE % dict(user=sshUser.partition('@')[0], principals=p)
|
||||
|
||||
class Main(app.App):
|
||||
def create_parser(self):
|
||||
|
@ -46,10 +46,3 @@ class Main(app.App):
|
|||
#log.debug('serve_principal: %s', serve_principal(cfg, sshUser, principals))
|
||||
serve_principal(cfg, sshUser, principals)
|
||||
log.info('Done.')
|
||||
#
|
||||
# if hook == 'post-update':
|
||||
# log.info('Running hook %s', hook)
|
||||
# post_update(cfg, git_dir)
|
||||
# log.info('Done.')
|
||||
# else:
|
||||
# log.warning('Ignoring unknown hook: %r', hook)
|
||||
|
|
|
@ -66,7 +66,6 @@ class Main(app.App):
|
|||
os.umask(0022)
|
||||
|
||||
git_dir = os.environ.get('GIT_DIR')
|
||||
print type(git_dir)
|
||||
if git_dir is None:
|
||||
log.error('Must have GIT_DIR set in enviroment')
|
||||
sys.exit(1)
|
||||
|
|
|
@ -62,6 +62,7 @@ def filterAuthorizedKeys(fp):
|
|||
|
||||
def writeAuthorizedKeys(path, keydir):
|
||||
tmp = '%s.%d.tmp' % (path, os.getpid())
|
||||
log.debug("writeAuthorizedKeys " + str(tmp) )
|
||||
try:
|
||||
in_ = file(path)
|
||||
except IOError, e:
|
||||
|
|
Loading…
Reference in a new issue