On Fri, Nov 20, 2026 at 04:24:24PM +0100, Benjamin Stürz wrote: > Hi Hiltjo, > > sorry I was very busy and then got sick. > > I was mounting my Hetzner Storage Box [1] using: > > # susmb -f smb://uxxx@uxxx.your-storagebox.de/backup /mnt/storage/ > > Here's the list of all files it tries to access (I stubbed out unveil): > > stat('/etc/gnutls/config'); > unveil('/', ''); > unveil('/dev/null', 'rw'); > unveil('/dev/fuse0', 'rw'); > unveil('/mnt/storage/', 'rwxc'); > unveil('(null)', '(null)'); > stat('/root/.smb/smb.conf'); > fopen('/root/.smb/smb.conf', 'r'); > stat('/etc/samba/smb.conf'); > fopen('/etc/samba/smb.conf', 'r'); > stat('/root/.smb/smb.conf.append'); > fopen('/root/.smb/smb.conf.append', 'r'); > mkdir('/var/run/samba', 0755); > open('/var/run/samba/gencache.tdb', 0201002, 0640); > open('/root/.rnd', 0200000, 0); > open('/dev/urandom', 04, 0); > fopen('/root/.krb5/config', 'r'); > fopen('/etc/krb5.conf', 'r'); > fopen('/root/.hx509/config', 'r'); > fopen('/etc/hx509.conf', 'r'); > fopen('/etc/samba/krb5.conf', 'r'); > fopen('/root/.krb5/config', 'r'); > fopen('/etc/krb5.conf', 'r'); > lstat('/tmp/krb5cc_0'); > open('/dev/fuse0', 0200002, 0); > Hi, Not a fix, but to get an idea what it could be, what if you unveil the following paths: unveil("/var/run/samba", "r"); unveil("/var/run/samba/gencache.tdb", "rw") or even: unveil("/var/run/samba", "rw"); I haven't looked too deeply into the samba source-code yet which combination could trigger it so it requires to read "/var/run/samba/gencache.tdb". Maybe (shot in the dark): in libsmb_context.c it mentions: smbc_setOptionUseCCache It could be changed by setting the environment variable LIBSMBCLIENT_NO_CCACHE="1" without changing the source-code. > Also I noticed that the performance using susmb is > much worse than with sshfs. > Its very possible because it is a different protocol etc. Under the hood it uses just samba / smbclient + the FUSE layer. Some options to smbclient could be improved maybe. Changing some of the buffer sizes already helped a lot compared to usmb. It should not be slower than usmb. Suggestions are welcome. > [1] https://www.hetzner.com/de/storage/storage-box/ > > Thanks for your time, > Benjamin Stürz > > On 11/19/26 6:25 PM, Hiltjo Posthuma wrote: > > Hi, > > > > I've privately e-mailed to ask for more details, but did not get a response to: > > > > I cannot reproduce the issue on OpenBSD 8.0. > > > > On my simple network share it does not read /var/run/samba I think (I checked > > the ktrace log). > > Running a ktrace I see it tries to read files from /etc/samba/. > > However for susmb it should be used stand-alone (smb:// as the applications > > arguments) and not use share names from /etc/samba/ or so. > > > > I'm willing to loosen unveil() a bit, maybe an unveil("/var/run/samba", "r") if > > it is really neccesary. > > > > Could you provide more information of your config? Maybe a ktrace or specific > > added Samba modules? I need more information and details. > > > > Thank you, > > > > On Mon, Nov 09, 2026 at 05:47:57PM +0100, Benjamin Stürz wrote: > > > Hi, > > > > > > thanks for the port, but the unveil() rules are too strict. > > > It needs at least /var/run/samba to work correctly. > > > > > > After writing an LD_PRELOAD shim that bypasses the unveil() calls, > > > mounting works. Otherwise susmb fails on OpenBSD 8.0 with: > > > > > > directory_create_or_exist: mkdir failed on directory /var/run/samba: No such > > > file or directory > > > directory_create_or_exist: mkdir failed on directory /var/run/samba: No such > > > file or directory > > > Connection failed: Invalid argument > > > > > > > > > Kind Regards, > > > Benjamin Stürz > > > > > > On 2/21/26 5:28 PM, Pascal Stumpf wrote: > > > > susmb lets you mount SMB/CIFS shares via FUSE, in the vein of the > > > > Map Network Drive functionality in Windows. > > > > > > > > > > > > This is a fork of usmb, most notably adding privdrop and unveil(2), and > > > > getting rid of the XML config file. Patches from sysutils/usmb have > > > > also been incorporated. > > > > > > -- Kind regards, Hiltjo
No comments:
Post a Comment