From a5421c30620a701a6332677bfab228f8f07ca16448d8e6483ecaa62cfcc00174 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Tue, 12 Feb 2019 17:47:53 +0000 Subject: [PATCH] Accepting request 674194 from home:aaptel:cifs-utils-6.8 - Document new SMB2.1+ defaults for SLE15 * be more verbose when mount fails with EHOSTDOWN * update man page and error message with SLE15 information * add suse-sle15-changes.patch OBS-URL: https://build.opensuse.org/request/show/674194 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=158 --- cifs-utils.changes | 8 +++++++ cifs-utils.spec | 2 ++ suse-sle15-changes.patch | 50 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 suse-sle15-changes.patch diff --git a/cifs-utils.changes b/cifs-utils.changes index 0334263..64c1887 100644 --- a/cifs-utils.changes +++ b/cifs-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Feb 12 17:34:00 UTC 2019 - aaptel@suse.com + +- Document new SMB2.1+ defaults + * be more verbose when mount fails with EHOSTDOWN + * update man page and error message with SLE15 information + * add suse-sle15-changes.patch + ------------------------------------------------------------------- Mon Feb 11 08:33:10 UTC 2019 - dmulder@suse.com diff --git a/cifs-utils.spec b/cifs-utils.spec index 7e5ae1c..e06f511 100644 --- a/cifs-utils.spec +++ b/cifs-utils.spec @@ -42,6 +42,7 @@ Patch6: 0007-checkopts-report-duplicated-options-in-man-page.patch Patch7: 0008-mount.cifs.rst-more-cleanups.patch Patch8: 0009-mount.cifs.rst-document-vers-3-mount-option.patch Patch9: 0010-mount.cifs.rst-document-vers-3.02-mount-option.patch +Patch10: suse-sle15-changes.patch # cifs-utils 6.8 switched to python for man page generation # we need to require either py2 or py3 package @@ -129,6 +130,7 @@ cp -a ${RPM_SOURCE_DIR}/README.cifstab.migration . %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build export CFLAGS="%{optflags} -D_GNU_SOURCE -fpie" diff --git a/suse-sle15-changes.patch b/suse-sle15-changes.patch new file mode 100644 index 0000000..11f2453 --- /dev/null +++ b/suse-sle15-changes.patch @@ -0,0 +1,50 @@ +Index: cifs-utils-6.8/mount.cifs.c +=================================================================== +--- cifs-utils-6.8.orig/mount.cifs.c ++++ cifs-utils-6.8/mount.cifs.c +@@ -2099,6 +2099,10 @@ mount_retry: + switch (errno) { + case ECONNREFUSED: + case EHOSTUNREACH: ++ if (currentaddress) { ++ fprintf(stderr, "mount error(%d): could not connect to %s", ++ errno, currentaddress); ++ } + currentaddress = nextaddress; + if (currentaddress) { + nextaddress = strchr(currentaddress, ','); +@@ -2110,6 +2114,12 @@ mount_retry: + fprintf(stderr, + "mount error: %s filesystem not supported by the system\n", cifs_fstype); + break; ++ case EHOSTDOWN: ++ fprintf(stderr, ++ "mount error: Server abruptly closed the connection.\n" ++ "This can happen if the server does not support the SMB version you are trying to use.\n" ++ "Since SLE15 the default SMB version changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.\n"); ++ break; + case ENXIO: + if (!already_uppercased && + uppercase_string(parsed_info->host) && +@@ -2126,7 +2136,7 @@ mount_retry: + strerror(errno)); + fprintf(stderr, + "Refer to the %s(8) manual page (e.g. man " +- "%s)\n", thisprogram, thisprogram); ++ "%s) and kernel log messages (dmesg)\n", thisprogram, thisprogram); + rc = EX_FAIL; + goto mount_exit; + } +Index: cifs-utils-6.8/mount.cifs.rst +=================================================================== +--- cifs-utils-6.8.orig/mount.cifs.rst ++++ cifs-utils-6.8/mount.cifs.rst +@@ -598,7 +598,7 @@ vers=arg + Note too that while this option governs the protocol version used, not + all features of each version are available. + +- The default since v4.13.5 is for the client and server to negotiate ++ The default since SLE15 is for the client and server to negotiate + the highest possible version greater than or equal to ``2.1``. In + kernels prior to v4.13, the default was ``1.0``. For kernels + between v4.13 and v4.13.5 the default is ``3.0``.