Author Topic: Updated Samba Client  (Read 129006 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Updated Samba Client
« on: December 17, 2023, 09:31:08 am »
Hi All,

I mentioned at Warpstock that I was planning on updating the Samba client for AOS/OS/2.  I  got around to making Samba 4.18.9 compile.

An updated Netdrive plugin is available from https://smedley.id.au/tmp/ndpsmb-3.18.1-samba418-20231217.zip

To test  - backup your old ndpsmb.dll first  - then simply replace it  with the on in the zip,  and ensure smbcl418.dll can be found  in the libpath.

Probably also needs an updated gnutls30.dll from https://smedley.id.au/tmp/gnutls30.zip

I still need to go through https://github.com/psmedley/ndpsmb/blob/samba-4.18.x/src/smbwrp.c and synchronise some of  the code against libsmb.

Seems to work ok against a Samba Server running on Ubuntu Server 22.04. YMMV.

Cheers,

Paul

Latest files (at 274th June, 2024):
Server https://smedley.id.au/tmp/samba-4.19.7-os2-20240626.zip

Latest Netdrive Plugin: https://smedley.id.au/tmp/ndpsmb-20240127.zip
Latest smbcl419.dll: https://smedley.id.au/tmp/smbcl419-4.19.7-20240626.zip

Latest gnutls30.dll build: https://smedley.id.au//tmp/gnutls30.zip
« Last Edit: June 27, 2024, 07:33:18 am by Paul Smedley »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: Updated Samba Client
« Reply #1 on: December 17, 2023, 05:50:16 pm »
Hi Paul,

Deployed in my config of: remote Samba shares are on the NAS box and Win7Pro machine.

NDCTL appears to successfully start the manager, but no shares actually show.

I find the following in the ndctl.log:

Code: [Select]
11:39:04.250:
NetDrive for OS/2(R) Control Program version 3.1.6.941 Nov 17 2019

11:39:04.250: 2023-12-17

11:39:04.250: NDFSDIR environment variable found: G:\util\NDFS
11:39:04.250: NetDrive working directory is G:\util\NDFS
11:39:04.250: File system driver name is NDFS32.
11:39:04.260: NetDrive configuration file 'G:\util\NDFS\ndctl.cfg' has been processed.
11:39:04.260: Registered Version

11:39:04.260: Registered to Dariusz Piatkowski

11:39:04.260: [   local] internal plugin has been initialized.
11:39:04.260: [  ndpftp] (level 2) plugin has been loaded.
11:39:04.260: [  ndpiso] (level 2) plugin has been loaded.
11:39:04.270: [  ndpdav] (level 2) plugin has been loaded.
11:39:04.280: NDF0033: The system can't load the module: JANSSON4
11:39:04.280: NDF0029: [  ndpsmb] plugin has not been loaded.
11:39:04.280: NDF0007: The system error is SYS0002
11:39:04.290: [ ndpnfs3] (level 3) plugin has been loaded.
11:39:04.290: Initialization completed. The control program is running.
11:39:04.420: NDF0045: Resource SMBFS (W) specified in file volumes.cfg, line 4 was not mounted
11:39:04.420: NDF0007: The system error is SYS0050
11:39:04.420: NDF0045: Resource SMBFS (W) specified in file volumes.cfg, line 6 was not mounted
11:39:04.420: NDF0007: The system error is SYS0050
11:39:04.420: NDF0045: Resource SMBFS (W) specified in file volumes.cfg, line 7 was not mounted
11:39:04.420: NDF0007: The system error is SYS0050
11:39:04.420: NDF0045: Resource SMBFS (W) specified in file volumes.cfg, line 10 was not mounted
11:39:04.420: NDF0007: The system error is SYS0050
11:40:48.410: NetDrive Control Program has been interrupted by File System Driver.

...but seeing this in the above LOG:

Quote
NDF0033: The system can't load the module: JANSSON4

makes me think another module besides smbcl418 & gnutls30 is needed?

I didn't get any hits with "yum provides */jansson4"...

Thanks as always!

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #2 on: December 17, 2023, 08:21:32 pm »
 Paul,

  Thanks... seems to work well with my OS/2 SAMBA server (4.11) in limited testing. Any chance for a new server too?

@Dariusz - FYI, there is a Jansson package at netlabs-exp. It seems to work OK here.

Regards,

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: Updated Samba Client
« Reply #3 on: December 18, 2023, 12:11:11 am »
Hey Dave!

@Dariusz - FYI, there is a Jansson package at netlabs-exp. It seems to work OK here.

Right on, thank you. My yum search missed it b/c I left out the ".dll".

So feedback on what I'm seeing, which puts me in a really weird "no-go" situation: NDCTL comes up fine, it maps the shares successfully, but immediately afterwards as I attempted to actually access the shares WPS completely locked-up.

Hmm...OK, I initially thought: maybe some kind of a conflict between the new ndpsmb.dll and the old one (although I shut-down the service in NDCTL before tossing the new DLL into place, and it would appear it was fine at that time). So off I went to re-boot my machine...

...and upon coming back was greeted by a never seen before WPS/Desktop msg: "...system does not have enough memory to show/load Desktop..."!!! ugh???? Yeah, the Desktop never populated, the WarpCenter came up, all my utils fired up, but not the Desktop, just the BLUE screen.

OK, so mind you I am running a crazy large JFS cache, that being 1.2G, but it's awfully nice for my purposes, and I regularly have this machine up for 20-24 days (longest ever was 45 actually) and what usually brings it down is the low shared memory.

But...testing it is, so off I went downsizing the cache, a few attempts later having gotten to 0.5G and still showing the very same Desktop error message I had decided to STOP.

Sooo...whatever is causing the issue is a brick-wall for me. Happy to troubleshoot Paul, tell me what level of debugging you might like...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #4 on: December 18, 2023, 04:49:42 am »
Only thought is what's VIRTUALADDRESSLIMIT set to? Not that Samba should be using lots of RAM, but still of interest...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #5 on: December 18, 2023, 04:50:45 am »
Any chance for a new server too?

Definitely - the executable is built, just needs testing and inevitably debugging. I suspect more work will be needed to stabilise it - noting the issues you saw with 4.13 and 4.15 server....

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1350
  • Karma: +26/-0
    • View Profile
Re: Updated Samba Client
« Reply #6 on: December 18, 2023, 05:25:47 am »
Only thought is what's VIRTUALADDRESSLIMIT set to? Not that Samba should be using lots of RAM, but still of interest...

VIRTUALADDRESSLIMIT=2048

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #7 on: December 18, 2023, 09:41:03 am »
OK, starting smbd gives:
Code: [Select]
[2023/12/18 18:10:07.961000,  0] ../../source3/smbd/server.c:1757(main)
  Server priority set to PRTYC_FOREGROUNDSERVER
[2023/12/18 18:10:07.961000,  0] ../../source3/smbd/server.c:1760(main)
  smbd version 4.18.9 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2023
[2023/12/18 18:10:08.203000,  0] ../../source3/lib/util.c:493(reinit_after_fork)
  messaging_reinit() failed: NT_STATUS_NETWORK_BUSY
[2023/12/18 18:10:08.420000,  0] ../../source3/lib/util.c:493(reinit_after_fork)
  messaging_reinit() failed: NT_STATUS_NETWORK_BUSY
[2023/12/18 18:10:08.428000,  0] ../../lib/util/become_daemon.c:123(exit_daemon)
  exit_daemon: daemon failed to start: Samba cannot init the cleanupd, error code 13

Will debug as time permits...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #8 on: December 26, 2023, 01:37:12 am »
OK....smbd.exe seems to work now :) will do a bit more testing before packaging something up....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #9 on: December 26, 2023, 10:45:51 am »
I managed to fix some issues with smbd this morning -  and it is now able to serve files here.

It has only been very lightly tested. I suspect there are still some remaining issues in https://github.com/psmedley/at-funcs which may cause issues.

There are known issues with keyboard jankiness with smbclient - but the netdrive plugin seems to work ok.
I also plan to investigate creating a forwarder DLL to forward calls to smbcl411.dll to smbcl418.dll - will need to investigate how to do this :)

Link to binaries: https://smedley.id.au/tmp/samba-4.18.9-os2-20231226.zip

The only binary in here that has been tested is smbd.exe - and smbpasswd.exe  - YMMV with the others :)

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #10 on: December 29, 2023, 06:04:11 pm »
 Thanks Paul! I gave the new server a try - it seems to start up just fine with my current smb.conf, no errors or complaints, and the new 4.18 client with NDFS attaches to it with no errors or complaints, but when I try to browse the share from the WPS it sees 0 files or directories. From a command line I get:

[N:\]dir

The volume label in drive N is NETDRIVE.
Directory of N:\

SYS0109: The pipe has been ended.

 Not sure what this is telling me...

Regards,

EDIT: attached logs from failed session in case it's interesting...
« Last Edit: December 29, 2023, 06:28:16 pm by David McKenna »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #11 on: December 29, 2023, 09:32:55 pm »
Thanks - I'll try and reproduce locally. Does this only happen with both server and client on 4.18?

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #12 on: December 29, 2023, 10:51:26 pm »
Paul,

  I have been using the 4.18 client with my 4.11 server since it came out with no problems. I did the test on the 4.18 server with the same client - haven't tried any other clients.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2257
  • Karma: +175/-0
    • View Profile
Re: Updated Samba Client
« Reply #13 on: December 29, 2023, 11:58:19 pm »
  I have been using the 4.18 client with my 4.11 server since it came out with no problems. I did the test on the 4.18 server with the same client - haven't tried any other clients.
Interesting...  I'll test locally with 4.18 on client and server. I assume the client and server are on *different* machines? (Just to rule out some weird interactions when they're both running on the same box).

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #14 on: December 30, 2023, 12:13:51 am »
 Paul,

  Yes... different machines (192.168.21.2 is the server, 192.168.21.3 is the client).

Regards,