Ticket #1 (closed enhancement: fixed)

Opened 16 years ago

Last modified 3 years ago

savannah: mc's built-in samba library is out of date

Reported by: spock Owned by: andrew_b
Priority: major Milestone: 4.8.28
Component: mc-vfs Version: 4.6.1
Keywords: samba Cc: info@…
Blocked By: Blocking: #40, #42, #2281, #3938
Branch state: merged Votes for changeset: committed-master

Description (last modified by ossi) (diff)

Original: http://savannah.gnu.org/bugs/?5142

Submitted by:Michał Januszewski <spock>Submitted on:08 Sep 2003 14:20:05
Category:VFSSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.0Operating System:All

Original submission:

The mc's built-in samba library which is used to access data across
smb links 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 (on my box). 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 here). It updates mc's samba libraries to 
2.2.8a. By doing so it automatically fixes another problem - namely,
 with current vesions of libcap an error (redefinition of struct 
statfs) occurs while building mc.

Comment 1 by Pavel Roskin <proski> at Mon 05 Dec 2005 02:06:15 AM UTC:

We'll have this problem as long as mc uses Samba configuration 
files. Every time Samba changes the format of its configuration 
files, mc will have to be upgraded (not just recompiled).

I see two solutions:

1) Use libsmbclient. This way, upgrading Samba will upgrade the 
client library, and mc will recognize new configuration.

2) Don't use Samba configuration files in mc. Use a separate 
configuration file or store all configuration in ~/.mc/ini

I would prefer that we at least try to use libsmbclient, and if it 
doesn't work, let's report it to Samba maintainers. This way, 
libsmbclient will be ready for mc some day.

Comment 2 by Sorin Sbarnea <sorin> at Wed 30 Jul 2008 05:56:11 PM UTC:

I wonder why this wasn't solved in 5 years. It's quite common and 
makes mc unusable. The average timeout is ~1 minute.

Attachments

libsmbclient+doc.tar.gz (239.2 KB) - added by styx 16 years ago.
libsmbclient.h with doxygen doc

Change History

comment:1 Changed 16 years ago by slavazanko

  • Description modified (diff)

comment:2 Changed 16 years ago by slavazanko

Related ticket #40

comment:3 Changed 16 years ago by slavazanko

Related ticket #88

comment:4 Changed 16 years ago by metux

My vote is to kick off the bundled lib completely and
expect it installed on the system.

comment:5 Changed 16 years ago by winnie

  • Blocking 88 added

comment:6 Changed 16 years ago by winnie

  • Blocking 40 added

comment:7 Changed 16 years ago by styx

  • Version pre4.6.1 deleted
  • Milestone set to 4.7

Changed 16 years ago by styx

libsmbclient.h with doxygen doc

comment:8 Changed 16 years ago by styx

  • Milestone changed from 4.7 to future releases

comment:9 Changed 16 years ago by slavazanko

  • Blocking 273 added

(In #273) Need to review internal SAMBA stuff (may me, will replaced by dynamic linking with libsmbclient.so). Then we need to review this ticket.

comment:10 Changed 16 years ago by slavazanko

  • Milestone changed from future releases to VFS Standardisation

comment:11 Changed 15 years ago by slavazanko

  • Blocking 273 removed

(In #273) #1619

comment:12 Changed 14 years ago by andrew_b

  • Blocking 2281 added

comment:13 Changed 14 years ago by andrew_b

  • Version set to 4.6.1
  • Component changed from mc-core to mc-vfs
  • severity set to no branch

comment:14 Changed 13 years ago by andrew_b

  • Blocking 42 added

comment:15 Changed 13 years ago by eventsiaarhus

  • Branch state set to no branch

I cant download this anymore http://www.spock.mga.com.pl/public/gentoo/mc-4.6.0-samba.patch.bz2 ?? Where can i get it ?

David.

Last edited 3 years ago by andrew_b (previous) (diff)

comment:16 Changed 12 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted

comment:17 Changed 12 years ago by slavazanko

  • Keywords samba added
  • Branch state changed from no branch to on rework

Created branch: 1_smbfs

Initial changeset:7a7b4c4c9011493ac88ea772676739b106980cbb

Review, please

comment:18 Changed 11 years ago by ossi

  • Description modified (diff)
  • Reporter changed from slavazanko to spock

comment:19 Changed 9 years ago by andrew_b

  • Milestone changed from 4.8 to Future Releases

comment:20 Changed 6 years ago by andrew_b

  • Blocking 3938 added

comment:21 Changed 6 years ago by andrew_b

  • Blocking 3987 added

comment:22 Changed 5 years ago by metux

  • Cc info@… added

comment:23 Changed 4 years ago by andrew_b

  • Blocking 3987 removed

comment:24 Changed 3 years ago by andrew_b

Ticket #4288 has been marked as a duplicate of this ticket.

comment:25 Changed 3 years ago by birdie

What about adding a warning that only SMB1.0 protocol is supported? This is a very fast fix for the obviously broken feature.

That will stop people from scratching their heads trying to understand why it doesn't work, e.g.

https://unix.stackexchange.com/questions/668049/how-do-i-connect-to-a-smb-samba-share-using-midnight-commander

comment:26 follow-up: ↓ 27 Changed 3 years ago by zaytsev

I'd rather remove the code completely - SMB support has already been disabled in Debian for this very reason, but Fedora people have so far ignored our advice to do the same.

It's been 13 years since it has been half-broken. If somebody needs it, they should finish the branch by Slava... it's not too much work for someone who has time (see sftp VFS).

Andrew, what do you think?

comment:27 in reply to: ↑ 26 Changed 3 years ago by andrew_b

Replying to zaytsev:

I'd rather remove the code completely

I agree.

comment:28 Changed 3 years ago by birdie

Where's the like button?

comment:29 Changed 3 years ago by andrew_b

  • Owner changed from slavazanko to andrew_b
  • Branch state changed from on rework to on review
  • Milestone changed from Future Releases to 4.8.28

Branch: 1_smbfs_remove
Initial changeset: 781ad4c53c5d0752108257813736bf054f60bc60

comment:30 Changed 3 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:31 Changed 3 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [6f676d06676cc5d271583754f15473af78a36ac4].

git log --pretty=oneline 30fbbe75b..6f676d066

comment:32 Changed 3 years ago by andrew_b

  • Status changed from testing to closed

comment:33 Changed 3 years ago by andrew_b

  • Blocking 88 removed
Note: See TracTickets for help on using tickets.