[Bug 207791] Re: winbind forgets uid/name gid/name mappings in regulary periods

Drew Scott Daniels ddaniels at umalumni.mb.ca
Wed Mar 10 17:22:43 GMT 2010


Hi Torsten Krah,
Thanks for your friendly reply. Part of the reason I asked the questions was for other readers of the bug to be able to diagnose similar problems.

Also, for more detailed debugging, here's a link to the current development version 3 source code:
http://gitweb.samba.org/?p=samba.git;a=tree;f=source3/winbindd;hb=HEAD

I don't know what's going to happen to winbindd with samba4's new code.

I'm guessing that the expiration and failure to re-get the UID mapping can be seen at the top level in:
http://gitweb.samba.org/?p=samba.git;a=blob;f=source3/winbindd/wb_uid2sid.c;hb=HEAD
The only thing that might show up in a log at this level (or from this file anyway) looks to be:
  50                 DEBUG(10, ("idmap_cache_find_uid2sid found %d%s\n",
  51                            (int)uid, expired ? " (expired)": ""));

   1 Any chance you see the above log line?
Unless I misunderstand, the cache is expired, and requesting a mapping fails. That means the following is executed:

  66         for (domain = domain_list(); domain != NULL; domain = domain->next) {
  67                 if (domain->have_idmap_config
  68                     && (uid >= domain->id_range_low)
  69                     && (uid <= domain->id_range_high)) {
  70                         state->dom_name = domain->name;
  71                         break;
  72                 }
  73         }
  74 
  75         child = idmap_child();
  76 
  77         subreq = rpccli_wbint_Uid2Sid_send(
  78                 state, ev, child->rpccli, state->dom_name,
  79                 uid, &state->sid);
  80         if (tevent_req_nomem(subreq, req)) {
  81                 return tevent_req_post(req, ev);
  82         }
  83         tevent_req_set_callback(subreq, wb_uid2sid_done, req);
  84         return req;
  85 }

So I'm guessing that means that the domain name isn't found, or there's a problem with rpccli_wbint_Uid2Sid_send(), but there are a few other possibilities. The next steps would be to:
   * Check if upstream's got any new information
   * Look at rpccli_wbint_Uid2Sid_send()
   * Check how the cache is initially populated and check if it's different code than the above code.
   * Test with caching disabled if possible.
   * Test in "offline" mode if possible.

I haven't looked to see if this bug is filed upstream, or if it's
mentioned on a mailing list of theirs. If it is, then any links would be
nice.

     Drew Daniels
Resume: http://www.boxheap.net/ddaniels/resume.html

-- 
winbind forgets uid/name gid/name mappings in regulary periods
https://bugs.launchpad.net/bugs/207791
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to samba in ubuntu.



More information about the Ubuntu-server-bugs mailing list