On Thu, 24 Sep 2020 17:45:25 +0200, Chris Hofstaedtler <z...@debian.org> wrote:
> It appears mount.cifs somehow re-adds a comment=... option from > /etc/fstab when calling mount(), for "user"-style mounts. > > $ strace -ttf -bexecve -s30000 mount /mnt > execve("/sbin/mount.cifs", ["/sbin/mount.cifs", "//x/y", "/mnt", "-o", > "rw,noexec,nosuid,nodev,username=ch,user"], 0x7ffc40273cb0 /* 42 vars */) = 0 > > In a root-strace of mount.cifs, you'll see: > mount("//x/y$", ".", "cifs", MS_NOSUID|MS_NODEV, > "ip=10.100.0.52,unc=\\\\x\\y,noauto,comment=foo,uid=1000,gid=1000,user=ch,pass=yolo") > = -1 EINVAL (Invalid argument) > > Doesn't appear to be a util-linux/mount problem to me. Right. It turns out that mount.cifs doesn't trust the options passed by a user so it re-reads them and neglects to ignore the comment option. I'm sending a patch for an upstream fix... Thanks for working this out! peace & happiness, martin