Bug 11402 - winbind caches wrong entries for uid->sid and gid->sid idmap lookups
winbind caches wrong entries for uid->sid and gid->sid idmap lookups
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Winbind
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2015-07-15 20:39 UTC by Buck Huppmann
Modified: 2015-07-15 20:59 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Buck Huppmann 2015-07-15 20:39:08 UTC

I may be reading this wrong, so please go easy on me if I am

In this initial commit, it seems like winbindd is caching the lookups in the wrong direction:


E.g., in the first hunk, idmap_uid_to_sid() looks up a uid->sid mapping but then it calls idmap_cache_set_sid2uid() to cache the result for a sid->uid lookup instead.  (In the next hunk, there is a copy-and-paste error that results in setting sid2uid also. It was later corrected to be gid2sid


but that should be sid2gid, i think, likewise)

Am I wrong?
Comment 1 Buck Huppmann 2015-07-15 20:58:19 UTC
Sorry.  Apologies

I notice samba4 has a unified sid2unixid/unixid2sid caching scheme
that caches the mappings in both directions and doesn't call these
functions any more

samba-3.6.23's tree still has the indicated errors, but i gather
that's unmaintained nowadays
Comment 2 Buck Huppmann 2015-07-15 20:59:10 UTC