Issue 7082 - smbk5pwd not respecting olcSmbK5PwdEnable on 64-bit platforms
Summary: smbk5pwd not respecting olcSmbK5PwdEnable on 64-bit platforms
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.23
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-07 11:32 UTC by zanchey@ucc.gu.uwa.edu.au
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description zanchey@ucc.gu.uwa.edu.au 2011-11-07 11:32:40 UTC
Full_Name: David Adam
Version: 2.4.23
OS: Debian
URL: http://www.openldap.org/lists/openldap-technical/201111/msg00034.html
Submission from: (NULL) (2001:44b8:6112:bc00:6ef0:49ff:fe74:26c4)


On 64-bit machines using the contributed smbk5pwd overlay, the smbk5pwd module
insists on trying to load all the Kerberos configuration regardless, even if
smbk5PwdEnable is set to 'samba'.
                                                                                
                   
I suspect this has something to do with the call to verbs_to_mask() in
smbk5pwd_cf_func (under the case PC_SMB_ENABLE) - my very basic printf()
debugging shows that m is set correctly on 32-bit architectures but on 64-bit
architectures returns a varying and strangely-numbered value (4511419,
-1407332384, 353253328 in subsequent runs). The problem goes away if the m
variable is initialised to 0 before the call to verbs_to_mask().

Most of the calls to verbs_to_mask() in the rest of the source initialise the
fourth variable to 0 before calling. Either smbk5pwd also needs to do this, or
the verbs_to_mask function needs to initialise the variable before use. I'm not
sure why this only manifests on 64-bit architectures, as my reduced test case
(can provide if necessary) also fails on 32-bit architectures.
Comment 1 Hallvard Furuseth 2011-11-07 21:45:49 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 Quanah Gibson-Mount 2011-11-07 21:48:28 UTC
changed notes
changed state Test to Release
Comment 3 Hallvard Furuseth 2011-11-07 22:00:14 UTC
Thank you.  I've committed your fix.  verbs_to_mask() adds
bits to an existing mask.

> (...) I'm not sure why this only
> manifests on 64-bit architectures, as my reduced test case (can
> provide if necessary) also fails on 32-bit architectures.

Probably just a coincidence: There happens to be a 0 on the stack
where the compiler puts the m variable on on your 32-bit hosts.

-- 
Hallvard

Comment 4 Quanah Gibson-Mount 2011-11-07 22:06:30 UTC
changed notes
Comment 5 Quanah Gibson-Mount 2011-11-28 18:40:55 UTC
changed notes
changed state Release to Closed
Comment 6 OpenLDAP project 2014-08-01 21:04:39 UTC
Fixed in master.
Fixed in RE24