]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
SMB3: Warn user if trying to sign connection that authenticated as guest
authorSteve French <smfrench@gmail.com>
Tue, 19 Sep 2017 23:40:03 +0000 (18:40 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:29 +0000 (16:20 -0500)
BugLink: http://bugs.launchpad.net/bugs/1721777
commit c721c38957fb19982416f6be71aae7b30630d83b upstream.

It can be confusing if user ends up authenticated as guest but they
requested signing (server will return error validating signed packets)
so add log message for this.

Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/cifs/smb2pdu.c

index 7d3070e9e1e5ebdf5a015711205fc375a38045e3..8090a2210d99da99ca9a5a86958ec90d336abaa3 100644 (file)
@@ -1164,6 +1164,8 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
        while (sess_data->func)
                sess_data->func(sess_data);
 
+       if ((ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) && (ses->sign))
+               cifs_dbg(VFS, "signing requested but authenticated as guest\n");
        rc = sess_data->result;
 out:
        kfree(sess_data);