OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Networking => Topic started by: Paul Smedley on November 13, 2016, 09:23:06 am

Title: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 13, 2016, 09:23:06 am
Hi All,

As many would be aware, I've been working on a Netdrive Samba plugin for OS/2 for a while now. After my presentation at Warpstock last weekend (Youtube video at https://www.youtube.com/watch?v=WfGoCsvSovQ&feature=youtu.be&a - slides at http://www.warpstock.org/filemgmt/visit.php?lid=240) I thought I should finally make some binaries more widely available.

Note that installation currently requires some manual copying of files, and an existing installation of the Netdrive plugin from http://trac.netlabs.org/samba#Clients

Firstly, download the following:
ndpsmb.dll - http://smedley.id.au/tmp/ndpsmb-3.0-20160930.zip
smbcln44.dll - http://smedley.id.au/tmp/smbcln44-4.4.7-20161028.zip
ldap.dll - http://smedley.id.au/tmp/openldap-2.4.44-os2-20160503.zip
heimdal DLL's - http://smedley.id.au/tmp/heimdal-1.5.3-os2-20160723.zip
mmap.dll - http://rpm.netlabs.org/release/00/zip/mmap-0_5-1_oc00.zip or install via rpm
libcx0.dll - http://smedley.id.au/tmp/libcx0.zip (Note this is a self built version of libcx0.dll - rpm version may work as well)

ndpsmb.dll needs to go in x:\ndfs\ndplugs - I suggest smbcln44.dll goes in the same directory.

Other dll's need to be available in the libpath.  Note that for heimdal, unless you're using a kerberos enabled share, you only need the DLL's from /heimdal/bin

To connect to a kerberos enabled server (ie Windows Server), you'll also need kinit.exe from /heimdal/bin and potentially some of the other executables

At this point, restarting ndctl.exe should result in a working Samba.

Before rebooting, it is *VERY* important that you remove the line that loads ndctl.exe from config.sys, ie 'RUN=C:\NDFS\NDCTL.EXE' and add 'detach ndctl.exe' to startup.cmd.  If you don't do this, it's VERY likely you'll get system hangs as the WPS is starting up. The causes of this are being investigated.

If problems are found, please either email me details - or raise a ticket against Client 3.0.x at http://trac.netlabs.org/samba/newticket

In particular, logs are useful - see my presentation slide 24 for details on creating logs.

Feedback appreciated.

Thanks to Lewis Rosenthal for his support for this project.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 13, 2016, 09:26:32 am
Note that EVFS should in theory also work, but it's not tested.

Also, this has been tested against the following servers (off the top of my head)
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on November 13, 2016, 02:56:26 pm
 Thanks, Paul! I had a little trouble getting it to work at first - copied all the files as you described and then rebooted. Boot stopped with a blinking cursor right where the desktop should appear. CAD and booted to command line and renamed ndpsmb.dll to ndpsmb.dlx. Then I could boot to the desktop again. Did that 3 or 4 times, each time I got a popuplog:

11-13-2016  08:25:49  SYS3175  PID 0023  TID 0001  Slot 0008
C:\OS2\PMSHELL.EXE
c0000005
1dfc07a1
P1=00000002  P2=1dfd899e  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000044  EBX=1dfd899e  ECX=00000000  EDX=0005079c
ESI=0005079c  EDI=1dfd899e 
DS=0053  DSACC=d0f3  DSLIM=9fffffff 
ES=0053  ESACC=d0f3  ESLIM=9fffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1dfc07a1  CSACC=d0df  CSLIM=9fffffff
SS:ESP=0053:0004f158  SSACC=d0f3  SSLIM=9fffffff
EBP=0004f1a4  FLG=00010206

VBE2GRAD.DLL 0001:000007a1

  I finally read your instructions again and tried stopping the NDFS control program, then renaming ndpsmb.dlx to *.dll, then restart the control program. Now it works! I can attach to my OS/2 SAMBA 3.6 server. Crossed my fingers and rebooted, and now it reboots to the desktop with no trouble.

 Not sure what the issue was, but it seems OK now...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 13, 2016, 07:42:37 pm
Ok I managed to leave out a very important step.

For reasons still unknown, with this plugin, if ndctl.exe is started from config.sys, hangs can occur.

So, it's necessary to comment out the line that loads ndctl.exe from config.sys and add something like 'detach ndctl.exe' to startup.cmd

Apologies for missing this in the original write-up, I'll go modify the original post to reflect this as well.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on November 14, 2016, 12:33:03 pm
 Paul - I've been running ndctl.exe from CONFIG.SYS without any problem ever since I stopped the control program, added the new ndpsmb.dll, then started it that one time from the WPS. Maybe that is all that is needed to prevent hangs?
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 14, 2016, 08:34:56 pm
Hi Dave,

Paul - I've been running ndctl.exe from CONFIG.SYS without any problem ever since I stopped the control program, added the new ndpsmb.dll, then started it that one time from the WPS. Maybe that is all that is needed to prevent hangs?

Interesting - what mix of plugins are you loading in ndctl.cfg?
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on November 14, 2016, 11:05:49 pm
Plugins=ndpftp,ndpntfs,ndpsmb,ndpiso,ndpdav,ndpudf

HTH...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 15, 2016, 09:22:21 am
Hi David,

Plugins=ndpftp,ndpntfs,ndpsmb,ndpiso,ndpdav,ndpudf

Interesting.... still unclear why it is OK for some but not others. What video/network drivers do you run?

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on November 15, 2016, 12:16:43 pm
Paul,

  I use Panorama for video, and MMRE from Multimac for network (TCPIP only)...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 18, 2016, 09:07:49 pm
Quote
Note that installation currently requires some manual copying of files, and an existing installation of the Netdrive plugin from http://trac.netlabs.org/samba#Clients

It took some serious guessing, about where to put files, but I did get this to work with EVFSGUI and EVFSCTL (not well tested, and EVFSCTL is loaded in CONFIG.SYS). I also used the RPM packages, as installed by ANPM (RPM/YUM). Yes, it does log onto win 10, and it seems to work (although not all that well, but I think it is EVFSGUI that causes the problems).

The main "problem" is that if the user interrupts populating the file list, before it is finished doing it, the WPS will lock up, and a reboot must be forced (CADH works). This is a problem that I have seen with EVFSGUI  for ages, although later versions (if you can find the right combination of parts), work a lot better.

THANKS...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 18, 2016, 10:06:45 pm
Hi Doug,

Quote
Note that installation currently requires some manual copying of files, and an existing installation of the Netdrive plugin from http://trac.netlabs.org/samba#Clients

It took some serious guessing, about where to put files, but I did get this to work with EVFSGUI and EVFSCTL (not well tested, and EVFSCTL is loaded in CONFIG.SYS). I also used the RPM packages, as installed by ANPM (RPM/YUM). Yes, it does log onto win 10, and it seems to work (although not all that well, but I think it is EVFSGUI that causes the problems).

The main "problem" is that if the user interrupts populating the file list, before it is finished doing it, the WPS will lock up, and a reboot must be forced (CADH works). This is a problem that I have seen with EVFSGUI  for ages, although later versions (if you can find the right combination of parts), work a lot better.

THANKS...

Thanks for testing. I'd be interested in logs of your scenario above if possible. Or some more detail around what you mean by user interrupting the file list before it's finished doing it, and I can try and reproduce with netdrive here. I guess you mean opening up a folder with a lot of files, and before it finishes loading details on all the files, change folder?

This could be similar to http://trac.netlabs.org/samba/ticket/153 - but that's just a guess without seeing logs.

Thanks,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 19, 2016, 03:34:20 am
Quote
Thanks for testing. I'd be interested in logs of your scenario above if possible. Or some more detail around what you mean by user interrupting the file list before it's finished doing it, and I can try and reproduce with netdrive here. I guess you mean opening up a folder with a lot of files, and before it finishes loading details on all the files, change folder?

This could be similar to http://trac.netlabs.org/samba/ticket/153 - but that's just a guess without seeing logs.

It may be related.

I will try to get a log later, but the way to reproduce it is:

Reboot the system (to clear any cache data).

Start EVFSGUI.

Connect to a large share (I use the largest drive on another system, with SAMBA server, or windows server).

Open the shared drive.

Wait for a few of the directories to be displayed (but not all of them).

Interrupt the file list by double clicking one of those directories.

Most of the time, the WPS will freeze.

I suspect that EVFSGUI is responsible because I cannot reproduce that when I use a windows client to a SAMBA, or windows, server.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 19, 2016, 04:09:45 am
Hi Doug,

I can't reproduce here with Netdrive. The folder I tried has about 200 subfolders - either this isn't enough, or it isn't a problem with Netdrive <shrug>.

If I get a chance, I'll install a fresh eCS VM with evfs and do some testing there.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 19, 2016, 04:32:47 am
Quote
I can't reproduce here with Netdrive. The folder I tried has about 200 subfolders - either this isn't enough, or it isn't a problem with Netdrive <shrug>.

I never used Netdrive, so I can't comment. 200 subfolders should be enough to show the problem. As I said, I am pretty sure that it is EVFSGUI that is causing the problem (although the drive folder display is probably something else). It looks like they just lifted the RAMFS file system, (complete with the 64 meg size), and pasted the contents of the file system into it. That is where the problem actually lies. The problem doesn't show, as long as you wait for the display to be completely updated, before trying to use it.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 21, 2016, 01:25:45 am
Quote
I will try to get a log later,

I finally got to this. The log shows one access that worked okay, even though I double clicked the Download directory before the drive tree was completed. That ends at 16:44. Then, I rebooted both systems, and tried again. Logging seems to make it work better, but it did freeze. I did the same as before, the Download directory opened it's window, the drive tree continued to populate for a short period of time, and then the WPS was frozen. After waiting for about 1 minute, I rebooted to my alternate system, and saved the log (log.ndpsmb). It doesn't tell me anything, but somebody else may see something that I don't.

Okay, the log was too big, so I had to ZIP it.

Thanks...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 21, 2016, 03:20:15 am
Hi Doug,

Quote
I will try to get a log later,

I finally got to this. The log shows one access that worked okay, even though I double clicked the Download directory before the drive tree was completed. That ends at 16:44. Then, I rebooted both systems, and tried again. Logging seems to make it work better, but it did freeze. I did the same as before, the Download directory opened it's window, the drive tree continued to populate for a short period of time, and then the WPS was frozen. After waiting for about 1 minute, I rebooted to my alternate system, and saved the log (log.ndpsmb). It doesn't tell me anything, but somebody else may see something that I don't.

Okay, the log was too big, so I had to ZIP it.

Only a quick review during lunch - but does 16:48:29.99 correspond to the time of the hang? There's nothing too obvious in there, but I'll take a closer look this evening.

Cheers,

Paul.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 21, 2016, 07:39:51 am
Quote
Only a quick review during lunch - but does 16:48:29.99 correspond to the time of the hang? There's nothing too obvious in there, but I'll take a closer look this evening.

I am not sure if the WPS was hung before that, or at that time. It did continue to populate the drive tree, after I opened the Download folder,  but I am not sure if it ever finished (the tree is larger than the drive window). The Download folder opened a window, but I never saw anything in it. The mouse continued to move, but clicks were ignored. I was able to get to CADH, where I tried a REBOOT, but that never happened. I had to use the reset button. With previous hangs, I had left it sit for about 10 minutes, with no further activity. This never happens as long as I am careful to let each step complete (and count to 5), before going to the next step.

I hope you can see something, because I can't.

Thanks...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on November 21, 2016, 07:46:45 am
installed by ANPM (RPM/YUM). Yes, it does log onto win 10, and it seems to work (although not all that well, but I think it is EVFSGUI that causes the problems).

...

Doug,

How did you get EVFS to log into Win 10 ?  What version of EFFS GUI and version of Commandline utilities ?

Settings on Win 10 networking (using passwords or not) ?
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 21, 2016, 07:55:58 am
Hi Greggory,

installed by ANPM (RPM/YUM). Yes, it does log onto win 10, and it seems to work (although not all that well, but I think it is EVFSGUI that causes the problems).

...

How did you get EVFS to log into Win 10 ?  What version of EFFS GUI and version of Commandline utilities ?

Settings on Win 10 networking (using passwords or not) ?

afaik - with the Samba 4.4.x plugin, connectivity to Win10 should work - with evfs or with Netdrive....

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 21, 2016, 07:34:40 pm
Quote
How did you get EVFS to log into Win 10 ?  What version of EFFS GUI and version of Commandline utilities ?

Well, this is what Help-> About says:
Code: [Select]
Samba Client Versions:
File system EVFS Version 1.002
Plugin file M:\ecs\dll\ndpsmb.dll
Plugin Vendor netlabs
Plugin Revision 3.00.x
Plugin Date/Time 30 Sep 2016 12:42:18
Plugin Build Machine ECS85332116
Plugin Language Code en
Plugin File Version 3.0
Plugin Description NDPSMB - SMBFS NetDrive External Plugin Build beta-date
Commandline utilities Version 4.4.7
EVFSGUIVersion 2.5.RC7-[2014-11-14]

I don't know if it is ndpsmb.dll, the Command Line Utilities, Heimdal, or openLDAP that makes it work (probably the combination). 

I should mention that I moved EVFSCTL.EXE to start in the startup folder.

While it appears that I can log in, and the initial tree is displayed, it seems that I have the same problem described above, where  the WPS locks up when I attempt to open a directory, even if I wait more than long enough for it to finish.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 21, 2016, 09:07:41 pm
Hi Doug,

While it appears that I can log in, and the initial tree is displayed, it seems that I have the same problem described above, where  the WPS locks up when I attempt to open a directory, even if I wait more than long enough for it to finish.

Are you able to test access via the command line and via an applications file open dialog to the Windows 10 share? I'll dig into trying to reproduce the WPS issue when I get an opportunity here - I now have a spare laptop with Windows 10, so can setup a test here locally. Looking into http://trac.netlabs.org/samba/ticket/153 at the moment

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on November 21, 2016, 10:57:36 pm
Thx Paul and Doug !
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 22, 2016, 03:13:51 am
Quote
Are you able to test access via the command line

It has been about two years since I dug into that, so I don't remember much about it, but I will give it a shot.

Quote
and via an applications file open dialog to the Windows 10 share?

Not sure what I can use, but I will try something.

Thanks...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 22, 2016, 03:36:51 am
Hi Doug,

Quote
Are you able to test access via the command line

It has been about two years since I dug into that, so I don't remember much about it, but I will give it a shot.

Quote
and via an applications file open dialog to the Windows 10 share?

Not sure what I can use, but I will try something.

From a command line - all I mean is interacting with the shared drive using 'dir' and 'cd' to move through the tree structure, and potentially using e.exe to open text files.

As mentioned, I'll try do some local testing using Windows 10 and Netdrive ASAP.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 22, 2016, 04:31:10 am
Quote
From a command line - all I mean is interacting with the shared drive using 'dir' and 'cd' to move through the tree structure, and potentially using e.exe to open text files.

Okay, I mounted the drive, but did not open the drive object. Then, I did as you suggest, using 'dir' and 'cd' to move around, in both shares. No problems. So I opened a few text files, and that worked, so I tried a few ZIP files with the archive viewer. Again, no problems. Then, I tried the drive object, and it opened the initial tree, but when I tried to open a sub directory (share), it froze (same as before).

After a reboot, I attached the drive again, and tried to open FM/2. It crashed immediately with a TRAP 0008, but it didn't tell me what trapped. After another reboot, I tried FM/2 again. This time it did not trap, but when I opened the SAMBA drive, and a share, it froze.

Hope this helps...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Andi B. on November 22, 2016, 08:42:15 am
I tried FM/2 again. This time it did not trap, but when I opened the SAMBA drive, and a share, it froze.
When I tested FM/2 the last time it hangs the WPS even with netdrive ftp shares. I think this is because FM/2 wants to read the whole directory structure of the drive. But this takes ages on big ftp drives. Maybe there is an option to turn of this 'feature'.

That is one reason why I still stay with LarsenCommander instead. It tries to read only the root directory files, but not subdirectories. So it generally 'times out' a lot faster. While it does wait on the file data the WPS hangs. For ftp it takes multiple times the setting of 'ftp retires x time out'. F.e. setting 2 retries and 5s timeout it will take about 2 x 2 x 5s = 20s (approximately) until the WPS starts responding again. While with FM/2 it takes ages (or forever). Similar with WPS objects - I learned not to use them with slow drives (ftp, network, ...).

Maybe this observation is similar with what you see with the samba plugin. HTH
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 22, 2016, 09:29:12 am
Thanks Andi - interesting comments. Doug - what kind of connection are you accessing the Windows 10 share from?

I may try digging out the old T60 laptop I have here, that has genmac support for the wifi. That was I can test WPS with a 'slow' connection and see if I can reproduce your issue.

I'm running eCS virtualised on this laptop, with a high speed wifi connection.

Will charge up the T60 and try and test later this week.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Andi B. on November 22, 2016, 11:39:15 am
Just another thought - with ftp it does not help to use a 'high speed' connection. Even with GBit LAN it takes time for the ftpserver to respond on the different requests from the client. As there are requests for every file (maybe even more than one request per file) it sums up to non-usable times delays. On the other hand good old netbios is muuuuuch faster in such situations. Hope Samba is nearly as fast than netbios.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 22, 2016, 07:57:46 pm
Quote
Doug - what kind of connection are you accessing the Windows 10 share from?

It is a 1 Gbit LAN. I have a couple of machines that run at 100 Mbit/s, and they don't seem to be any different.

Quote
Hope Samba is nearly as fast than netbios.

Now that is part of the puzzle. I never saw a problem like that with netbios, but I quit using netbios when I had a need to transfer files larger than 2 GB (probably 10 years ago). Generally, it appears that SAMBA client (which is, apparently, based on RSYNC), tries to run at 100 Mbit/s speeds (as shown by IPMonitor). RSYNC client does the same. However both SAMBA, and RSYNC, will run much faster (5 to 7 times) when running as a server (with a windows client, or multiple OS/2 clients). I suspect that they both look at the speed that the system returns (it is in netstat -n), which is always 100 Mbit/s, when it should be 1 Gbit/s, and throttle themselves accordingly. However, I am pretty sure that speed really has nothing to do with the hang problem. A system attached with a 54 Mbit/s WiFi does exactly the same, and recent testing shows that the problem doesn't happen when I simply use the command line. That puts it into the realm of whatever is used to display the drive contents in the WPS.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on November 22, 2016, 08:10:23 pm
Hi Doug,

Quote
Hope Samba is nearly as fast than netbios.

Now that is part of the puzzle. I never saw a problem like that with netbios, but I quit using netbios when I had a need to transfer files larger than 2 GB (probably 10 years ago). Generally, it appears that SAMBA client (which is, apparently, based on RSYNC), tries to run at 100 Mbit/s speeds (as shown by IPMonitor). RSYNC client does the same. However both SAMBA, and RSYNC, will run much faster (5 to 7 times) when running as a server (with a windows client, or multiple OS/2 clients). I suspect that they both look at the speed that the system returns (it is in netstat -n), which is always 100 Mbit/s, when it should be 1 Gbit/s, and throttle themselves accordingly. However, I am pretty sure that speed really has nothing to do with the hang problem. A system attached with a 54 Mbit/s WiFi does exactly the same, and recent testing shows that the problem doesn't happen when I simply use the command line. That puts it into the realm of whatever is used to display the drive contents in the WPS.

Something I forgot to ask earlier - do you have any entries in popuplog.os2 relating to evfs? potentially entries for evfsctl.exe?

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Doug Bissett on November 22, 2016, 09:33:42 pm
Quote
Something I forgot to ask earlier - do you have any entries in popuplog.os2 relating to evfs? potentially entries for evfsctl.exe?

No. I do see the odd entry for PMSHELL (usually at system shutdown), but not at the time of the hangs.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on December 11, 2016, 03:23:57 am
Hi All,

As many would be aware, I've been working on a Netdrive Samba plugin for OS/2 for a while now.
...
heimdal DLL's - http://smedley.id.au/tmp/heimdal-1.5.3-os2-20160723.zip

That package is pretty sizeable...can you recommend what to and what NOT to install? I did grab all the DLLs and the kinit.exe file...but since I'm only connecting to a WinXP and Win7Pro box I do not even know if I need these?

libcx0.dll - http://smedley.id.au/tmp/libcx0.zip (Note this is a self built version of libcx0.dll - rpm version may work as well)

Happy to report that the latest available YUM/RPM release of libcx seems to be doing fine as well.

As always, Thanks Paul for the great stuff you keep on bringing us!
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on December 11, 2016, 09:20:47 am
Hi Dariusz,

Hi All,

As many would be aware, I've been working on a Netdrive Samba plugin for OS/2 for a while now.
...
heimdal DLL's - http://smedley.id.au/tmp/heimdal-1.5.3-os2-20160723.zip

That package is pretty sizeable...can you recommend what to and what NOT to install? I did grab all the DLLs and the kinit.exe file...but since I'm only connecting to a WinXP and Win7Pro box I do not even know if I need these?

libcx0.dll - http://smedley.id.au/tmp/libcx0.zip (Note this is a self built version of libcx0.dll - rpm version may work as well)

Happy to report that the latest available YUM/RPM release of libcx seems to be doing fine as well.

As always, Thanks Paul for the great stuff you keep on bringing us!

From the heimdal package, all that's needed is the DLL's. At some point, I'll get the Samba provided heimdal working, but that won't be until https://github.com/bitwiseworks/libcx/issues/23 is fixed. 

Thanks for the feedback :)

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on December 14, 2016, 06:10:23 pm
Any luck on getting EVFS connecting to Win 10 ? I got NetDrive working.

The commandline syntax for EVFS would be great !!!

Update: I got EVFS working wrong libcx0.dll

So, I'm seeing a different result Paul with libcx0.dll needed the one you provided.


Thank you Paul

Greggory
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on December 21, 2016, 09:56:14 am
Hi All,

Anyone using the updated Samba 4.x plugin on shares that use SMB2 or above should read https://trac.netlabs.org/samba/ticket/279

There is a test fix in that ticket.

Whilst the bug has only been discovered using the MED editor, I'm sure there must be other OS/2 software that could induce the same bug.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on December 21, 2016, 09:58:08 am
Hi Greggory,

Any luck on getting EVFS connecting to Win 10 ? I got NetDrive working.

The commandline syntax for EVFS would be great !!!

Update: I got EVFS working wrong libcx0.dll

So, I'm seeing a different result Paul with libcx0.dll needed the one you provided.


Thank you Paul

Greggory

Any chance of a writeup on how to get this working with evfs?

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on December 21, 2016, 04:17:44 pm

Any chance of a writeup on how to get this working with evfs?

Cheers,

Paul

Sure, I have about 5 or 6 going now but I'll put this out first (both server & client).  But, going on a cruise next week so could be a couple weeks.

If someone could post their command line syntax for EVFS that would be great !  I would like to add that section to the article.


Greggory
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on December 22, 2016, 05:03:03 am
Hi All,

Anyone using the updated Samba 4.x plugin on shares that use SMB2 or above should read https://trac.netlabs.org/samba/ticket/279

There is a test fix in that ticket.

Whilst the bug has only been discovered using the MED editor, I'm sure there must be other OS/2 software that could induce the same bug.

A better fix to this is contained in an updated Samba support DLL, based on Samba 4.4.8 level - with the additional inclusion of a fix for cli_ftruncate() when running on SMB2+ (https://bugzilla.samba.org/show_bug.cgi?id=12479) at http://smedley.id.au/tmp/smbcln44-4.4.8-20161222.zip

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on January 14, 2017, 11:05:16 am
Hi All,

Anyone using the updated Samba 4.x plugin on shares that use SMB2 or above should read https://trac.netlabs.org/samba/ticket/279

There is a test fix in that ticket.

Whilst the bug has only been discovered using the MED editor, I'm sure there must be other OS/2 software that could induce the same bug.

A better fix to this is contained in an updated Samba support DLL, based on Samba 4.4.8 level - with the additional inclusion of a fix for cli_ftruncate() when running on SMB2+ (https://bugzilla.samba.org/show_bug.cgi?id=12479) at http://smedley.id.au/tmp/smbcln44-4.4.8-20161222.zip

Cheers,

Paul

Hi All,

OS/2 build of smbcln44.dll based on Samba 4.4.9 is now available from:

http://smedley.id.au/tmp/smbcln44-4.4.9-20170114.zip (DLL & map file included).

As well as the changes in 4.4.9, a patch for https://bugzilla.samba.org/show_bug.cgi?id=12479 is also included - this patch will be part of Samba 4.4.10, but is critical for the OS/2 client with SMB2+ connections.

This build also minimises usage of mmap() from mmap.dll to help with Lewis's crash with locatedb

Feedback appreciated.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on March 05, 2017, 10:55:10 pm
Posted new article on installing the Samba 4 plugin /w NetDrive

http://os2notes.net

Also, I'm looking for the command line syntax that you use with EVFS for the next part of the article.


Greggory
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on March 06, 2017, 09:12:12 am
Hi Greggory,

Posted new article on installing the Samba 4 plugin /w NetDrive

http://os2notes.net

Also, I'm looking for the command line syntax that you use with EVFS for the next part of the article.

Thanks for posting this. I can't help with EVFS syntax - hopefully some others can.

Incidentally, I ported Samba 4.4.10 - updated plugin at: http://smedley.id.au/tmp/smbcln44-4.4.10-20170304.zip

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on March 06, 2017, 10:09:58 am
Thx, updated the new link for smbcln44-4.4.10-20170304.zip !
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on March 13, 2017, 07:31:45 am
Thx, updated the new link for smbcln44-4.4.10-20170304.zip !

Some more updates:

A Samba 4.5.6 client:
smbcln45.dll and smbclient.exe:
http://smedley.id.au/tmp/smbcln45-4.5.6-20170312.zip

ndpsmb.dll (relinked against smbcln45.dll and labelled as client 3.1:
http://smedley.id.au/tmp/ndpsmb-3.1-samba45-20170312.zip

& a Samba 4.6.0 client (this one needed more source changes that the above)
smbcln46.dll and smbclient.exe:
http://smedley.id.au/tmp/smbcln46-4.6.0-20170312.zip

ndpsmb.dll based on Samba 4.6.0 is at http://smedley.id.au/tmp/ndpsmb-3.2-samba46-20170313.zip (needs smbcln46.dll from the above)

Feedback appreciated - Samba 4.4 is security fixes only now.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Greggory Shaw on March 19, 2017, 12:48:40 am
Some more updates:

Samba 4.6.0 client (this one needed more source changes that the above)
smbcln46.dll and smbclient.exe:
http://smedley.id.au/tmp/smbcln46-4.6.0-20170312.zip

ndpsmb.dll based on Samba 4.6.0 is at http://smedley.id.au/tmp/ndpsmb-3.2-samba46-20170313.zip (needs smbcln46.dll from the above)

Feedback appreciated - Samba 4.4 is security fixes only now.

Cheers,

Paul

Updated for Samba 4.6, little testing but working with my Win10 & latest Samba/2 server so far !

http://os2notes.net/os2samba.html

Thx Paul !
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on March 19, 2017, 02:48:53 am
 Samba 4.6 seems to work well here too with Win10 and latest Samba/2 server - thanks!
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on March 19, 2017, 06:16:01 am
Samba 4.6 seems to work well here too with Win10 and latest Samba/2 server - thanks!

Thanks guys - http://smedley.id.au/tmp/ndpsmb-3.2-samba46-20170317.zip fixes an issue where the client would fail to connect if WORKGROUP was not set

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: David McKenna on March 19, 2017, 03:01:55 pm
Paul,

  I'm getting a 404 'not found' on that link....
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on March 20, 2017, 12:24:27 am
Oops - link edited above...
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on March 25, 2017, 03:42:51 pm
...& a Samba 4.6.0 client (this one needed more source changes that the above)
smbcln46.dll and smbclient.exe:
http://smedley.id.au/tmp/smbcln46-4.6.0-20170312.zip

ndpsmb.dll based on Samba 4.6.0 is at http://smedley.id.au/tmp/ndpsmb-3.2-samba46-20170313.zip (needs smbcln46.dll from the above)

Feedback appreciated - Samba 4.4 is security fixes only now.

Cheers,

Paul

Took a stab at the move to 4.6 and thrilled to report a SUCCESS!!!

Thanks Paul for continuing this work and huge thanks to Greggory, as I had originally in my update process missed something which resulted in the NDFS not recognizing the updated plugin...reviewing your docs allowed me to proof things out a step at a time!
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on March 25, 2017, 09:18:11 pm
Hi Dariusz,

...& a Samba 4.6.0 client (this one needed more source changes that the above)
smbcln46.dll and smbclient.exe:
http://smedley.id.au/tmp/smbcln46-4.6.0-20170312.zip

ndpsmb.dll based on Samba 4.6.0 is at http://smedley.id.au/tmp/ndpsmb-3.2-samba46-20170313.zip (needs smbcln46.dll from the above)

Feedback appreciated - Samba 4.4 is security fixes only now.

Took a stab at the move to 4.6 and thrilled to report a SUCCESS!!!

Thanks Paul for continuing this work and huge thanks to Greggory, as I had originally in my update process missed something which resulted in the NDFS not recognizing the updated plugin...reviewing your docs allowed me to proof things out a step at a time!

Thanks for the feedback - one of the future goals is to make this easier to install - whether that ends up being rpm or wpi I don't know yet.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on April 02, 2017, 03:48:55 am
Are any of you guys running into problems attempting to do COPY/PASTE to a SAMBA target???

I was trying to do so today actually...a quick movie, attempted to do a WPS/XWP copy/paste and this would produce a SYS0266:

=== START ===
SYS0266: The specified file was not copied.

EXPLANATION: Either the source and target files are not in the same
file system or the operating system does not support COPY for this
file system.

ACTION: Check the source and target file names and retry the operation.
=== STOP ===

...and yet going to CLI I had absolutely no problem accomplishing this...any ideas?
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dave Yeo on April 02, 2017, 05:54:13 am
Wouldn't the fact that they are not on the file system trigger the sys2066?
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 02, 2017, 07:29:18 am
Are any of you guys running into problems attempting to do COPY/PASTE to a SAMBA target???

I was trying to do so today actually...a quick movie, attempted to do a WPS/XWP copy/paste and this would produce a SYS0266:

=== START ===
SYS0266: The specified file was not copied.

EXPLANATION: Either the source and target files are not in the same
file system or the operating system does not support COPY for this
file system.

ACTION: Check the source and target file names and retry the operation.
=== STOP ===

...and yet going to CLI I had absolutely no problem accomplishing this...any ideas?

Hi Dariusz,

Can you open a ticket for this at netlabs Samba? Including steps to reproduce? I'll attempt to reproduce this afternoon when I get home.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 02, 2017, 09:10:58 am
Are any of you guys running into problems attempting to do COPY/PASTE to a SAMBA target???

I was trying to do so today actually...a quick movie, attempted to do a WPS/XWP copy/paste and this would produce a SYS0266:

=== START ===
SYS0266: The specified file was not copied.

EXPLANATION: Either the source and target files are not in the same
file system or the operating system does not support COPY for this
file system.

ACTION: Check the source and target file names and retry the operation.
=== STOP ===

...and yet going to CLI I had absolutely no problem accomplishing this...any ideas?

Hi Dariusz,

Can you open a ticket for this at netlabs Samba? Including steps to reproduce? I'll attempt to reproduce this afternoon when I get home.

OK - I can reproduce - BUT - only if I try and copy to my q:\ - which is read only - as it's just a map of all the shares on my Samba server.  If I copy to q:\public which is a valid read/write share on my samba server - the copy/paste via wps works fine.

If you're scenario is different, please open a ticket, and preferably attach a log.ndpsmb

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on April 02, 2017, 06:12:09 pm
Paul,

...OK - I can reproduce - BUT - only if I try and copy to my q:\ - which is read only - as it's just a map of all the shares on my Samba server.  If I copy to q:\public which is a valid read/write share on my samba server - the copy/paste via wps works fine.

If you're scenario is different, please open a ticket, and preferably attach a log.ndpsmb...

Alright, I double checked in my NAS box's setup that all clients had FULL access...heck, to make sure I actually went through the 'Advanced' option and expanded to specific user_ids, where 'admin' happens to be the ID I use for the samba mapping in NetDrive. So I think the NAS setups are correct, and it always works through command line interface, just the WPS that and Larsen Commander both fail.

Regarding log.ndpsmb...what do I need to do to turn this on? I have an old version of this log, which grew to some 96Meg, I then shut something off, just don't remember what. It may have been the 'Global Settings => Debug' check-box in the EVFSGUI control app, but I rarely use this, instead I am typically using NetDrive and do not see anything there to enable/disable the DEBUG. No problem going back to EVFSGUI though...

Is this a CONFIG.SYS SET=xxx I could do?


Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 03, 2017, 12:15:11 am
Paul,

...OK - I can reproduce - BUT - only if I try and copy to my q:\ - which is read only - as it's just a map of all the shares on my Samba server.  If I copy to q:\public which is a valid read/write share on my samba server - the copy/paste via wps works fine.

If you're scenario is different, please open a ticket, and preferably attach a log.ndpsmb...

Alright, I double checked in my NAS box's setup that all clients had FULL access...heck, to make sure I actually went through the 'Advanced' option and expanded to specific user_ids, where 'admin' happens to be the ID I use for the samba mapping in NetDrive. So I think the NAS setups are correct, and it always works through command line interface, just the WPS that and Larsen Commander both fail.

Regarding log.ndpsmb...what do I need to do to turn this on? I have an old version of this log, which grew to some 96Meg, I then shut something off, just don't remember what. It may have been the 'Global Settings => Debug' check-box in the EVFSGUI control app, but I rarely use this, instead I am typically using NetDrive and do not see anything there to enable/disable the DEBUG. No problem going back to EVFSGUI though...

Is this a CONFIG.SYS SET=xxx I could do?

To enable logging, please add an empty file called ndpsmb.dbg into the root drive, then restart ndctl.exe

To minimise 'noise' in the log - delete %LOGS%\log.ndpsmb before attempted the WPS copy, then save a copy once the error is  created. These logs can be quite 'noisy' :)

Either email me the log, or ideally attach it to a bug report at http://trac.netlabs.org/samba/newticket

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on April 03, 2017, 02:39:55 am
Paul,

...To minimise 'noise' in the log - delete %LOGS%\log.ndpsmb before attempted the WPS copy, then save a copy once the error is  created. These logs can be quite 'noisy' :)

Either email me the log, or ideally attach it to a bug report at http://trac.netlabs.org/samba/newticket...

OK, ticket logged, pls see http://trac.netlabs.org/samba/ticket/309 (http://trac.netlabs.org/samba/ticket/309). I detailed my steps in the ticket, attached the log.ndpsmb as well.

Thanks!
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 03, 2017, 11:49:43 am
Hi Dariusz,

Paul,

...To minimise 'noise' in the log - delete %LOGS%\log.ndpsmb before attempted the WPS copy, then save a copy once the error is  created. These logs can be quite 'noisy' :)

Either email me the log, or ideally attach it to a bug report at http://trac.netlabs.org/samba/newticket...

OK, ticket logged, pls see http://trac.netlabs.org/samba/ticket/309 (http://trac.netlabs.org/samba/ticket/309). I detailed my steps in the ticket, attached the log.ndpsmb as well.

OK this should be fixed in http://smedley.id.au/tmp/ndpsmb.zip

Basically, the copy failed as the remote FS doesn't support EA's, but the plugin must have had EA Support ticked (please confirm).

When the EASet failed, it returned a return code which was passed back to Netdrive, which didn't understand the rc, so basically just said the copy failed, hence the SYS0266.The code is now modified such that if the EAset fails, an appropriate rc is returned which says that EA's aren't supported.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on April 04, 2017, 03:52:42 am
Hi Paul,

...Basically, the copy failed as the remote FS doesn't support EA's, but the plugin must have had EA Support ticked (please confirm).

When the EASet failed, it returned a return code which was passed back to Netdrive, which didn't understand the rc, so basically just said the copy failed, hence the SYS0266.The code is now modified such that if the EAset fails, an appropriate rc is returned which says that EA's aren't supported.

OK, I tested this using the ndpsmb.dll plugin that was provided.

So the results are:

1) with the share defined as supporting EXT attributes the behaviour remains the same, the copy/paste operation still produces a SYS0266 and fails, there is a file created in the remote directory but it is of 0 (zero) bytes

2) with the share defined as NOT supporting EXT attributes the copy/paste completes successfully

For comparison, I executed the same "test.cmd" file copy/paste against other shares on my network, they were:

1) Windows XP - worked successfully with EXT ATR = Y

2) Windows Pro - worked successfully with EXT ATR = Y

I've attached the new log.ndpsmb debug output. So it appears the changes made did not have an impact.

To make sure I was using the correct DLL I used "repmod ndpsmb.dll -u" to un-load the DLL before un-zipping the new DLL into the destination directory. Once un-zipped I confirmed the size/date/time stamp reflected the new DLL.

I updated the ticket with exactly the information stated here and I attached the new log.ndpsmb file.
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 04, 2017, 04:11:27 am
Hi Dariusz,

...Basically, the copy failed as the remote FS doesn't support EA's, but the plugin must have had EA Support ticked (please confirm).

When the EASet failed, it returned a return code which was passed back to Netdrive, which didn't understand the rc, so basically just said the copy failed, hence the SYS0266.The code is now modified such that if the EAset fails, an appropriate rc is returned which says that EA's aren't supported.

OK, I tested this using the ndpsmb.dll plugin that was provided.

So the results are:

1) with the share defined as supporting EXT attributes the behaviour remains the same, the copy/paste operation still produces a SYS0266 and fails, there is a file created in the remote directory but it is of 0 (zero) bytes

2) with the share defined as NOT supporting EXT attributes the copy/paste completes successfully

For comparison, I executed the same "test.cmd" file copy/paste against other shares on my network, they were:

1) Windows XP - worked successfully with EXT ATR = Y

2) Windows Pro - worked successfully with EXT ATR = Y

I've attached the new log.ndpsmb debug output. So it appears the changes made did not have an impact.

To make sure I was using the correct DLL I used "repmod ndpsmb.dll -u" to un-load the DLL before un-zipping the new DLL into the destination directory. Once un-zipped I confirmed the size/date/time stamp reflected the new DLL.

I updated the ticket with exactly the information stated here and I attached the new log.ndpsmb file.

Pretty sure that restarting ndctl.exe will fix this. repmod allows you to copy over the new dll, it doesn't load it into memory.

Cheers,

Paul
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Dariusz Piatkowski on April 05, 2017, 01:30:39 pm
Hi Paul,

...Pretty sure that restarting ndctl.exe will fix this. repmod allows you to copy over the new dll, it doesn't load it into memory....

Weird...because I can absolutely assure you I not only STOPed and STARTed the ndctl control program, but I also actually shut down the whole ND GUI as I prepped the log output, etc.

Anyways, much better news to report this time around!!!  :D

Everything appears to work successfully. The file is copied despite the fact that the target FS does not actually support EAs, so the exception handling is graceful.

There is one thing that has me scratching my head, once the file copy is done I am unable to actually DELETE the file from the TARGET location...almost like something is set for that file that prevents me from doing so through WPS...however no problem doing this through CLI. However given that I am using XWP I really can not tell what is contributing to the symptom. The file is not set to ReadOnly mode, etc, etc...

Should I update the ticket with the "Success" results? I have the log for that as well in case it would act as a good reference point?

Thanks!
Title: Re: Samba 4.4.x Netdrive plugin for OS/2
Post by: Paul Smedley on April 05, 2017, 10:07:11 pm
Hi Dariusz!

...Pretty sure that restarting ndctl.exe will fix this. repmod allows you to copy over the new dll, it doesn't load it into memory....

Weird...because I can absolutely assure you I not only STOPed and STARTed the ndctl control program, but I also actually shut down the whole ND GUI as I prepped the log output, etc.

Anyways, much better news to report this time around!!!  :D

Everything appears to work successfully. The file is copied despite the fact that the target FS does not actually support EAs, so the exception handling is graceful.

There is one thing that has me scratching my head, once the file copy is done I am unable to actually DELETE the file from the TARGET location...almost like something is set for that file that prevents me from doing so through WPS...however no problem doing this through CLI. However given that I am using XWP I really can not tell what is contributing to the symptom. The file is not set to ReadOnly mode, etc, etc...

Should I update the ticket with the "Success" results? I have the log for that as well in case it would act as a good reference point?
I can close the ticket. No need to attach the fixed log as I can reproduce locally.  I'll test the WPS delete when I get an opportunity - logs of that delete attempt may be useful.  We've found a few bugs that show up in WPS that don't occur via CLI, it wouldn't surprise me if this is another log, logs will help understand what's happening.

Cheers,

Paul