Bug 11475 - FreeBSD, linking against libmd5.so instead of libmd.so
Summary: FreeBSD, linking against libmd5.so instead of libmd.so
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.2.3
Hardware: All FreeBSD
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-08-30 23:58 UTC by Timur Bakeyev
Modified: 2019-06-12 23:33 UTC (History)
3 users (show)

See Also:

Fix order of searched libraries for FreeBSD (684 bytes, patch)
2015-08-31 00:04 UTC, Timur Bakeyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Bakeyev 2015-08-30 23:58:04 UTC
The summary and the bug exactly the same as described in #9330 and which was introduced in #9037.

To my surprise after being resolved in Samba 3.6 exactly the same problem re-occured in Samba 4.x, now in a different configuration system.

In certain system configurations, when port www/libwww is installed a wrong libbrary ${LOCALBASE}/lib/libmd5.so is picked up as an implementation of MD5. Unfortunatelly, it is linked with:
 U __stack_chk_fail
 U __stack_chk_guard

which isn't properly resolved on runtime.

System wide, PROPER library for our luck is named differently, /usr/lib/libmd.so. So, but just swapping checks in the configure the problem is resolved, at least on FreeBSD.
Comment 1 Timur Bakeyev 2015-08-31 00:01:49 UTC
The problem is reported by Stefan Esser <se@freebsd.org>.

Comment 2 Timur Bakeyev 2015-08-31 00:04:22 UTC
Created attachment 11381 [details]
Fix order of searched libraries for FreeBSD
Comment 3 Timur Bakeyev 2015-08-31 00:09:21 UTC
Patch is also provided by Stefan Esser.

My question would be - is it necessary to chase any possible MD5 implementation in the system instead of linking with the bundled MD5 implementation?
Comment 4 Andrew Bartlett 2019-06-12 15:13:15 UTC
Fixed by 03cbef2beff02d54063648725a71be6479886d09 in master for Samba 4.11

We no longer try to link against any system MD5, nor supply our own, we use gnutls consistently.
Comment 5 Timur Bakeyev 2019-06-12 23:33:08 UTC
Glad it's finally got resolved :)