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
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
|
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
Tuesday, 13 March 2012, 23:43 GMT
Reason for closing: Fixed
Additional comments about closing: in testing
$ 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.
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.
https://github.com/karelzak/util-linux/commit/9bf9690114b7