Midnight Commander has a built-in samba library which is used to access data across smb links. This library is taken from an old samba version. This can cause problems since things change as time goes on. For example - current samba version supports something like: "interface = eth1" in smb.conf, the version included in mc does not. This leads to calling gethostname("eth1") 3 times at startup. Recently I have had some problems with the DNS servers I use. I had to wait 3 minutes (!) before mc started because it tried to resolve "eth1" (2 times ) and "ETH1" (which of course wasn't possible because of the DNS server failure). I have created this patch for mc: http://www.spock.mga.com.pl/public/gentoo/mc-4.6.0-samba.patch.bz2 (sorry to put it on an external site but since it's almost 600kb, I didn't want to upload it to Gentoo Bugzilla). It updates mc's samba libraries to 2.2.8a. By doing so it automatically fixes problems described in bug #27212 (which so far required a rather dirty hack). Reproducible: Always Steps to Reproduce:
One more thing. I have just noticed that mc ebuild has "samba? ( >=net-fs/samba-2.2.3a-r1 )" in its DEPEND. I'm not exactly sure this is necessary since mc uses its own built-in libs. Anyone _not_ using samba could check if smb links work in mc?
can you please open a bug on the mc bug tracker as well: https://savannah.gnu.org/bugs/?group=mc
> I'm not exactly sure this is necessary since mc uses its own built-in libs. So can't we link to the installed samba version?
I'll add at bug @ gnu.org soon. As for the samba libs, I believe it was the intention of mc devs to provide it with its own samba code so that mc could be use d to access smb shares on systems with no samba installed. Just as for using an FTP link in mc one doesn't need proftpd (or any other ftp-related software), one does not need samba to use a SMB link. This approach seems quite reasonable for me. To answer your question about linking against installed samba libs, I suppose this could be done. The point is - do we need it and do we want it? I think I could do some hacking and prepare a new patch for mc to allow it to use external samba libs but I would have to be assured that the patch would actually be used :) (this would mean dropping the built-in samba libs for good in Gentoo).
i would prefer using the shared samba libs
Ok then, I guess I'll make another patch soon. Perhaps by that time mc with this new built-in library should be tested? If any problems arise with built-in lib, they will most probably still be there when a shared lib is used. And one more thing - if we are to use shared libs for mc, the code might require maintenance from time to time. I'll try to provide it for as long as possible but shall I not be able to do so, will there be anyone to continue this?
Ok, here it is: http://www.spock.mga.com.pl/public/gentoo/mc-4.6.0-sambalib.patch.bz2 I have tested it with samba 2.2.8a - works fine, and mc is smaller :)
thx, this is a pretty big patch, must it be sooo big?
Actually it doesn't have to. I have managed to bring it down to ca. 300kb (bzipped) and I think this is pretty much everything I can do for now.
thx, will make an ebuild later this week
-r3 now out :)
forgot to close it ;)