Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#28682 - [util-linux] mount passes -s switch to mount.cifs

Attached to Project: Arch Linux
Opened by John Horan (jhoran) - Monday, 27 February 2012, 13:44 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 13 March 2012, 23:43 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Using autofs to mount a cifs share along with the new version of mount in util-linux-2.21 fails due to mount passing the -s switch through to mount.cifs, which doesn't handle the option and fails. As the man page for mount specifically mentions that this switch isn't supported by all filesystems, I'm guessing it shouldn't be passing it into mount.cifs.


attempting to mount entry /mnt/.net/nas
lookup_mount: lookup(file): looking up nas
lookup_mount: lookup(file): nas -> -fstype=cifs,credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100 ://johns-nas/private
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100 ://johns-nas/private
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100
parse_mount: parse(sun): dequote("://johns-nas/private") -> ://johns-nas/private
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100, loc=://johns-nas/private
sun_mount: parse(sun): mounting root /mnt/.net, mountpoint nas, what //johns-nas/private, fstype cifs, options credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100
do_mount: //johns-nas/private /mnt/.net/nas type cifs options credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100 using module generic
mount_mount: mount(generic): calling mkdir_path /mnt/.net/nas
mount_mount: mount(generic): calling mount -t cifs -s -o credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100 //johns-nas/private /mnt/.net/nas
>> /sbin/mount.cifs: invalid option -- 's'
>> Usage: mount.cifs <remotetarget> <dir> -o <options>
>> Mount the remote target, specified as a UNC name, to a local directory.
>> Options:
>> user=<arg>
>> pass=<arg>
>> dom=<arg>
>> Less commonly used options:
>> credentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,
>> sep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,
>> mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>
>> directio,nounix,cifsacl,sec=<authentication mechanism>,sign,fsc
>> Options not needed for servers supporting CIFS Unix extensions
>> (e.g. unneeded for mounts to most Samba versions):
>> uid=<uid>,gid=<gid>,dir_mode=<mode>,file_mode=<mode>,sfu
>> Rarely used options:
>> port=<tcpport>,rsize=<size>,wsize=<size>,unc=<unc_name>,ip=<ip_address>,
>> dev,nodev,nouser_xattr,netbiosname=<OUR_RFC1001NAME>,hard,soft,intr,
>> nointr,ignorecase,noposixpaths,noacl,prefixpath=<path>,nobrl
>> Options are described in more detail in the manual page
>> man 8 mount.cifs
>> To display the version number of the mount helper:
>> mount.cifs -V
mount_mount: mount(generic): mounted //johns-nas/private type cifs on /mnt/.net/nas
dev_ioctl_send_ready: token = 185
mounted /mnt/.net/nas
This task depends upon

Closed by  Tom Gundersen (tomegun)
Tuesday, 13 March 2012, 23:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  in testing
Comment by Dave Reisner (falconindy) - Monday, 27 February 2012, 13:59 GMT
This debug output appears to be generated by the automounter, not by mount(8). Can you reproduce this directly calling the mount helper with 'mount -t cifs ....' ?
Comment by John Horan (jhoran) - Monday, 27 February 2012, 14:08 GMT
Sure:

$ sudo mount -t cifs -s -o credentials=/root/.smbcredentials,iocharset=utf8,uid=1000,gid=100 //johns-nas/private /mnt/.net/nas
/sbin/mount.cifs: invalid option -- 's'

Usage: mount.cifs <remotetarget> <dir> -o <options>

Mount the remote target, specified as a UNC name, to a local directory.

Options:
user=<arg>
pass=<arg>
dom=<arg>

Less commonly used options:
credentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,
sep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,
mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>
directio,nounix,cifsacl,sec=<authentication mechanism>,sign,fsc

Options not needed for servers supporting CIFS Unix extensions
(e.g. unneeded for mounts to most Samba versions):
uid=<uid>,gid=<gid>,dir_mode=<mode>,file_mode=<mode>,sfu

Rarely used options:
port=<tcpport>,rsize=<size>,wsize=<size>,unc=<unc_name>,ip=<ip_address>,
dev,nodev,nouser_xattr,netbiosname=<OUR_RFC1001NAME>,hard,soft,intr,
nointr,ignorecase,noposixpaths,noacl,prefixpath=<path>,nobrl

Options are described in more detail in the manual page
man 8 mount.cifs

To display the version number of the mount helper:
mount.cifs -V



The -s switch is added by the automounter and I haven't been able to find a way to remove it. When I call mount without the -s switch it mounts correctly.
Comment by Dave Reisner (falconindy) - Monday, 27 February 2012, 14:09 GMT
I didn't mean generate the error by passing -s to mount. My point is that, as you've already noted, the automounter (not mount) is adding the -s switch.
Comment by Dave Reisner (falconindy) - Monday, 27 February 2012, 14:23 GMT
So, autofs detects the availability of the '-s' flag at build time and adds it to every mount call when it finds support for it.

Big conjecture coming up -- you initially installed autofs from the AUR and built it yourself as non-root. Without being root, the compile time check for the '-s' flag fails. With the autofs update on 2/24, it was built using devtools, which means that it was done as root, and the check for the -s flag suceeds. You now have an autofs that wants to add sloppy mounting to everything. Am I on track? This isn't related to the new util-linux at all.
Comment by John Horan (jhoran) - Monday, 27 February 2012, 15:13 GMT
Yes I think you hit the nail on the head. The original version of automount I used came from pacman but I tried downloading the sources are recompiling them myself as non-root and that fixed the problem. The one thing I would say is that I also tried installing the older version of the utils-linux package (util-linux-2.20.1-2) and this version swallowed the -s switch instead of passing it through to mount.cifs.
Comment by Dave Reisner (falconindy) - Monday, 27 February 2012, 16:01 GMT Comment by Tom Gundersen (tomegun) - Monday, 27 February 2012, 16:33 GMT
Upstream bug report (against cifs): https://bugzilla.redhat.com/show_bug.cgi?id=797956

Loading...