The Samba-Bugzilla – Bug 3170
mounting smbfs fails: unrecognized mount option noauto, etc
Last modified: 2014-07-29 13:52:52 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 22.214.171.124-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
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
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().
*** This bug has been marked as a duplicate of bug 1920 ***