Author Topic: Samba 4.4.x Netdrive plugin for OS/2  (Read 6416 times)

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Samba 4.4.x Netdrive plugin for OS/2
« 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
« Last Edit: November 13, 2016, 08:09:50 pm by Paul Smedley »



Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #1 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)
  • Samba server v3.3.x running on OS/2
  • Samba Server v3.5.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x running on linux/debian
  • Netware
  • Windows 10
  • Windows Server 2008r2 and 2012 using kerberos authentication

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 7
  • Posts: 161
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #2 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...

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #3 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
« Last Edit: November 13, 2016, 08:07:35 pm by Paul Smedley »

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 7
  • Posts: 161
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #4 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?

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #5 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?

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 7
  • Posts: 161
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #6 on: November 14, 2016, 11:05:49 pm »
Plugins=ndpftp,ndpntfs,ndpsmb,ndpiso,ndpdav,ndpudf

HTH...

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #7 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

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 7
  • Posts: 161
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #8 on: November 15, 2016, 12:16:43 pm »
Paul,

  I use Panorama for video, and MMRE from Multimac for network (TCPIP only)...

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 36
  • Posts: 907
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #9 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...

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #10 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

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 36
  • Posts: 907
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #11 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.

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 350
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #12 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

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 36
  • Posts: 907
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #13 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.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 36
  • Posts: 907
    • View Profile
Re: Samba 4.4.x Netdrive plugin for OS/2
« Reply #14 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...