Opened 9 years ago
Closed 8 years ago
#5 closed defect (invalid)
kinit does not parse all time string formats
Reported by: | Lewis Rosenthal | Owned by: | Paul Smedley |
---|---|---|---|
Priority: | minor | Milestone: | Heimdal - 1.5.2 |
Component: | distribution | Version: | Heimdal - 1.5.2 |
Keywords: | time | Cc: |
Description
kinit should recognize time formats for the lifetime parameter such as:
kinit -l 0:05 <principal>
and:
kinit -l 0h5m <principal>
However, our Heimdal complains:
kinit.exe: unparsable time: 0h5m
Yet, seconds seem to work:
kinit -l 300 <principal>
The other formats seem to work for MIT 1.13.1 (and 1.12.2, on openSUSE 13.2).
Change History (9)
comment:2 by , 8 years ago
This works fine on openSUSE:
lewis@dp45sg:~> kinit -l 0:05 lewis Password for lewis@SAMBA.ARCANOAE: lewis@dp45sg:~> klist Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: lewis@SAMBA.ARCANOAE Valid starting Expires Service principal 07/23/2016 13:20:42 07/23/2016 13:25:37 krbtgt/SAMBA.ARCANOAE@SAMBA.ARCANOAE
as well as:
lewis@dp45sg:~> kinit -l 5m lewis
and
lewis@dp45sg:~> kinit -l 0h5m lewis
but we have difficulty with the last case and the first one. As noted, we can also handle seconds without a problem.
Looking at virgin source, I see that roken.dll should be doing this, using parse_time.c. So, what is different for us? The ":" would not account for "0h5m" not working, so i can't think that it's a colon issue.
comment:3 by , 8 years ago
FYI:
[c:\]kinit -l 5h lewis lewis@SAMBA.ARCANOAE's Password: kinit.exe: NOTICE: ticket lifetime is 5 hours
As mentioned, I can't get hours and minutes to work (1h15m).
comment:4 by , 8 years ago
kinit on opensuse is heimdal or MIT?
My kinit on Ubuntu:
psmedley@ThinkPad-T510:~$ kinit --version
kinit (Heimdal 1.6.99)
Copyright 1995-2014 Kungliga Tekniska Högskolan
Send bug-reports to heimdal-bugs@…
comment:5 by , 8 years ago
Ack... Indeed, MIT got onto this machine, somehow. That must have happened when I upgraded from 13.2 to Leap 42.1.
That's not a fair comparison, now is it?
I'll have to see about switching and will try again. If this is an upstream bug, then it should be reported upstream.
comment:6 by , 8 years ago
Easy enough to workaround I'd suggest - if one really needs 1h15m then just us 75m :)
comment:7 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I built Heimdal 1.5.3 on openSUSE Leap 42.1 x64 last night. I can confirm that this is an upstream bug. I'll report there.
Surely, the arithmetic is the easy part. ;-)
comment:8 by , 8 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
This appears to be a documentation issue.
lib/roken/parse_time.3 indicates that the proper syntax for Heimdal's time parser/unparser would be:
kinit -l "1 h 15 m" <principal>
The problem is that I can't find this in the Heimdal docs, though MIT documents it per their standard.
Changing the status to invalid.
comment:9 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
not an os/2 port issue:
From Ubuntu, using kinit from heimdal-clients:
kinit -l 0:05 <principle>
kinit: unparsable time: 0:05