Segfault when joining a Mac OSX client

Andrew Bartlett abartlet at samba.org
Wed Jun 29 22:35:29 MDT 2011


On Wed, 2011-06-29 at 15:12 +0100, Adam Thorn wrote:
> > > Thank-you for your analysis.  The full backtrace would be useful to
> > > avoid miscommunication, and I hope to look into this for you shortly.
> > 
> > A network trace would also be handy.
> 
> Hi Andrew,
> 
> log.samba complete with backtrace follows below. I've snipped out a
> repeated message from ~10:35 til 10:38, which is just recording the fact
> that the samba DC can't comunicate with an offline DC. I'll mail the
> network dump to you seperately.
> 
> Also, we've got things working temporarily by just hacking acl.c to just
> return LDB_ERR_CONSTRAINT_VIOLATION if spn_value contains '$', before it
> gets to the bit which segfaults. The Mac client does then work, but
> obviously that's not a real solution!
> 
> Thanks,
> 
> Adam

> #8  0x00007f4cb5f8b26e in acl_validate_spn_value (mem_ctx=0x23b3cd0, 
>     ldb=0x1356da0, spn_value=0x1f15630 "cosmac$",
> userAccountControl=4096, 
>     samAccountName=0x203f1d0 "COSMAC$", 
>     dnsHostName=0x1f0e330 "cosmac.ad.ch.cam.ac.uk", 
>     netbios_name=0x164c880 "AD", ntds_guid=0x0)
>     at ../source4/dsdb/samdb/ldb_modules/acl.c:509
>         ret = 0
>         krb_ctx = 0x203fa80
>         kerr = 0
>         principal = 0x23552a0
>         instanceName = 0x0
>         serviceType = 0xf8be30 "cosmac$"
>         serviceName = 0x0
>         realm = 0xd998f0 "AD.CH.CAM.AC.UK"
>         forest_name = 0x1f09a30 "ad.ch.cam.ac.uk"
>         base_domain = 0xf89f90 "ad.ch.cam.ac.uk"
>         lp_ctx = 0xcc3810
>         is_dc = false
>         __FUNCTION__ = "acl_validate_spn_value"

This was the clue I needed, and attached is my proposed patches.

Nadya:  Is there a testsuite I should add this too, and as this is your
code, can you look over the patch?

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-dsdb-Allow-a-servicePrincipalName-of-machine.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110630/9262c12c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-s4-dsdb-guard-principalName-parse-for-invalid-inputs.patch
Type: text/x-patch
Size: 1897 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110630/9262c12c/attachment-0001.bin>


More information about the samba-technical mailing list