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

smbk5pwd not respecting olcSmbK5PwdEnable on 64-bit platforms



There are a few threads on the web [1][2] where people are running into 
problems with smbk5PwdEnable being set to 'samba' but the smbk5pwd module 
still insisting on loading all the Kerberos configuration regardless, 
which fails if you aren't actually using Kerberos at all.

We have also been experiencing this but I have noticed (and confirmed by 
spinning up two brand-new Debian VMs) that it is only a problem on 64-bit 
machines; 32-bit architectures respect the attribute's value.

I suspect this has something to do with the call to verbs_to_mask() in 
smbk5pwd_cf_func (under the case PC_SMB_ENABLE)[3] - 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().

I wonder if verbs_to_mask() is possibly not 64-bit clean but my C foo is 
not strong enough to confirm or deny this.

Any ideas? For the moment I'm simply using
         case PC_SMB_ENABLE: {
-                slap_mask_t     mode = pi->mode, m;
+                slap_mask_t     mode = pi->mode, m = 0;
but I'm not sure if this could have unintended consequences.

Thanks,

David Adam
zanchey@ucc.gu.uwa.edu.au

[1]: http://www.openldap.org/lists/openldap-technical/201105/msg00136.html
[2]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631120
[3]: 
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=contrib/slapd-modules/smbk5pwd/smbk5pwd.c;h=14b3c7ce5567a9800ead44d6cd07e71c2317f283;hb=refs/heads/OPENLDAP_REL_ENG_2_4#l871