[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#7082) smbk5pwd not respecting olcSmbK5PwdEnable on 64-bit platforms



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.