Author Topic: Updated Samba Client  (Read 134128 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #15 on: December 30, 2023, 10:19:56 am »
OK I setup another box for testing purposes - but I couldn't reproduce. Perhaps I didn't try for long enough?

Screenshot attached of a folder with several  hundred images....

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #16 on: December 30, 2023, 01:14:02 pm »
Hey Paul,

  Could you share your smb.conf? Maybe mine has something incompatible in it.... I'll upload it too (renamed smb.txt)...

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #17 on: December 30, 2023, 03:02:34 pm »
Hey Paul,

  I just noticed there are 3 files not in the 4.18 archive you posted that are in all the other versions I have:

samba4kgetcred.exe
samba4kinit.exe
samba4kpasswd.exe

 I just overwrote the SAMBA folder with this new 4.18 version, so there are still those 3 files from the 4.11 version there. Could that be causing my trouble? Should those files be in the 4.18 archive?

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #18 on: December 30, 2023, 09:57:51 pm »
  Could you share your smb.conf? Maybe mine has something incompatible in it.... I'll upload it too (renamed smb.txt)...
Mine is attached...

I was thinking last night that perhaps I didn't have EA support enabled - but it turns out I do :)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #19 on: December 30, 2023, 10:00:15 pm »
  I just noticed there are 3 files not in the 4.18 archive you posted that are in all the other versions I have:

samba4kgetcred.exe
samba4kinit.exe
samba4kpasswd.exe

 I just overwrote the SAMBA folder with this new 4.18 version, so there are still those 3 files from the 4.11 version there. Could that be causing my trouble? Should those files be in the 4.18 archive?

These are part of the 'built-in' heimdal  that is included in Samba.  At some point in 4.11, I must have been experimenting with using that, instead of system heimdal. They aren't necessary or used  for the server.

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #20 on: December 31, 2023, 01:21:22 am »
 Paul,

  OK, thanks for that info. I still haven't been able to get 4.18 server to work, even with a pared down smb.conf. Always 0 files and directories with the WPS, and 'pipe has been ended' on command line, but 4.11 server works fine.

 How exactly do you start SAMBA? I have been using the Netlabs utilities to start and monitor the server and up to now they have worked well. Maybe they are interfering with 4.18 somehow?

 Also, what Heimdal needs to be installed? I have 'Heimdal' and 'Heimdal-libs' installed (7.7.0), but I notice there are other Heimdal packages available (but not installed). What do you have installed?

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #21 on: December 31, 2023, 04:05:37 am »
Weird  - so it *never* serves files at all?  I was thinking that it served files for a period then stopped.

I just start the daemon with an object that starts smbd.exe

Heimdal 7.7.0 libs as included with AOS should be more than enough.

What about trying to connect from another OS? My initial testing was with smbclient from Ubuntu....

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #22 on: December 31, 2023, 05:03:35 pm »
Paul,

 No, don't get anything to show up, although the share is mounted OK. I have now tried Linux Mint, Windows 7 and Windows 11 and they won't work either (Linux gave a 'software error', both Windows appeared to connect, but are blank). Tried starting just smbd.exe object but no help

 I'll attach a log and example exceptq file. The log shows many traps in smbd, but they are all almost exactly like the one uploaded. I started the server, then attached from my ArcaOS client, then tried to browse with the WPS, then did a 'dir' on the command line in the share root, then shut down the server and collected the log. Maybe there is a clue in there somewhere...

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #23 on: December 31, 2023, 10:05:18 pm »
Thanks Dave - I'll have a look at the log for clues  today. I'm also rebuilding Samba with debug symbols,  which will hopefully  produce a more usable TRP file.

Edit:  OK I see the SIGABRT - but it's not making sense  to me.
Code: [Select]
[2023/12/31 09:42:23.143000,  0] ../../source3/lib/util_path.c:321(subdir_of)
  PANIC: assert failed at ../../source3/lib/util_path.c(321): parent[2] == '/'
[2023/12/31 09:42:23.143000,  0] ../../lib/util/fault.c:175(smb_panic_log)
  ===============================================================
[2023/12/31 09:42:23.143000,  0] ../../lib/util/fault.c:176(smb_panic_log)
  INTERNAL ERROR: assert failed: parent[2] == '/' in pid 514 (4.18.9)

I may need to log  the value of parent to see why the assert is failing.

As a WAG,  can you change "   path = C:\MPTN\ETC\samba\spool\EPSONXP-"  to "path = C:/MPTN/ETC/samba/spool/EPSONXP-" ?

Edit2: this probably won't help  -  I also have a couple of examples of the failed assertion in parent[2] -  I've added some logging to help  understand what's going on.
« Last Edit: December 31, 2023, 10:19:07 pm by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #24 on: December 31, 2023, 10:28:19 pm »
 Hey Paul,

 Yeah, I already tried changing to C:/MPTN/ETC/samba/spool/EPSONXP- but it didn't help... left it like that though, just in case.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #25 on: January 01, 2024, 01:05:36 am »
Please try with https://smedley.id.au/tmp/smbd-4.18.9-20240101.zip - it won't fix it, but should log  the output of parent before the assertion fails.

I'll also try and reproduce locally.

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #26 on: January 01, 2024, 04:33:01 am »
Happy New Year Paul!

 I tried this smbd.exe, and did the exact same routine as the last logs (start server, then attach client to share, then try browsing with WPS (shows 0 files or directories), then dir on root of share drive from command line (says pipe has ended), then stopped server and collected logs. No exceptq file was created this time, and no trap shows in the logs - attached.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #27 on: January 01, 2024, 06:40:25 am »
OK I can't explain the lack of TRP files, but you're still (not unexpectedly) getting:
Code: [Select]
[2023/12/31 22:16:47.037000,  0] ../../source3/lib/util_path.c:322(subdir_of)
  PANIC: assert failed at ../../source3/lib/util_path.c(322): parent[2] == '/'

But without my logging. Can you run with 'smbd -d 8' and see if that adds the necessary info?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2286
  • Karma: +176/-0
    • View Profile
Re: Updated Samba Client
« Reply #28 on: January 01, 2024, 09:10:36 am »
I tried this smbd.exe, and did the exact same routine as the last logs (start server, then attach client to share, then try browsing with WPS (shows 0 files or directories), then dir on root of share drive from command line (says pipe has ended), then stopped server and collected logs. No exceptq file was created this time, and no trap shows in the logs - attached.

I  can reproduce when attaching to a share that is a whole drive.

Working Share - u:/website
Non-working Share -  c:/

Edit: So the trailing / is getting stripped somewhere, so parent ended up just being c: -  so checking the a / to confirm a drive failed:

Updated code to:
Code: [Select]
#ifndef __OS2__
SMB_ASSERT(parent[0] == '/');
SMB_ASSERT(subdir[0] == '/');
#else
SMB_ASSERT(parent[1] == ':');
SMB_ASSERT(subdir[1] == ':');
#endif

And a share of a whole drive works now. Updated smbd at https://smedley.id.au/tmp/smbd-4.18.9-20240101b.zip
« Last Edit: January 01, 2024, 09:17:06 am by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 814
  • Karma: +25/-0
    • View Profile
Re: Updated Samba Client
« Reply #29 on: January 01, 2024, 02:38:33 pm »
Hey Paul!

  Now it works... thanks! I'll test for awhile and see if I get any of the issues I got with the last 2 versions - but a quick test shows I can browse with the WPS and open files (JPG and MP3) and move stuff around...

Regards,