Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194709 - sys-apps/util-linux:-2.12r-r7 - mount does not pass sloppy (-s) option to external mount programms
Summary: sys-apps/util-linux:-2.12r-r7 - mount does not pass sloppy (-s) option to ext...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-04 14:01 UTC by Denis Scherbakov
Modified: 2007-10-11 07:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Scherbakov 2007-10-04 14:01:15 UTC
A sloppy option forces mount programs to ignore mount options not supported by a filesystem type.When there is an external mount program present (/sbin/mount.*), "mount" must pass all burden connected with mounting to this program this includes sloppy option.

Reproducible: Always

Steps to Reproduce:
1. To reproduce a bug you need "/bin/mount" from sys-apps/util-linux be present on your system and some external mounting application, e.g. /sbin/mount.nfs from net-fs/nfs-utils package (or instead of installing nfs-utils package, you may create an executable there).

2. Now tun strace. It doesn't really matter, what you pass into a program, just make sure that a) "-t nfs" is present b) "-s" sloppy option is present and c) "/sbin/mount.nfs" is present: strace -f -e trace=file mount -t nfs -s myserver:/path/to/dir /mount/target

3. As you can see in strace log:
execve("/bin/mount", ["mount", "-t", "nfs", "-s", "myserver:/path/to/dir", "/mount/target"], [/* 58 vars */]) = 0
// ........
execve("/sbin/mount.nfs", ["/sbin/mount.nfs", "myserver:/path/to/dir", "/mount/target", "-o", "rw"], [/* 54 vars */]) = 0
// ........

4. When /sbin/mount.nfs is called, sloppy option is missing.
Actual Results:  
Sloppy option is not passed to the underlying mount program.

Expected Results:  
Sloppy option must be passed to the underlying mount program, otherwise it changes execution logic.

To fix a bug, go to util-linux-2.12r-r7/mount/mount.c, find check_special_mountprog() and add sloppy option:

  if (nomtab)
       mountargs[i++] = "-n";
+ if (sloppy)
+      mountargs[i++] = "-s";
  if (verbose)
       mountargs[i++] = "-v";
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-04 18:22:46 UTC
Can you reproduce this w/ 2.13-r1?
Comment 2 Denis Scherbakov 2007-10-04 19:43:43 UTC
Checked 2.13-r1 from Gentoo, it has code that handles sloppy correctly.
2.13-pre7 from kernel.org does not. Sorry, I didn't check development version from Gentoo. I assumed that kernel.org has the latest...

Will 2.13-r1 be marked as stable soon, or do you think there should be a 2.12r-r8 with sloppy corrected? The bug appeared when nfs-utils released their own version of mount (/sbin/mount.nfs) and mount switched to calling external mount instead of handling everything internally.
Comment 3 Denis Scherbakov 2007-10-11 07:47:56 UTC
Well, today I synced and I see that you continue to distribute 2.12r-r* versions. Would you, please include a bug fix into the 2.12r-r* tree as well, so the bug get finally fixed in stable Gentoo.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-10-11 07:49:13 UTC
This is fixed in 2.13, as said above. Will get fixed in stable once that version gets stabilized.