Created attachment 7699 [details] rfc1321 (Solaris libmd5.so) patch against the samba-3.6.6 There is a name clash of calls MD5Init(), MD5Update() and MD5Final() in samba-3.6.x/lib/crypto/md5.h with libmd5.so on Solaris 9, 10 and 11. On Solaris 10 running on T4 system it will even fail the "net ads join" command. On the other releases it should also represent the performance drop when the generic routines are called from samba's:/lib/crypto/ instead of native ones. Solaris optimizes various crypto algos for amd64, sun4u and especially for sun4v (T1,T2 using the MAU crypto engine) and definitively T4 directly using the crypto instruction set. Dynamic linker on Solaris does not have resources to avoid the "call-back" of Samba function when the function of the same name is called in the Solaris native library. It can cause also the strange behavior of Samba. I am attaching a patch against the samba-3.6.6. Patch to source upstream will need further effort to merge it with the similar issue contributed by Matthieu Patou in: http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=b68f72c7f58c05870100d0d993c9baf0fa80a891
This looks good to me. For example FreeBSD has a /usr/include/sys/md5.h and corresponding lib that appears to do the same. Of course OpenSSL offers similar functionality, but I am not sure we can link to that license-wise. Volker
Looks good to me also. Jiri - can you create a patch for master also ? Thanks ! Jeremy.
Re-assigning to Karolin for inclusion in 3.6.next. Jeremy.
(In reply to comment #2) > Looks good to me also. Jiri - can you create a patch for master also ? > > Thanks ! > > Jeremy. Yes. ...but please later of this week. It is too fast for lazy Jiri :-)
No problem - so long as we have it in master sometime. Won't do to have 3.6.x ahead of 4.0.0 :-). Thanks ! Jeremy.
Pushed to v3-6-test. Still an issue in master.
(In reply to comment #0) > I am attaching a patch against the samba-3.6.6. Patch to source upstream will > need further effort to merge it with the similar issue contributed by Matthieu > Patou in: > http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=b68f72c7f58c05870100d0d993c9baf0fa80a891 This patch has been pushed to the release branch. If other patches are needed as well, please provide them until tomorrow, because the branch will be frozen then. Thanks! Karolin
Created attachment 7728 [details] rfc1321 (Solaris libmd5.so) patch against the git master
> This patch has been pushed to the release branch. If other patches are needed > as well, please provide them until tomorrow, because the branch will be frozen > then. > > Thanks! > > Karolin Thanks for notify. I have tested. Builds fine on Solaris 11 where libmd5.so name clash is off. Jeremy, I have prepared the patch against git master. I apologize for delay. Could it be possible to test it on the build-farm ...focused on BSD and MacOS builds ...which can be affected. Thanks
(In reply to comment #9) > > This patch has been pushed to the release branch. If other patches are needed > > as well, please provide them until tomorrow, because the branch will be frozen > > then. > > > > Thanks! > > > > Karolin > > Thanks for notify. I have tested. Builds fine on Solaris 11 where libmd5.so > name clash is off. > > Jeremy, > > I have prepared the patch against git master. I apologize for delay. Could it > be possible to test it on the build-farm ...focused on BSD and MacOS builds > ...which can be affected. > > Thanks I am afraid that it's too late for Samba 3.6.7 then. The first patch will be included, but the second one needs the review flag first.
as this caused a regression on all the *BSD platforms we should revert that patch in the stable release branch I think. See bug #9086 for example...
Just compiled 3.6.7 on FreeBSD9, and that went through. Haven't digged deeply enough though. But it's not *all* BSDs that fail. openbsd build runs right now.
(In reply to comment #12) > Just compiled 3.6.7 on FreeBSD9, and that went through. Haven't digged deeply > enough though. But it's not *all* BSDs that fail. openbsd build runs right now. Ignore that. Built in the wrong branch. FreeBSD fails as well.
(In reply to comment #11) > as this caused a regression on all the *BSD platforms we should revert that > patch in the stable release branch I think. See bug #9086 for example... Collision(*) with BSDs is fixed in patch against the "master" (*)- mentioned in "Description"
Created attachment 7785 [details] This seems to fix the build on FreeBSD. Can someone test this on Solaris?
Comment on attachment 7785 [details] This seems to fix the build on FreeBSD. works on our Solaris 8 buildfarm machine. Karo, can you please get this to the 3.6 branch? We should also especially watch the *BSD and Solaris buildfarm builds after that.
(In reply to comment #16) > Comment on attachment 7785 [details] > This seems to fix the build on FreeBSD. > > works on our Solaris 8 buildfarm machine. Karo, can you please get this to the > 3.6 branch? We should also especially watch the *BSD and Solaris buildfarm > builds after that. Pushed to v3-6-test. Please clarify if the other patch still needs to be reverted. Thanks!
i think no, the revert was just suggested because it broke the BSD builds, which Volkers Patch now fixed.
v3-6-test is still broken on OpenBSD/NetBSD. Compiling ../lib/crypto/md5.c ../lib/crypto/md5.c:26: error: conflicting types for 'MD5Transform' /usr/include/md5.h:39: error: previous declaration of 'MD5Transform' was here OpenBSD/NetBSD have the MD5 implementation within libc instead of libmd5/libmd.
please test the following patch
Created attachment 7819 [details] possible fix for the netbsd and openbsd cases
That patch fixes the build.
Comment on attachment 7819 [details] possible fix for the netbsd and openbsd cases Compiled on Linux, OpenBSD and FreeBSD
Karo: the "possible fix for the netbsd and openbsd cases" needs to get into the next 3.6 release to fix the regeression that was introduced with the previous release.
Pushed to v3-6-test. Closing out bug report. Thanks!
Please watch this: https://bugzilla.samba.org/show_bug.cgi?id=9330
Why are this patches only included in 3.6 and not master?
do we have any MD5 checks in the waf build? In the old autobuild we tested for MD5Update but I cannot find anything like that in any wscript files.
Ping!
Is this a showstopper for 4.2.0?
Not a 4.2.0 blocker, remember for 4.3...
closing this because starting with Samba 4.11 Samba uses gnutls for all the crypto. Jiri: Did Oracle already provide code for for the Sparc's hw acceleration for gnutls? Otherwise there would be a good reasone to do that now :)