From 531f03bc6d0509f2e7a5852e3f1819166e0f364c Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 14 Dec 2020 16:40:23 +1000 Subject: [PATCH] cifs: do not allow changing posix_paths during remount Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French --- fs/cifs/fs_context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index c3c6d0cd291b..58da674c0365 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -627,6 +627,10 @@ static void smb3_fs_context_free(struct fs_context *fc) static int smb3_verify_reconfigure_ctx(struct smb3_fs_context *new_ctx, struct smb3_fs_context *old_ctx) { + if (new_ctx->posix_paths != old_ctx->posix_paths) { + cifs_dbg(VFS, "can not change posixpaths during remount\n"); + return -EINVAL; + } if (new_ctx->sectype != old_ctx->sectype) { cifs_dbg(VFS, "can not change sec during remount\n"); return -EINVAL; -- 2.11.0