]> sipb.mit.edu Git - snippets/.git/blobdiff - barn-growl/barn-growl.py
Explicitly request GSSAPI delegation so zephyr subscribing works
[snippets/.git] / barn-growl / barn-growl.py
index c040de416c9955f93e61e3bb402fc3ef60ad7873..2033f22c218df137f152f29e049ca5a9422c537c 100755 (executable)
@@ -12,6 +12,7 @@ import select
 import sys
 from abstfilter import AbstractConsumer
 import optparse
+import time
 
 class Notifier(AbstractConsumer):
     def __init__(self, usegrowl, usenotify, useprint):
@@ -33,7 +34,7 @@ class Notifier(AbstractConsumer):
             zop = d['opcode'].lower()
             zsender = d['sender'].lower()
             zauth = d['auth'].lower() == 'yes'
-            ztime = ':'.join(d['time'].split(' ')[3].split(':')[0:2])
+            ztime = "%02d:%02d" % time.strptime(d['time'])[3:5]
             zmessage = d['message']
             idtuple = (zclass, zinstance, zsender, ztime)
             id = '%s/\n%s/\n%s\n %s' % idtuple
@@ -106,7 +107,7 @@ def main(argv):
             return 1
 
     if ssh is not None:
-        command = "ssh -K %s 'tzc -si'" % ssh
+        command = "ssh -o GSSAPIAuthentication=yes -o GSSAPIDelegateCredentials=yes -o GSSAPIKeyExchange=yes %s 'tzc -si'" % ssh
     else:
         command = "tzc -si"
     p = os.popen(command)