From 8da6e99695fc5ba995b02faae2c1c8f6f7a5a9c5 Mon Sep 17 00:00:00 2001 From: Guenther Deschner Date: May 09 2008 23:08:06 +0000 Subject: Add smbclient fix (BZO #5452) Guenther --- diff --git a/samba-3.2.0pre3-smbclient.diff b/samba-3.2.0pre3-smbclient.diff new file mode 100644 index 0000000..a594bfa --- /dev/null +++ b/samba-3.2.0pre3-smbclient.diff @@ -0,0 +1,29 @@ +commit 687275cd532f8f8ad710acd222a0c76625da53c6 +Author: Jeremy Allison +Date: Thu May 8 22:07:35 2008 -0700 + + Fix bug #5452 - smbclient put always creates zero length + files. Thanks to Kai Engert for + reporting. + Jeremy. + +diff --git a/source/lib/xfile.c b/source/lib/xfile.c +index d20a95b..e44a92d 100644 +--- a/source/lib/xfile.c ++++ b/source/lib/xfile.c +@@ -263,13 +263,13 @@ int x_fflush(XFILE *f) + + if (f->flags & X_FLAG_ERROR) return -1; + ++ if (f->bufused == 0 || !f->buf) return 0; ++ + if ((f->open_flags & O_ACCMODE) != O_WRONLY) { + errno = EINVAL; + return -1; + } + +- if (f->bufused == 0 || !f->buf) return 0; +- + ret = write(f->fd, f->buf, f->bufused); + if (ret == -1) return -1; + diff --git a/samba.spec b/samba.spec index a3e9fa2..089c9c4 100644 --- a/samba.spec +++ b/samba.spec @@ -1,4 +1,4 @@ -%define main_release 9 +%define main_release 10 %define samba_version 3.2.0pre3 %define tdb_version 1.1.1 %define talloc_version 1.2.0 @@ -47,6 +47,7 @@ Patch110: samba-3.0.21pre1-smbspool.patch Patch111: samba-3.0.13-smbclient.patch Patch200: samba-3.0.25rc1-inotifiy.patch Patch207: samba-3.2.0pre2-roreloc.diff +Patch208: samba-3.2.0pre3-smbclient.diff Requires(pre): samba-common = %{epoch}:%{version}-%{release} Requires: pam >= 0:0.64 @@ -254,6 +255,7 @@ cp %{SOURCE11} packaging/Fedora/ #%patch111 -p1 -b .smbclient # FIXME: does not apply #%patch200 -p0 -b .inotify # FIXME: does not compile %patch207 -p1 -b .roreloc +%patch208 -p1 -b .smbclient mv source/VERSION source/VERSION.orig sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{release}\"/' < source/VERSION.orig > source/VERSION @@ -848,6 +850,9 @@ exit 0 %{_datadir}/pixmaps/samba/logo-small.png %changelog +* Fri May 09 2008 Guenther Deschner - 3.2.0-1.pre3.10 +- Add smbclient fix (BZO #5452) + * Fri Apr 25 2008 Guenther Deschner - 3.2.0-1.pre3.9 - Update to 3.2.0pre3