Bug 8643 - A Samba update to 3.6 deletes the winbind cache with cached credentials
Summary: A Samba update to 3.6 deletes the winbind cache with cached credentials
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.6.1
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 16:28 UTC by Andreas Schneider
Modified: 2011-12-06 18:41 UTC (History)
0 users

See Also:


Attachments
patch for master (4.02 KB, patch)
2011-12-02 16:28 UTC, Andreas Schneider
no flags Details
git-am fix for 3.6.2 (4.12 KB, patch)
2011-12-04 05:51 UTC, Jeremy Allison
asn: review+
Details
Updated git-am fix that should apply to 3.6.2. (4.02 KB, patch)
2011-12-05 20:34 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2011-12-02 16:28:20 UTC
Created attachment 7154 [details]
patch for master

In Samba 3.6 the format for the cache entries has been changed. So if you have 'winbind offline logon = on' set and you update from 3.5 to 3.6 the cache gets removed cause the validation fails.

The attached patch adds code to upgrade the database format. Please review and push to master if you're fine with it.
Comment 1 Jeremy Allison 2011-12-02 20:15:30 UTC
Doesn't this patch leak memory ?

Who frees the blob allocated with SMB_XMALLOC_ARRAY ?

Jeremy.
Comment 2 Andreas Schneider 2011-12-03 16:18:28 UTC
Yes, it does. Thanks for fixing it. So if this is patch is fine, then Karolin could pick

a3f600521122d1a6d74d16668bd1ea4447c5c867

for 3.6.2 right?
Comment 3 Jeremy Allison 2011-12-04 05:51:57 UTC
Created attachment 7156 [details]
git-am fix for 3.6.2

Yes, this is the one. If you're happy review as +1 and re-assign to Karolin for inclusion.

Jeremy.
Comment 4 Andreas Schneider 2011-12-04 08:00:59 UTC
Karolin, could you please pick the patch for 3.6. Thanks!
Comment 5 Karolin Seeger 2011-12-05 19:12:04 UTC
Patch does not apply to current v3-6-test (33a8e16140):

user@host:/data/git/samba/v3-6-test> git am 0001-s3-winbind-Add-an-update-function-for-winbind-cache.patch
Applying: s3-winbind: Add an update function for winbind cache.
error: patch failed: source3/winbindd/winbindd_cache.c:4093
error: source3/winbindd/winbindd_cache.c: patch does not apply
Patch failed at 0001 s3-winbind: Add an update function for winbind cache.
Comment 6 Jeremy Allison 2011-12-05 20:34:21 UTC
Created attachment 7158 [details]
Updated git-am fix that should apply to 3.6.2.

Sorry about that - updated fix attached.

Jeremy.
Comment 7 Karolin Seeger 2011-12-06 18:41:17 UTC
(In reply to comment #6)
> Created attachment 7158 [details]
> Updated git-am fix that should apply to 3.6.2.
> 
> Sorry about that - updated fix attached.

Pushed to v3-6-test. Thanks a lot!
Closing out bug report.