File: tgt-acquire.py

package info (click to toggle)
krb5-auth-dialog 3.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,260 kB
  • ctags: 1,203
  • sloc: sh: 11,412; ansic: 4,578; xml: 2,171; makefile: 301; lex: 159; python: 58; yacc: 42
file content (8 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
import dbus

bus = dbus.SessionBus()
ka = bus.get_object('org.gnome.KrbAuthDialog',
                    '/org/gnome/KrbAuthDialog')
ret = ka.acquireTgt("", dbus_interface='org.gnome.KrbAuthDialog')
if not ret:
    print >>sys.stderr, "Cannot acuire TGT, aborting."