From: Steve French Date: Tue, 19 Sep 2017 23:40:03 +0000 (-0500) Subject: SMB3: Warn user if trying to sign connection that authenticated as guest X-Git-Tag: v4.14-rc2~16^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c721c38957fb19982416f6be71aae7b30630d83b;p=platform%2Fkernel%2Flinux-exynos.git SMB3: Warn user if trying to sign connection that authenticated as guest 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 Reviewed-by: Ronnie Sahlberg CC: Stable --- diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index b4c58a1..d499ce2 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1176,6 +1176,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);