Hi all
After getting gvfs to work, I decided to get a bit into the issue that
network browsing does not work anymore with recent samba versions.
The following bug report describes the problem and also contains a patch:
https://bugzilla.redhat.com/show_bug.cgi?id=1513394
I looked at the patch, added some (admittedly horrible) meson build
fixes to it and got gvfs (and thunar) to find shares and even computers
on recent samba versions.
I include the patch below, it is from Tomas Kovar and attached under:
https://bugzilla.redhat.com/attachment.cgi?id=1400829&action=diff
I just added the meson build stuff, to link against libsmbconfig, which
is not in his patch. My solution is definitely absolutely criminal, as I
don't know meson yet, but it works. Just in case anybody would also like
to enable this feature on his machine.
Bye
Tim
diff -ru gvfs-1.36.0/daemon/gvfsbackendsmbbrowse.c gvfs-1.36.0-smb1-browse/daemon/gvfsbackendsmbbrowse.c
--- gvfs-1.36.0/daemon/gvfsbackendsmbbrowse.c 2018-03-12 14:41:25.000000000 +0100
+++ gvfs-1.36.0-smb1-browse/daemon/gvfsbackendsmbbrowse.c 2018-04-02 20:11:18.432392914 +0200
@@ -798,6 +798,7 @@
return;
}
+ lp_set_cmdline ("client max protocol", "NT1");
smbc_setOptionUserData (smb_context, backend);
debug = g_getenv ("GVFS_SMB_DEBUG");
@@ -907,7 +908,6 @@
op_backend->mount_cancelled = FALSE;
g_debug ("do_mount - try #%d \n", op_backend->mount_try);
-
dir = smbc_opendir (smb_context, uri);
errsv = errno;
diff -ru gvfs-1.36.0/daemon/gvfsbackendsmbprivate.h gvfs-1.36.0-smb1-browse/daemon/gvfsbackendsmbprivate.h
--- gvfs-1.36.0/daemon/gvfsbackendsmbprivate.h 2018-03-12 14:41:25.000000000 +0100
+++ gvfs-1.36.0-smb1-browse/daemon/gvfsbackendsmbprivate.h 2018-04-02 18:42:43.208067919 +0200
@@ -25,4 +25,7 @@
char *create_smb_uri (const char *server, int port, const char *share, const char *path);
+/* from samba's proto.h */
+int lp_set_cmdline(const char *pszParmName, const char *pszParmValue);
+
#endif /* __G_VFS_BACKEND_SMB_PRIVATE_H__ */
diff -ru gvfs-1.36.0/meson.build gvfs-1.36.0-smb1-browse/meson.build
--- gvfs-1.36.0/meson.build 2018-03-12 14:41:25.000000000 +0100
+++ gvfs-1.36.0-smb1-browse/meson.build 2018-04-02 21:11:50.620389091 +0200
@@ -234,6 +234,7 @@
add_project_arguments(common_flags, language: 'c')
+
ldflag = '-Wl,--version-script'
have_version_script = host_machine.system().contains('linux') and cc.has_argument(ldflag)
@@ -415,7 +416,11 @@
# *** Check for samba ***
enable_samba = get_option('smb')
if enable_samba
+ smb_config = find_program('echo')
smbclient_dep = dependency('smbclient')
+ smbclient_dep = declare_dependency(
+ link_args: run_command(smb_config, '-lsmbclient -lsmbconf').stdout().strip().split()
+ )
endif
# *** Check for libarchive ***
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page