winbindd_ads: prevent negative GM/ cache entries due to broken connections
authorMichael Adam <obnox@samba.org>
Thu, 20 Nov 2008 22:26:35 +0000 (23:26 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 21 Nov 2008 22:33:33 +0000 (23:33 +0100)
commit9d5af844c53ff2b25904c96d28546271a249debb
tree2689c77a244892ae67f4e92b1af69e06bf4c7790
parentd4481329438d27a23ded85f01f5cf06725221d0e
winbindd_ads: prevent negative GM/ cache entries due to broken connections

The ads lookup_groupmem() function calls lda_lookupsids to resolve sids
to names. This is tried only once. So in case the connection was broken,
e.g. closed by the server (without a reset packet), there will be an empty
GM/ cache entry for the requested group which will prevent proper working
of access checks among other checks for the expiry period.

This patch works around this problem by retrying once if the lsa_lookupsids
call fails, re-establishing the dc-connection, as we already do in many other
places (e.g. the winbindd retry methods for the rpc layer).

Michael
source/winbindd/winbindd_ads.c