nss_wrapper support for musl-libc

Dennis Schridde dennis.schridde at uni-heidelberg.de
Thu Aug 3 10:25:36 UTC 2017


Hi Andreas!

I rebased the patches onto current master and applied your changes, hence the 
numbering changed.

On Montag, 29. Mai 2017 15:25:15 CEST Andreas Schneider via samba-technical 
wrote:
> On Monday, 20 February 2017 17:08:33 CEST Dennis Schridde wrote:
> sorry that it too so long. I'm fine with patch 0001 and 0002.

Thanks for committing them.


> For 0003 I think we should detect if we build with MUSL LIBC during
> configure time and have an option in config.h to have 'WITH_MUSL' or
> something like that.

There is no way to detect the presence of musl-libc directly.

The manpage (v4.04) for getaddrinfo says:

> If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canonname 
field of the first of the addrinfo structures in the returned list is set to 
point to the official name of the host.

Notably it says "if" and not "iff".  musl-libc simply provides additional 
information, which does not seem wrong.  Hence I would argue that the test 
should accept both valid behaviours.  I thereforce added a test to 
ConfigureChecks.cmake in patch 0001.

> Then we can use that to enable or disable features and it should make it
> more clean why a check has been added or removed.


> For 0004 please add the code to ConfigureChecks.cmake and use NULL.

Done.  The new patch is 0003.


> 0005 seems to have hunk which belongs to 0004.

On Thu, 26 Jan 2017 10:19:26 +0100 you requested that I should split the patch 
on file boundaries instead of logical boundaries:

On Donnerstag, 26. Januar 2017 10:19:26 CEST Andreas Schneider wrote:
> Please make seperate commits for each file.

Did that policy change and I shall return to logical chunks for my patches?


Since I was so far unable to confirm that musl's behaviour regarding 
getaddrinfo() and EAI_SERVICE is wrong.  Hence I created a patch to deal with 
this difference in the same manner as in the other patches.  The new patch is 
0002.


Please be aware that 2b80c4ce0be8a43fb6ea6abcd4f97105982e239a breaks musl.  
test_nwrap_vector will hang indefinitely in a call to futex() after loading 
tests/libnss_nwrap.so.

Best regards,
Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-tests-Add-musl-libc-1.1-compatibility-gethostent.patch
Type: text/x-patch
Size: 2324 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170803/bf4c76ea/0003-tests-Add-musl-libc-1.1-compatibility-gethostent.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tests-Add-musl-libc-1.1-compatibility-getaddrinfo-IP.patch
Type: text/x-patch
Size: 4433 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170803/bf4c76ea/0001-tests-Add-musl-libc-1.1-compatibility-getaddrinfo-IP.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-tests-Add-musl-libc-1.1-compatibility-getaddrinfo-EA.patch
Type: text/x-patch
Size: 3144 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170803/bf4c76ea/0002-tests-Add-musl-libc-1.1-compatibility-getaddrinfo-EA.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 681 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170803/bf4c76ea/signature.sig>


More information about the samba-technical mailing list