Bug 3170 - mounting smbfs fails: unrecognized mount option noauto, etc
mounting smbfs fails: unrecognized mount option noauto, etc
Status: RESOLVED DUPLICATE of bug 1920
Product: Samba 3.0
Classification: Unclassified
Component: smbmount (unmaintained)
3.0.20
All Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-14 14:11 UTC by Mark Nauwelaerts
Modified: 2014-07-29 13:52 UTC (History)
0 users

See Also:


Attachments
Patch to prevent smbfs mount failing when encountering unrecognized option (320 bytes, patch)
2005-10-15 02:21 UTC, Mark Nauwelaerts
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nauwelaerts 2005-10-14 14:11:01 UTC
This is likely to be become a duplicate of #1920, but for the record ...

mount passes user options to smbmount, which passes these to smbmnt, which in
turn passes these to the mount system call, where smbfs checks these and
printk's a warning and fails the call if there is an unknown option.
As such, trying to mount an entry in fstab that is marked with noauto and/or
user (which implies nodev,noexec,nosuid), fails with "unrecognized mount option" 
(at least in SuSE 9.3, kernel version 2.6.11.4-20a-default).

In contrast, the more recommended CIFS suite only printk's a warning (and does
not fail the call), and mount.cifs also filters the options prior to passing
them along.

The following simplistic patch (on smbfs in the aforementioned version) would
prevent mount bailing out (as in CIFS).  Alternatively (more complicated),
smbmount or smbmnt could be adapted to filter options.
--- getopt.c    2005-03-02 08:38:13.000000000 +0100
+++ getopt.c.new        2005-10-14 22:44:28.000000000 +0200
@@ -62,3 +62,5 @@
        printk("%s: Unrecognized mount option %s\n", caller, token);
+/*     CIFS only issues warning also: does not fail
        return -1;
+*/
 }
Comment 1 Mark Nauwelaerts 2005-10-15 02:21:19 UTC
Created attachment 1515 [details]
Patch to prevent smbfs mount failing when encountering unrecognized option

The patch (on smbfs/getopt.c) embedded in the original description is a bit too
simplistic, this one respects the return codes of smb_getopt().
Comment 2 Björn Jacke 2014-07-29 13:52:52 UTC

*** This bug has been marked as a duplicate of bug 1920 ***