diff --git a/SOURCES/samba-4.8.3-get_real_filename_empty_path.patch b/SOURCES/samba-4.8.3-get_real_filename_empty_path.patch new file mode 100644 index 0000000..b58c6c3 --- /dev/null +++ b/SOURCES/samba-4.8.3-get_real_filename_empty_path.patch @@ -0,0 +1,42 @@ +From 2a7a76a501601506fa997f91651da1facba2e610 Mon Sep 17 00:00:00 2001 +From: Jeremy Allison +Date: Tue, 21 Aug 2018 12:05:34 -0700 +Subject: [PATCH] s3: smbd: Ensure get_real_filename() copes with empty + pathnames. + +Needed for vfs_glusterfs, as Gluster requires "." not '\0'. + +Based on a fix from Anoop C S + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13585 + +Signed-off-by: Jeremy Allison +Reviewed-by: Ira Cooper + +Autobuild-User(master): Jeremy Allison +Autobuild-Date(master): Wed Aug 22 21:50:41 CEST 2018 on sn-devel-144 + +(cherry picked from commit 9c71f61ed8a31d287d343d4f2e68cb40c57a2b89) +--- + source3/smbd/filename.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c +index 9e15af1916d..41c1710351e 100644 +--- a/source3/smbd/filename.c ++++ b/source3/smbd/filename.c +@@ -1443,6 +1443,11 @@ int get_real_filename(connection_struct *conn, const char *path, + int ret; + bool mangled; + ++ /* handle null paths */ ++ if ((path == NULL) || (*path == 0)) { ++ path = "."; ++ } ++ + mangled = mangle_is_mangled(name, conn->params); + + if (mangled) { +-- +2.18.0.1017.ga543ac7ca45-goog + diff --git a/SPECS/samba.spec b/SPECS/samba.spec index 152ff2a..3565267 100644 --- a/SPECS/samba.spec +++ b/SPECS/samba.spec @@ -19,7 +19,7 @@ %if "x%{?pre_release}" != "x" %define samba_release 0.%{main_release}.%{pre_release}%{?dist} %else -%define samba_release %{main_release}%{?dist} +%define samba_release %{main_release}%{?dist}.0.1 %endif # This is a network daemon, do a hardened build @@ -136,6 +136,8 @@ Patch5: samba-4.8-fix_smbspool_as_cups_backend.patch Patch6: samba-4.8-fix_cups_smbspool_backend.part1.patch Patch7: samba-4.8-fix_cups_smbspool_backend.part2.patch +Patch10000: samba-4.8.3-get_real_filename_empty_path.patch + Requires(pre): /usr/sbin/groupadd Requires(post): systemd Requires(preun): systemd @@ -3123,6 +3125,9 @@ rm -rf %{buildroot} %endif # with_clustering_support %changelog +* Tue Jul 30 2019 Pablo Greco - 4.8.3-6.0.1 +- Backport fix from https://bugzilla.samba.org/show_bug.cgi?id=13585 + * Tue May 28 2019 Andreas Schneider - 4.8.3-6 - resolves: #1713637 - Fix smbspool with krb5 as CUPS backend