winbindd will not start do to invalid cache path

Bug #118977 reported by Jerome Haltom
2
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Medium
Mathias Gug

Bug Description

Binary package hint: samba

Notice the inconsistant use of lock_path and cache_path in the following two code locations. The unlink test should be patched by fhs.patch, it apparently is missing. This makes winbind unusable on Gutsy at the moment.

source/nsswitch/winbindd_cache.c:2226

                if (unlink(lock_path("winbindd_cache.tdb")) == -1) {
                        DEBUG(0,("initialize_winbindd_cache: unlink %s failed %s ",
                                lock_path("winbindd_cache.tdb"),
                                strerror(errno) ));

source/nsswitch/winbindd_cache.c:2183

        wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
                                WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE,
                                lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST),
                                O_RDWR|O_CREAT, 0600);

Revision history for this message
Jerome Haltom (wasabi) wrote :

This bug is critical. Winbind being unusable is not good.

Changed in samba:
importance: Undecided → Critical
Revision history for this message
Jerome Haltom (wasabi) wrote :

There is a lot of argument between the Debian packager and the Samba team about this bug. Basically it centers around whether winbindd_cache should be in /var/cache or not. Upstream thinks not, Debian thinks it should be.

winbindd_cache is a cache. But it is a cache which cannot be safely deleted without negative effect. It does recreate itself, but it stores credentials. If a laptop user were to delete it, he would likely be unable to login to his system until he reconnected back to his home network.

Thus the argument goes. I'm content to do whatever Debian does, but it's broken in Ubuntu *now*. I'd suggest simply fixing the fhs.patch for the time being.

Revision history for this message
Jerome Haltom (wasabi) wrote :

Attached is a new version of fhs.patch which fixes this.

Revision history for this message
Jerome Haltom (wasabi) wrote :

Previous patch had some extra files. This patch has been cleaned up.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks a lot! It gets a bit tight for Tribe-4 now, but if someone wants to grab this and give this a thorough test, that's fine for T4. Should be fixed in T5 at latest, though.

Changed in samba:
importance: Critical → High
Mathias Gug (mathiaz)
Changed in samba:
assignee: nobody → mathiaz
Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However I cannot reproduce your problem. I've setup a domain following the Samba-3 HowTo with a Samba PDC and a Samba member server. winbindd starts correctly on the member server and everything works correctly.

Can you be more specific about what doesn't work ? Do you have a test case to reproduce ?

I've also had a quick look at your attached patch. It touches a lot of different files, and seems to cover more than just the winbindd cache directory.

Changed in samba:
importance: High → Medium
status: New → Incomplete
Revision history for this message
Mathias Gug (mathiaz) wrote :

I'm closing this bug as the bug has been fixed in 3.0.25a-1:
 - patches/fhs.patch: recreate winbindd_cache.tdb in the cache directory
   instead of the lock directory.

Changed in samba:
status: Incomplete → Fix Released
Revision history for this message
darthanubis (darthanubis) wrote :

After latest update, winbind will not start, making apt stall.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.