Author Topic: Updated Samba Client  (Read 196732 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5488
  • Karma: +133/-1
    • View Profile
Re: Updated Samba Client
« Reply #105 on: January 15, 2024, 10:37:47 pm »
Hey Dave,

 Do you know if there is a way to turn that off?

Regards,

No, besides using a file system that doesn't support EA's. It's why David A. wrote that program I posted up thread.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 411
  • Karma: +30/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Updated Samba Client
« Reply #106 on: January 15, 2024, 10:42:36 pm »
Hey Dave,
Do you know if there is a way to turn that off?

PMFJI...  SET LIBC_UNIX_EAS=[drive letters to include or !exclude]

For example, I disable them on all drives except my boot drive (N:) using:
  SET LIBC_UNIX_EAS=!C-M,N,!O-Z

You can use individual letters or create ranges; use '!' to negate a letter or range.

Note 1: these EAs must be allowed on your boot drive (or maybe it's just your %UNIXROOT% drive) or "bad things will happen".

Note 2; for many of us, the biggest source of these annoyances (IMHO) is Info-Zip. I use an older version which doesn't create them.

David McKenna

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +35/-0
    • View Profile
Re: Updated Samba Client
« Reply #107 on: January 15, 2024, 11:19:25 pm »
Rich,

 Thanks for that! I'll try using it on my shared drive. Hopefully SAMBA won't object...but we'll see.

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +35/-0
    • View Profile
Re: Updated Samba Client
« Reply #108 on: January 15, 2024, 11:33:15 pm »
 Arggh! Just got the 'out of memory' error again! Rats - thought it was defeated, but apparently not. SMBCLIENT still works without timing out though, so apparently that was unrelated.

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5488
  • Karma: +133/-1
    • View Profile
Re: Updated Samba Client
« Reply #109 on: January 16, 2024, 12:00:15 am »
Thanks rich, didn't know about  SET LIBC_UNIX_EAS= wonder if it also affects the symlink EA's? If so, that probably causes the bad things to happen if @unixroot doesn't have them. BWW seems to like using them, I try to avoid them as they're fragile being EA's

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5488
  • Karma: +133/-1
    • View Profile
Re: Updated Samba Client
« Reply #110 on: January 16, 2024, 01:14:36 am »
Yes, breaks symbolic links, don't use on @unixroot
Code: [Select]
[H:\tmp]SET LIBC_UNIX_EAS=!H
[H:\tmp]ln -s test.txt t.txt
ln: failed to create symbolic link 't.txt': Operation not supported on socket
Edit: ls -la also no longer see symbolic links,
Code: [Select]
lrwxrwxrwx 1 root root      8 Jan 15 16:13 t.txt -> test.txt
...
Code: [Select]
-rw-rw-rw- 1 root root      8 Jan 15 16:13 t.txt
« Last Edit: January 16, 2024, 01:16:22 am by Dave Yeo »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5384
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Updated Samba Client
« Reply #111 on: January 16, 2024, 02:38:16 am »
Thanks rich, didn't know about  SET LIBC_UNIX_EAS= wonder if it also affects the symlink EA's? If so, that probably causes the bad things to happen if @unixroot doesn't have them. BWW seems to like using them, I try to avoid them as they're fragile being EA's

FYI: This was needed to be documented. I added it to the EDM/2 Config.sys Project:
- http://www.edm2.com/index.php/CONFIG.SYS_-_SET_Statements_(Additional_software)#SET_LIBC_UNIX_EAS
I also found this ticket for reference:
- https://trac.netlabs.org/libc/ticket/43

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2548
  • Karma: +200/-0
    • View Profile
Re: Updated Samba Client
« Reply #112 on: January 16, 2024, 07:18:52 am »
Hey Dave,

Anyway, the real punch line is that now it works with the 4.19 server. SMBCLIENT does not time out, it works. I don't know if it is because the new drive is so much faster, or because 'broken EA's' are gone. Still early, but so far I have not got an out of memory condition, and it is very much faster to display files in the WPS.

 Has EA support been changed since 4.11? Maybe something there is slowing things down - like checking EA's - in 4.19 it didn't do in 4.11?

Interesting! The OS/2 specific EA code should be unchanged from 4.11 but it's also possible that the diffs didn't apply cleanly and it went unnoticed.  Gives me a few things to look at when I have a free moment.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2548
  • Karma: +200/-0
    • View Profile
Re: Updated Samba Client
« Reply #113 on: January 16, 2024, 07:20:02 am »
Arggh! Just got the 'out of memory' error again! Rats - thought it was defeated, but apparently not. SMBCLIENT still works without timing out though, so apparently that was unrelated.
Drat!

Andi B.

  • Hero Member
  • *****
  • Posts: 918
  • Karma: +16/-2
    • View Profile
Re: Updated Samba Client
« Reply #114 on: January 16, 2024, 09:07:56 am »
Isn't it enough to disable EAs for Samba shares? Or what is the option in smb.conf good for? I've it in the global section. I ever thought it is for the server, right?.

AFAIR the netdrive smbfs dialog has an option to enable/disable EAs too.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2548
  • Karma: +200/-0
    • View Profile
Re: Updated Samba Client
« Reply #115 on: January 16, 2024, 09:35:03 am »
Hey Dave,

Anyway, the real punch line is that now it works with the 4.19 server. SMBCLIENT does not time out, it works. I don't know if it is because the new drive is so much faster, or because 'broken EA's' are gone. Still early, but so far I have not got an out of memory condition, and it is very much faster to display files in the WPS.

 Has EA support been changed since 4.11? Maybe something there is slowing things down - like checking EA's - in 4.19 it didn't do in 4.11?

Interesting! The OS/2 specific EA code should be unchanged from 4.11 but it's also possible that the diffs didn't apply cleanly and it went unnoticed.  Gives me a few things to look at when I have a free moment.

The heavy lifting for EA handling on Samba 4.x is from libattr.  I created https://github.com/psmedley/attr-os2 with a copy of the source today. See https://github.com/psmedley/attr-os2

For reasons I don't remember - there are two copies of the 'helper' apps. I think one is from rsync, the other is from Samba 3.x.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2548
  • Karma: +200/-0
    • View Profile
Re: Updated Samba Client
« Reply #116 on: January 16, 2024, 09:36:05 am »
Isn't it enough to disable EAs for Samba shares? Or what is the option in smb.conf good for? I've it in the global section. I ever thought it is for the server, right?.

AFAIR the netdrive smbfs dialog has an option to enable/disable EAs too.

The smb.conf flag will definitely work to  disable  EA's on the server. With Samba 4.x, it's possible the client no longer respects the flag in the GUI....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2548
  • Karma: +200/-0
    • View Profile
Re: Updated Samba Client
« Reply #117 on: January 19, 2024, 09:40:55 am »
@Dave -  an observation locally...
4.11 Server - EA's visible to client
4.18/4.19 Server - EA's not visible to client.

Same server smb.conf in use.  Do you see the same thing?  I wonder if this is part of the issue with the client.

Client *can* see EA's on a server running 4.18.x under Ubuntu.

Interesting:
Code: [Select]
[2024/01/19 18:12:12.072000,  3] ../../source3/smbd/smb2_server.c:4033(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NO_EAS_ON_FILE] || at ../../source3/smbd/smb2_getinfo.c:159
« Last Edit: January 19, 2024, 09:44:33 am by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +35/-0
    • View Profile
Re: Updated Samba Client
« Reply #118 on: January 19, 2024, 12:12:47 pm »
Paul,

  How do I view EA's? Is that something that can be done directly, or are you looking in a log file?

  I see stuff like this in an smbd log on the server:

os2getxattr : (Software/Windows/DRIVERS:0) user.DOSATTRIB 32
os2getxattr : (Software/Windows/DRIVERS:0) user.DOSATTRIB 32
os2getxattr : (Software/Windows/DRIVERS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS/DRIVERS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS/DRIVERS:0) user.DOSATTRIB 32
os2getxattr : (SOFTWARE/WINDOWS/DRIVERS:0) user.DOSATTRIB 32

 This is with EA's disabled on both client and server, and using Rich's SET LIBC_UNIX_EAS=C,!D to turn off EA's on the shared drive.

Regards,
« Last Edit: January 19, 2024, 06:27:17 pm by David McKenna »

David McKenna

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +35/-0
    • View Profile
Re: Updated Samba Client
« Reply #119 on: January 19, 2024, 06:04:30 pm »
Paul,
Interesting:
Code: [Select]
[2024/01/19 18:12:12.072000,  3] ../../source3/smbd/smb2_server.c:4033(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NO_EAS_ON_FILE] || at ../../source3/smbd/smb2_getinfo.c:159

 I'm not seeing that error on either the client (4.19) or server (neither 4.11 nor 4.19). Using log level = 8 on both. All I see on the client side (both 4.11 and 4.19 server) is many dozens of:

[2024/01/19 11:32:59.648000,  3] ../../source3/libsmb/clierror.c:91(cli_status_to_errno)
  cli_status_to_errno: 0xc0000034 -> 2

 On the server side, the logged errors I see are:

[2024/01/19 10:01:17.493000,  2] ../../source3/nmbd/nmbd_winsserver.c:634(initialise_wins)
  initialise_wins: Can't open wins database file wins.dat. Error was No such file or directory**

[2024/01/19 10:01:40.006000,  5] ../../source3/nmbd/nmbd_namequery.c:77(query_name_response)
  query_name_response: On subnet UNICAST_SUBNET - negative response from IP 192.168.21.2 for name IBMPEERS<1b>. Error code was 3.**

[2024/01/19 10:19:00.702000,  0] ../../lib/util/pidfile.c:240(pidfile_unlink)
  Failed to delete pidfile C:\MPTN\ETC/samba/pid/nmbd.pid. Error was No such file or directory.**

[2024/01/19 10:18:30.430000,  3] ../../source3/smbd/smb2_server.c:4033(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NO_MEMORY] || at ../../source3/smbd/smb2_create.c:360

[2024/01/19 10:18:30.622000,  5] ../../source3/smbd/dosmode.c:418(fget_ea_dos_attribute)
  fget_ea_dos_attribute: Cannot get attribute from EA on file .: Error = Attribute not found

[2024/01/19 10:18:32.229000,  3] ../../source3/smbd/smb2_server.c:4033(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_OBJECT_PATH_NOT_FOUND] || at ../../source3/smbd/smb2_create.c:360


 There were many multiples of each of the above - only one shown.

** Indicate errors seen with both the 4.11 and 4.19 server. The last three are only seen with the 4.19 server.

 One thing I have noticed - I have 'max log size = 2048' in the server smb.conf, but it seems to be ignored because I get logs over 10MB all the time, especially with log level = 8. Maybe a bug?

Thinking out loud:

 wins.dat does exist in the C:\MPTN\ETC\samba\lock directory - maybe the server is looking in the wrong place?

 nmbd.pid is deleted when the server is stopped - maybe that error comes after it has been deleted?

 The 'attribute not found' might be because I have EA's turned off with SET LIBC_UNIX_EAS= on the shared drive?

 The name of the computer at 192.168.21.2 is MAINMACHINE. IBMPEERS is the workgroup. Maybe some kind of confusion?


Regards,
« Last Edit: January 19, 2024, 06:48:09 pm by David McKenna »