Bug 9321 - winbind offline logon doesn't work
winbind offline logon doesn't work
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Winbind
4.0.0rc3
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks: 8622
  Show dependency treegraph
 
Reported: 2012-10-23 12:28 UTC by Andreas Schneider
Modified: 2012-11-05 10:06 UTC (History)
2 users (show)

See Also:


Attachments
v4-0-test patch (1.12 KB, patch)
2012-10-23 12:32 UTC, Andreas Schneider
no flags Details
Alternative fix that does not change the cache's disk format. (1.50 KB, patch)
2012-11-01 13:57 UTC, Michael Adam
metze: review-
Details
improved alternative fix according to Metze's remark (1.44 KB, patch)
2012-11-01 14:53 UTC, Michael Adam
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2012-10-23 12:28:46 UTC
If you turn on winbind offline logon and try to login with cached credentials it will always fail with:

[2012/10/19 18:39:08.297101,  0] ../source3/winbindd/winbindd_cache.c:335(centry_hash16)
  centry corruption? hash len (126) != 16
Comment 1 Andreas Schneider 2012-10-23 12:32:09 UTC
Created attachment 8103 [details]
v4-0-test patch

Jeremy, please sign-off the patch and push it to master if you're fine with it.
Comment 2 Stefan Metzmacher 2012-10-24 08:49:53 UTC
Wouldn't it be better to restore the 3.6 behavior?
Comment 3 Michael Adam 2012-11-01 13:05:09 UTC
(In reply to comment #2)
> Wouldn't it be better to restore the 3.6 behavior?

Hmm, in the 3.6 branch, the time is also only read but
the read value is not used later on.

So the question is whether it makes sense to restore that
behaviour. It would make sense in order to not change
the disk format of the winbindd cache, so as to easily
survive upgrades whith "offline logons = true".
Comment 4 Stefan Metzmacher 2012-11-01 13:27:57 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Wouldn't it be better to restore the 3.6 behavior?
> 
> Hmm, in the 3.6 branch, the time is also only read but
> the read value is not used later on.
> 
> So the question is whether it makes sense to restore that
> behaviour. It would make sense in order to not change
> the disk format of the winbindd cache, so as to easily
> survive upgrades whith "offline logons = true".

That's what I mean. We should not change on disk format for no reason.
Comment 5 Michael Adam 2012-11-01 13:57:37 UTC
Created attachment 8126 [details]
Alternative fix that does not change the cache's disk format.

Fix without changing disk format.
If appropriate, please ACK and also send to master.
Comment 6 Stefan Metzmacher 2012-11-01 14:12:47 UTC
Comment on attachment 8126 [details]
Alternative fix that does not change the cache's disk format.

I think we should use

(void)centry_time(centry);

to avoid the compiler warning jeremy removed in
21528da9cd12a4f5c
Comment 7 Michael Adam 2012-11-01 14:53:47 UTC
Created attachment 8127 [details]
improved alternative fix according to Metze's remark

improved fix
Comment 8 Stefan Metzmacher 2012-11-01 14:59:51 UTC
Comment on attachment 8127 [details]
improved alternative fix according to Metze's remark

looks good for master and 4.0
Comment 9 Michael Adam 2012-11-01 15:18:06 UTC
(In reply to comment #8)
> Comment on attachment 8127 [details]
> improved alternative fix according to Metze's remark
> 
> looks good for master and 4.0

OK. it's on its way to master.
Will give the bug to Karolin once we have the hash from master to cherry-pick.
Comment 10 Michael Adam 2012-11-01 17:25:41 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Comment on attachment 8127 [details] [details]
> > improved alternative fix according to Metze's remark
> > 
> > looks good for master and 4.0
> 
> OK. it's on its way to master.
> Will give the bug to Karolin once we have the hash from master to cherry-pick.

The attached patch went into master as
commit:

f853c1792967332c4aff52c0fb35f653f614f86d


It applies cleanly to v4-0-test.

Karolin would you do "git cherry-pick -x f853c1792967332c4aff52c0fb35f653f614f86d" to import it into v4-0-test with correct reference or do you need a new attachment here?

Thanks - Michael
Comment 11 Jeremy Allison 2012-11-01 19:15:52 UTC
Sorry about the break of the cache read :-( - I completely missed that in the unused variable clean-up. I should have added a comment instead.

Jeremy.
Comment 12 Karolin Seeger 2012-11-02 07:42:21 UTC
(In reply to comment #10)
> It applies cleanly to v4-0-test.
> 
> Karolin would you do "git cherry-pick -x
> f853c1792967332c4aff52c0fb35f653f614f86d" to import it into v4-0-test with
> correct reference or do you need a new attachment here?

Pushed to autobuild-v4-0-test.
Comment 13 Karolin Seeger 2012-11-05 10:06:03 UTC
Has been pushed to v4-0-test.
Closing out bug report.

Thanks!