[Samba] smbmount

Guenter Kukkukk kernel at kukkukk.com
Tue May 8 00:03:16 GMT 2007


Am Montag, 7. Mai 2007 21:42 schrieb Chris Smith:
> On Monday 07 May 2007, John G Walker wrote:
> > The files are on a W98 system for historical reasons and they are
> > being slowly migrated off. However, the reason I can't just move them
> > is because I'm using Windows programs on the legacy systems. Some I
> > wrote myself, in Visual Basic, so I can't blame anybody else for the
> > situation. Another program I use is Photoshop, which they won't port
> > to Linux (despite the fact it is the program most wanted to be ported
> > to Linux). Etc. I need to keep running Windows as long as I have the
> > need for such stuff.
> 
> The data files don't need to reside on that system. Virtually every app I know 
> of, including Photoshop, can access, open, edit, and save files on remote 
> shares. Some real legacy apps may require mapped drives instead of UNC paths 
> but they should, in most cases, work just fine.
> 
> Chris
> 

Hi all,

just some additions and clarifications from my side.

Samba3 / Samba4
===============
For some years now I'm trying hard to support the samba3 / samba4 team
regarding missing features or bugs related to legacy clients - mainly OS/2,
but also windows9x/me.
Nice and interesting times and the experience, that the samba developers
_always_ have had and _still_ have an open ear, when troubles or wishes 
are reported to them!

The main problem is, that those missing stuff must be _reported_ to them!

These days, most of the samba developers do not have any physical
access to legacy client installations anymore. 
So it's getting more and more important to send them as much background
information as possible, like detailed
  - debug 10 logs
  - network sniffs
  - used samba version and smb.conf settings
  - used operating systems (fixpak level)
  - used file systems (e.g. xattr support)
  - proposed patches
  - ...

In addition, it's very important to help with testing suggested patches
before they go mainstream.
Cause some of those legacy questions can also easily be discussed on irc, 
some years ago I've opened 2 separate channels on irc.freenode.net:
  #samba-os2
  #samba-os2-technical
The names are a bit misleading - but all legacy smb users are welcome there. :-)

To my knowledge, most of the outstanding (OS/2) glitches are solved now.


CIFS kernel module:
===================
When the first discussions about dropping the kernel module smbfs and
its samba userland helpers
  - smbmount
  - smbmnt
  - smbumount
were starting on @samba-technical about a year ago, Jeremy Allison (jra)
told me on irc, that Steve French (sfrench) had already added some 
code to support legacy smb servers within cifs.

That days I started to build my own cifs.ko from the samba hosted cifs-client 
svn repository, to be able to add and test code for possibly missing
features regarding legacy smb servers.

Cause I was not aware of the separately existing mailing list
"linux-cifs-client at lists.samba.org", private email exchange with
Steve was starting to discuss and solve missing stuff - sending
patches back and forth... for many weeks ...
Steve also managed to get access to an OS/2 box, to test stuff himself.
Afaik, he's testing against win9x, too.

I must admit, that we had one big problem that days: Steve was
doing his work on the kernel git-tree - and I was using the samba
cifs-client svn repository...
Both repos got more or less so worse out of sync, that the
simple exchange of patches was no longer feasible.

I'm working as a freelancer and got distracted from cifs due to
other customer needs - which is a bit reflected in 
https://bugzilla.samba.org/show_bug.cgi?id=4090
Sorry for my probably upset comments...

To solve the "2 repository problem", at the end of last year
i did setup a completely separate linux box entirely for cifs stuff.
Installed git, cogito and sparse - and joined LKML.
I'm able to test here against 3 OS/2 and 1 win98 legacy box.

----
One major issue was (and partly is) the reading and writing of
file/directory time stamps - with ugly side-effects on the OS/2
side: due to the parameter "lastwritetime = 0" used on SMBClose, 
all time stamps on the OS/2 side were reset to NULL during file-
browsing. 
BTW - when browsing directories with konqueror, it usually 
tries to display some popup-contents of the file the mouse is over.
   - open file
   - read (part) of the file
   - close the file ==> SMBClose()!! => filetime = zero

Another problem is the fact, that *nix and newer windows are
using UTC as the base for time stamps, but some legacy servers
always use "localtime" and send them on the wire.
 
Today, afaik all of reading time stamps is fixed.
But there are still issues when writing a file/dir.

cp -p linux_src_file os2_dst_file

does not preserve any time stamp (the legacy versions of
setfileinfo() / setpathinfo() are not implemented atm).
I mailed Steve, that this is even true, when copying to
a win2k or winxp server.
Setpathinfo() does not work, when the file is still open.
_Only_ on winNT, a separate open, setfileinfo, close sequence
does work (inode.c -> int cifs_setattr() around line 1600)
I sent Steve a patch for that. I had coded the legacy version
many months ago ... but that days the patches did not work ...

Conclusion
==========
Cifs is in need of supporting developers and testers! :-)
Legacy servers can't simply be the highest ones on the priority list.
There are lots of other outstanding issues and future plans.
Send reports to Steve French! :-)
I'll try myself to spend more time on this ... 

Probably, the mailing list
  linux-cifs-client at lists.samba.org
should be used for cifs related reports. I don't know,
whether it's only developers related.
Archives can be found here:
  http://lists.samba.org/archive/linux-cifs-client/

ATTENTION!
Legacy cifs server _need_ special options, when being mounted
(one line), e.g.:
mount -t cifs //server01/TEST /mnt/server -o user=linux,pass=penguin,sec=lanman,servern=SERVER01

Note "sec= "     ---> security
and  "servern="  ---> servernetbiosname
The kernel build option
CONFIG_CIFS_WEAK_PW_HASH=y
must also be set - security risc!

Anyway - feel free to also join the "legacy" channels on irc.freenode.net:
  #samba-os2
  #samba-os2-technical

Thank you for all your patience.  :-)

Cheers, Guenter


More information about the samba mailing list