s3:winbind add timeouts to winbind cache
commitb865a51e44100ffbb60f428f65857f23f9d8f4bf
authorChristian Ambach <christian.ambach@de.ibm.com>
Thu, 4 Nov 2010 16:10:25 +0000 (4 17:10 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Mar 2012 19:54:15 +0000 (5 20:54 +0100)
tree19fcc5f7bb238f62e0b7a1c4d1600360880b574b
parent4509eed9d6d5fcbff0fd519047b00f27d230c654
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)
(cherry picked from commit 6a761e873c34badd628a5460dd18830465ec484c)
source3/winbindd/winbindd_cache.c