Bug 8628 - The kerberos service ticket gets duplicated several time on each client connection
Summary: The kerberos service ticket gets duplicated several time on each client conne...
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.11
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-11-22 11:56 UTC by Andreas Schneider
Modified: 2012-01-04 20:41 UTC (History)
1 user (show)

See Also:

Patch (968 bytes, patch)
2011-11-22 11:56 UTC, Andreas Schneider
gd: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2011-11-22 11:56:38 UTC
Created attachment 7135 [details]

The kerberos service ticket gets duplicated several time on each client connection. Each Samba client utility which uses kerberos duplicated the service ticket each time it establishes a connection.

The attached patch fixes the problem. I've tested it with kerberos 1.6.3 and versions up to 1.9.1.

The patch is needed in master, 3.6 and 3.5.
Comment 1 Guenther Deschner 2011-11-22 14:14:20 UTC
Have you also done tests with Heimdal versions as well as with memory credential caches ? Do they all behave the same then ?
Comment 2 Andreas Schneider 2011-12-15 13:01:20 UTC
Tested with heimdal too and the patch fixes the problem on heimdal too.
Comment 3 Simo Sorce 2011-12-15 13:39:08 UTC
Unless I am reading it wrong, and it is entirely possible, this fix looks wrong.

It looks to me that you are just avoiding saving the obtained tickets and keep fetching tickets every time a connection is established.

The proper fix is to check if you already have a valid ticket and reuse that instead of fetching new ones every time.
Comment 4 Simo Sorce 2011-12-15 13:43:37 UTC
Please disregard my comment, I should have followed my instinct that was telling me not enough coffee was circulating in the bloodstream yet :)
Comment 5 Guenther Deschner 2011-12-15 14:18:37 UTC
Karolin, please add to 3.6 and 3.5.
Comment 6 Andreas Schneider 2011-12-15 14:30:08 UTC
and master. Thanks :)
Comment 7 Karolin Seeger 2012-01-04 20:41:53 UTC
Pushed to v3-5-test and v3-6-test (was already pushed to master).
Closing out bug report.