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)
committerVolker Lendecke <vl@samba.org>
Mon, 8 Nov 2010 12:39:51 +0000 (13:39 +0100)
commit57b3d32c8d87c4273d30d73fe2bfd3de0178945d
treeae2c2e897361512f57d0ab1ca5a1a1c51b61304a
parent58cfa5a82519e2850cb400bb9f1e76d3dbfd3ff2
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.
source3/winbindd/winbindd_cache.c