s3:winbind add timeouts to winbind cache
authorChristian Ambach <christian.ambach@de.ibm.com>
Thu, 4 Nov 2010 16:10:25 +0000 (17:10 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 16 Dec 2011 12:57:59 +0000 (13:57 +0100)
commit6a761e873c34badd628a5460dd18830465ec484c
tree85a24fad4e88644c8014aa0b32508c93c03eff4b
parenta8037a582795ce5bbd9361bf6d000b6110c6eb9b
s3:winbind add timeouts to winbind cache

This adds a timeout value to cache entries and the NDR records
in the winbind cache.

The previous approach of just comparing the sequence number has some issues,
e.g. when retrying a wbinfo -n operation for a user in a not yet trusted
domain was always failing even after the trusted domain was added.

The new approach compares sequence number and timeout value to
determine if a cache entry is still valid or not.

I increased the cache version number so an old cache will be wiped
automatically after upgrade.
(cherry picked from commit 57b3d32c8d87c4273d30d73fe2bfd3de0178945d)
source3/winbindd/winbindd_cache.c