Bug 72862 - [PATCH] Support for CIFS + protocol name translation
Summary: [PATCH] Support for CIFS + protocol name translation
Status: RESOLVED FIXED
Alias: None
Product: lanbrowsing
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-18 00:00 UTC by Anders E. Andersen
Modified: 2004-05-23 13:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
zipped source files kio_lan.cpp kio_lan.h (6.99 KB, patch)
2004-01-18 00:06 UTC, Anders E. Andersen
Details
Patch for kio_lan io slave (1.34 KB, patch)
2004-01-18 10:38 UTC, Anders E. Andersen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anders E. Andersen 2004-01-18 00:00:55 UTC
Version:            (using KDE KDE 3.1.5)
Installed from:    Debian testing/unstable Packages

I have created a patch that adds support for detecting CIFS file sharing service on Windows2000/XP and Samba.

CIFS is already supported by kio_smb.

The patch also introduces protocol name translation. This causes the CIFS service to be displayed independently of netbios smb service as a seperate folder on the host called "CIFS", but causes the redirection to still use the SMB:/ protocol.
Comment 1 Anders E. Andersen 2004-01-18 00:06:23 UTC
Created attachment 4220 [details]
zipped source files kio_lan.cpp kio_lan.h

This only affects kio_lan. The control panel support for cifs has not been
added.
Comment 2 Anders E. Andersen 2004-01-18 10:38:53 UTC
Created attachment 4226 [details]
Patch for kio_lan io slave

Smaller and faster version of first patch, and files are created with diff -u
instead of packing the entire source files.
Comment 3 Alexander Neundorf 2004-02-07 20:49:43 UTC
Hi,

thanks for the report and the patch :-)

I have a question: I always thought that CIFS is more or less a synonym for smb. With this patch port 445 is checked. It it succeeds, I can use access it via samba, right ? 
Is it possible that one host offers the services on ports 445 and 139 at the same time ? IOW would be also enough to check ports 445 and 139 and if one of them succeeds offer the smb link ?

Alex
Comment 4 Anders E. Andersen 2004-02-07 21:51:04 UTC
The difference is that cifs is not wrapped inside netbios packets. Besides that the protocol is the same as far as I know. The smb io slave will work with either port since samba supports both.

If you disable netbios over tcp/ip in windows networking, then port 139 will be closed. However as long as file sharing is enabled, port 445 will still be open for CIFS connections. If netbios over tcp/ip is enabled, both ports will be open. Port 139 will be CIFS wrapped inside netbios packets, and port 445 will be plain CIFS over tcp/ip. In this case my patch will cause both ports to be displayed, one with the folder name CIFS (for port 445) and one with folder name SMB (old port 139 connections).

This is why I added the translation, in case both ports are available I thought it would be inappropriate to name both folders SMB.

Of course since smb_io doesn't care which port it uses, it is a possibility that you just check if one of them are available and just show one folder. I don't know if it really does any good to show both. Probably I just patched it that way because it was the easiest to figure out. :)
Comment 5 Alexander Neundorf 2004-02-07 22:02:38 UTC
Subject: Re:  [PATCH] Support for CIFS + protocol name translation

On Saturday 07 February 2004 21:51, andersa@fys.ku.dk wrote:
...
> If you disable netbios over tcp/ip in windows networking, then port 139
> will be closed. However as long as file sharing is enabled, port 445 will
> still be open for CIFS connections. If netbios over tcp/ip is enabled, both
> ports will be open. Port 139 will be CIFS wrapped inside netbios packets,
> and port 445 will be plain CIFS over tcp/ip. In this case my patch will
> cause both ports to be displayed, one with the folder name CIFS (for port
> 445) and one with folder name SMB (old port 139 connections).

Ok, does this mean port 445 is in both cases open ?  (I guess not, right now 
I'm too lazy to look it up)

Alex

Comment 6 Anders E. Andersen 2004-02-07 23:08:57 UTC
> Ok, does this mean port 445 is in both cases open ? (I guess not, right now > I'm too lazy to look it up) 
 
I don't know if you can guarantee that port 445 will be open on all windows file sharing systems. On Windows 2000 and Windows XP I am pretty sure it will be, but perhaps it won't be on very old systems. I think it ought to be open on samba servers as well, but don't take my word for it.

Anders
Comment 7 Anders E. Andersen 2004-05-10 23:08:43 UTC
Just updating.

I don't know where this is heading. I am currently back to using netbios nameservers on my own system, so I actually don't use this patch at the moment.

But still, checking for CIFS on port 445 seems like a good idea.
Comment 8 Stephan Kulow 2004-05-11 11:03:46 UTC
it definitly is. All Windows versions > 95 use always 445 and 139 only under conditions. 

Differentiating between CIFS and SMB is confusing to the user though (and taking that CIFS stands for Common Internet File System, which it simply isn't I wouldn't promote that abbr :)
Comment 9 Anders E. Andersen 2004-05-11 11:10:48 UTC
Well I can take another look at it and do a patch that just checks for the open port.

The only problem is to have it show only one folder, even though it actually finds two open ports. Should straightforward to do though.
Comment 10 Alexander Neundorf 2004-05-21 23:15:51 UTC
Checking for port 445 should work in current cvs HEAD, can you please check ?

Alex
Comment 11 Anders E. Andersen 2004-05-22 19:51:17 UTC
I hope you don't mind that I stick with my Debian packages. Testing KDE cvs stuff is a little too complex/bleeding edge for me I think.

Will it be in 3.2.3?
Comment 12 Alexander Neundorf 2004-05-23 13:08:00 UTC
On Saturday 22 May 2004 19:51, andersa@fys.ku.dk wrote:
...
> Will it be in 3.2.3?

It's a new feature, so it will be 3.3 
Maybe I'll create a single package.

Alex