• Steve French's avatar
    smb3: do not allow insecure cifs mounts when using smb3 · c7c137b9
    Steve French authored
    if mounting as smb3 do not allow cifs (vers=1.0) or insecure vers=2.0
    mounts.
    
    For example:
    root@smf-Thinkpad-P51:~/cifs-2.6# mount -t smb3 //127.0.0.1/scratch /mnt -o username=testuser,password=Testpass1
    root@smf-Thinkpad-P51:~/cifs-2.6# umount /mnt
    root@smf-Thinkpad-P51:~/cifs-2.6# mount -t smb3 //127.0.0.1/scratch /mnt -o username=testuser,password=Testpass1,vers=1.0
    mount: /mnt: wrong fs type, bad option, bad superblock on //127.0.0.1/scratch ...
    root@smf-Thinkpad-P51:~/cifs-2.6# dmesg | grep smb3
    [ 4302.200122] CIFS VFS: vers=1.0 (cifs) not permitted when mounting with smb3
    root@smf-Thinkpad-P51:~/cifs-2.6# mount -t smb3 //127.0.0.1/scratch /mnt -o username=testuser,password=Testpass1,vers=3.11
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    Acked-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
    Reviewed-by: default avatarSachin Prabhu <sprabhu@redhat.com>
    c7c137b9
cifsproto.h 25.3 KB