From b381a78df7b6a0caa46b10dd300ad3e51454233e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Nov 18 2010 15:13:29 +0000 Subject: Fix libsmbclient SMB signing resolves: #598620 Guenther --- diff --git a/samba-3.5.6-libsmbclient.patch b/samba-3.5.6-libsmbclient.patch new file mode 100644 index 0000000..16a3f30 --- /dev/null +++ b/samba-3.5.6-libsmbclient.patch @@ -0,0 +1,50 @@ +From 2a9eaf741d8c169b8f06ee6498a6879acc654506 Mon Sep 17 00:00:00 2001 +From: Jeremy Allison +Date: Thu, 11 Nov 2010 09:44:21 -0800 +Subject: [PATCH] Fix bug #7791 - gvfsd-smb (Gnome vfs) fails to copy files from a SMB share using SMB signing. + +The underlying problem is that the old code invoked by cli_write() increments +cli->mid directly when issuing outstanding writes. This should now be done only +in libsmb/clientgen.c to make metze's new signing engine works correctly. Just +deleting this code fixes the problem. + +Jeremy. +--- + source3/libsmb/clireadwrite.c | 7 ++----- + 1 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c +index 6342de4..1f5f925 100644 +--- a/source3/libsmb/clireadwrite.c ++++ b/source3/libsmb/clireadwrite.c +@@ -704,8 +704,7 @@ static bool cli_issue_write(struct cli_state *cli, + off_t offset, + uint16 mode, + const char *buf, +- size_t size, +- int i) ++ size_t size) + { + char *p; + bool large_writex = false; +@@ -779,8 +778,6 @@ static bool cli_issue_write(struct cli_state *cli, + cli_setup_bcc(cli, p+size); + } + +- SSVAL(cli->outbuf,smb_mid,cli->mid + i); +- + show_msg(cli->outbuf); + if (direct_writes) { + /* For direct writes we now need to write the data +@@ -829,7 +826,7 @@ ssize_t cli_write(struct cli_state *cli, + if (!cli_issue_write(cli, fnum, offset + bsent, + write_mode, + buf + bsent, +- size1, issued)) ++ size1)) + return -1; + issued++; + } +-- +1.7.3.1 + diff --git a/samba.spec b/samba.spec index 70a620a..feba998 100644 --- a/samba.spec +++ b/samba.spec @@ -1,4 +1,4 @@ -%define main_release 70 +%define main_release 71 %define samba_version 3.5.6 %define tdb_version 1.2.1 %define talloc_version 2.0.1 @@ -44,6 +44,7 @@ Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch # The passwd part has been applied, but not the group part Patch107: samba-3.2.0pre1-grouppwd.patch Patch200: samba-3.2.5-inotify.patch +Patch201: samba-3.5.6-libsmbclient.patch Requires(pre): samba-common = %{epoch}:%{samba_version}-%{release} Requires: pam >= 0:0.64 @@ -208,6 +209,7 @@ cp %{SOURCE11} packaging/Fedora/ #%patch104 -p1 -b .nmbd-netbiosname # FIXME: does not apply %patch107 -p1 -b .grouppwd %patch200 -p0 -b .inotify +%patch201 -p1 -b .libsmbclient mv %samba_source/VERSION %samba_source/VERSION.orig sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{samba_release}\"/' < %samba_source/VERSION.orig > %samba_source/VERSION @@ -665,6 +667,10 @@ exit 0 %{_datadir}/pixmaps/samba/logo-small.png %changelog +* Thu Nov 18 2010 Guenther Deschner - 3.5.6-71 +- Fix libsmbclient SMB signing +- resolves: #598620 + * Mon Nov 01 2010 Guenther Deschner - 3.5.6-70 - Handle no network case in init scripts - resolves: #604147