#1 TrayToolTip text cannot handle expiry times >24 h

open
nobody
None
5
2009-06-13
2009-06-13
Markus Kuhn
No

Problem: krb5-ticket-watcher displays the remaining lifetime of tickets only modulo 24 hours, which leads to incorrect displays with tickets that last longer than a day.

If my Kerberos ticket expires 25 hours into the future, then the krb5-ticket-watcher TrayToolTip string currently incorrectly says "Ticket expires in 01:00:00" when I hover with the mouse pointer over the tray icon.

The attached patch changes this string to say e.g. "Ticket expires in 1 d 1 h 0 min". (I've used the international standard, language-independent SI unit symbols, which do not have to translated.)

The "Time Remaining" column in the credential-cache display has the same problem and should be fixed in a similar way, but this is not yet done in the attached patch).

The patch also changes the non-sense output "Ticket expires in 0:00:00" into "Ticket has expired".

Discussion

  • Markus Kuhn
    Markus Kuhn
    2009-06-13

    patch for src/krb5ticketwatcher.cpp (current svn version)

     
    Attachments