Bug 133488 - Option noauto should be removed when invoking special mount program
Option noauto should be removed when invoking special mount program
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-24 09:11 EDT by Jochen Wiedmann
Modified: 2014-08-31 19:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-30 09:53:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for the mount command, causing it to remove the "noauto" flag on the invocation of "mount.*" (342 bytes, patch)
2004-11-09 10:09 EST, Jochen Wiedmann
no flags Details | Diff
Patch for the SPECS file (713 bytes, patch)
2004-11-09 10:10 EST, Jochen Wiedmann
no flags Details | Diff

  None (edit)
Description Jochen Wiedmann 2004-09-24 09:11:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040706 Firefox/0.9.1

Description of problem:
I have a SMBFS share in /etc/fstab with the following options:

  workgroup=EUR,username=jwi,iocharset=iso8859-1,codepage=cp850,noauto  

In other words, I want mount.smbfs be invoked with options for
specifying my user name and I want to choose character sets.
Additionally, I want the share to be mounted on demand only.

The current version of mount.c converts the above line into an
invocation of mount.smbfs with the following options:

  rw,noauto,workgroup=EUR,username=jwi,iocharset=iso8859-1,codepage=cp850

The problem is, that mount.smbfs is actually /usr/bin/smbmount, at
least on Fedora Core 2. This program doesn't know about the "noauto"
option. As a consequence, it ignores all options and my other settings
are being ignored. I see this, for example, when using file names with
non-ascii characters.

IMO smbmounts behaviour is is right, because "noauto" is clearly an
option required by the "mount" frontend only, used by "mount -a". In
other words, the moung program should remove the "noauto" option, when 
invoking special mount programs.



Version-Release number of selected component (if applicable):
util-linux-2.12-18

How reproducible:
Always

Steps to Reproduce:
1. Replace mount.smbfs with a shell script that echoes its arguments.
2. Create an entry in /etc/fstab with option "noauto" and the above
options.
3. Try to mount the entry
    

Actual Results:  The fake mount.smbfs echoes its command line
arguments, including

    -o rw,noauto,<your actual options>


Expected Results:  The fake mount.smbfs should echo only

    -o rw,<your actual options>


Additional info:

A simple patch is as follows:

diff -ub mount.c.orig mount.c
--- mount.c.orig        2004-09-24 15:00:43.951720928 +0200
+++ mount.c     2004-09-24 15:00:35.125062784 +0200
@@ -361,6 +361,7 @@
        char *new_opts;
  
        new_opts = (flags & MS_RDONLY) ? "ro" : "rw";
+       flags = flags & ~MS_NOAUTO;
        for (om = opt_map; om->opt != NULL; om++) {
                if (om->skip)
                        continue;
Comment 1 Jochen Wiedmann 2004-11-09 10:09:31 EST
Created attachment 106339 [details]
Patch for the mount command, causing it to remove the "noauto" flag on the invocation of "mount.*"
Comment 2 Jochen Wiedmann 2004-11-09 10:10:05 EST
Created attachment 106341 [details]
Patch for the SPECS file
Comment 3 Elliot Lee 2004-12-03 14:27:15 EST
There are a number of mount options that are expected to be applicable
for any filesystem - see mount.8.

The right solution is probably for mount.smbfs (aka smbmount) to know
that it should ignore these options.
Comment 4 Matthew Miller 2005-04-26 12:21:40 EDT
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.
Comment 5 Jochen Wiedmann 2005-04-26 14:50:28 EDT
Both bug and suggested patch are still valid, as of util-linux 2.12a-23, which
is the latest update for Fedora Core 3.
Comment 6 Matthew Miller 2006-07-10 19:15:32 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 7 John Thacker 2006-10-30 09:53:26 EST
Closing per lack of response to previous request for information.
Note that FC3 and FC4 are supported by Fedora Legacy for security
fixes only.  Please install a still supported version and retest.  If
it still occurs on FC5 or FC6, please reopen and assign to the correct
version.  Otherwise, if this a security issue, please change the
product to Fedora Legacy.  Thanks, and we are sorry that we did not
get to this bug earlier.

Note You need to log in before you can comment on or make changes to this bug.