Bug 133488 - Option noauto should be removed when invoking special mount program
Summary: Option noauto should be removed when invoking special mount program
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-24 13:11 UTC by Jochen Wiedmann
Modified: 2014-08-31 23:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-30 14:53:26 UTC
Type: ---
Embargoed:


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 15:09 UTC, Jochen Wiedmann
no flags Details | Diff
Patch for the SPECS file (713 bytes, patch)
2004-11-09 15:10 UTC, Jochen Wiedmann
no flags Details | Diff

Description Jochen Wiedmann 2004-09-24 13:11:23 UTC
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 15:09:31 UTC
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 15:10:05 UTC
Created attachment 106341 [details]
Patch for the SPECS file

Comment 3 Elliot Lee 2004-12-03 19:27:15 UTC
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 16:21:40 UTC
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 18:50:28 UTC
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 23:15:32 UTC
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 14:53:26 UTC
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.