Merge ~sergiodj/ubuntu/+source/util-linux:bug1905510-user-mount-cifs-break into ubuntu/+source/util-linux:ubuntu/devel

Proposed by Sergio Durigan Junior
Status: Merged
Merge reported by: Sergio Durigan Junior
Merged at revision: 49c003766bb580408a8cff3a5ffcf4a034c9727f
Proposed branch: ~sergiodj/ubuntu/+source/util-linux:bug1905510-user-mount-cifs-break
Merge into: ubuntu/+source/util-linux:ubuntu/devel
Diff against target: 76 lines (+54/-0)
3 files modified
debian/changelog (+9/-0)
debian/patches/libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch (+44/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Balint Reczey (community) Approve
Canonical Server Core Reviewers Pending
Canonical Server Pending
Review via email: mp+394555@code.launchpad.net

Description of the change

This is the fix for bug 1905510.

This bug has already been reported and fixed upstream here:

https://github.com/karelzak/util-linux/issues/1193

so this is just the backport of the (simple) patch. The issue is that, without the patch, the "symfollow" option (used when one does a user mount with mount.cifs, for example) is not recognized by util-linux, leading to an error message like:

[ 53.586709] CIFS: Attempting to mount //localhost/myshare1760
[ 53.586735] CIFS: Unknown mount option "symfollow"

This is needed in order to unblock samba from migrating (which itself is blocking Python 3.9), so you could say the priority is high.

I verified that this fix makes samba's dep8 tests pass:

autopkgtest [17:49:38]: @@@@@@@@@@@@@@@@@@@@ summary
cifs-share-access PASS
cifs-share-access-uring PASS
python-smoke PASS
smbclient-anonymous-share-list PASS
smbclient-authenticated-share-list PASS
smbclient-share-access PASS
smbclient-share-access-uring PASS

I have also verified that util-linux's dep8 tests are still passing:

autopkgtest [18:10:33]: @@@@@@@@@@@@@@@@@@@@ summary
oversized-chunks PASS
libblkid-dev PASS (superficial)
libmount-dev PASS (superficial)
libsmartcols-dev PASS (superficial)
uuid-dev PASS (superficial)

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Adding the Foundations team to the list of reviewers because it's their package.

Revision history for this message
Balint Reczey (rbalint) wrote :

Uploaded, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 48ce17e..585cade 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+util-linux (2.36.1-1ubuntu2) hirsute; urgency=medium
7+
8+ * Unbreak mount.cifs user mount (LP: #1905510)
9+ - d/p/libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch:
10+ Backport from upstream patch to fix user mounts on mount.cifs,
11+ because the "symfollow" option became unknown.
12+
13+ -- Sergio Durigan Junior <sergio.durigan@canonical.com> Thu, 26 Nov 2020 16:51:24 -0500
14+
15 util-linux (2.36.1-1ubuntu1) hirsute; urgency=low
16
17 * Merge from Debian unstable. Remaining changes:
18diff --git a/debian/patches/libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch b/debian/patches/libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch
19new file mode 100644
20index 0000000..0d08667
21--- /dev/null
22+++ b/debian/patches/libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch
23@@ -0,0 +1,44 @@
24+From: Karel Zak <kzak@redhat.com>
25+Date: Thu, 19 Nov 2020 09:49:16 +0100
26+Subject: libmount: don't use "symfollow" for helpers on user mounts
27+
28+Addresses: https://github.com/karelzak/util-linux/issues/1193
29+Signed-off-by: Karel Zak <kzak@redhat.com>
30+
31+Author: Karel Zak <kzak@redhat.com>
32+Origin: upstream, https://github.com/karelzak/util-linux/commit/52f730e47869ce630fafb24fd46f755dc7ffc691
33+Bug: https://github.com/karelzak/util-linux/issues/1193
34+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/util-linux/+bug/1905510
35+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975003
36+Last-Update: 2020-11-26
37+Reviewed-By: Sergio Durigan Junior <sergio.durigan@canonical.com>
38+---
39+ libmount/src/context_mount.c | 6 +++---
40+ 1 file changed, 3 insertions(+), 3 deletions(-)
41+
42+diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
43+index 8c394c1..dd17861 100644
44+--- a/libmount/src/context_mount.c
45++++ b/libmount/src/context_mount.c
46+@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
47+ * string, because there is nothing like MS_EXEC (we only have
48+ * MS_NOEXEC in mount flags and we don't care about the original
49+ * mount string in libmount for VFS options).
50++ *
51++ * This use-case makes sense for MS_SECURE flags only (see
52++ * mnt_optstr_get_flags() and mnt_context_merge_mflags()).
53+ */
54+ if (!(cxt->mountflags & MS_NOEXEC))
55+ mnt_optstr_append_option(optstr, "exec", NULL);
56+@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
57+ mnt_optstr_append_option(optstr, "suid", NULL);
58+ if (!(cxt->mountflags & MS_NODEV))
59+ mnt_optstr_append_option(optstr, "dev", NULL);
60+- if (!(cxt->mountflags & MS_NOSYMFOLLOW))
61+- mnt_optstr_append_option(optstr, "symfollow", NULL);
62+ }
63+
64+-
65+ if (cxt->flags & MNT_FL_SAVED_USER)
66+ rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user);
67+ if (rc)
68diff --git a/debian/patches/series b/debian/patches/series
69index ee52246..0f2c20b 100644
70--- a/debian/patches/series
71+++ b/debian/patches/series
72@@ -1,3 +1,4 @@
73 sulogin-fallback-static-sh.patch
74 sulogin-lockedpwd.patch
75 verbose-tests.patch
76+libmount-don-t-use-symfollow-for-helpers-on-user-mounts.patch

Subscribers

People subscribed via source and target branches