All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount
@ 2020-08-13 17:44 Steve French
  2020-08-13 17:55 ` Paulo Alcantara
  0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2020-08-13 17:44 UTC (permalink / raw)
  To: CIFS

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

    mkdir uses a compounded create operation which was not setting
    the security descriptor on create of a directory. Fix so
    mkdir now sets the mode and owner info properly when idsfromsid
    and modefromsid are configured on the mount.


-- 
Thanks,

Steve

[-- Attachment #2: 0001-SMB3-Fix-mkdir-when-idsfromsid-configured-on-mount.patch --]
[-- Type: text/x-patch, Size: 1077 bytes --]

From c8e2d959ddac89ee44f170b2f2549e749581ec55 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 13 Aug 2020 12:38:08 -0500
Subject: [PATCH] SMB3: Fix mkdir when idsfromsid configured on mount

mkdir uses a compounded create operation which was not setting
the security descriptor on create of a directory. Fix so
mkdir now sets the mode and owner info properly when idsfromsid
and modefromsid are configured on the mount.

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org> # v5.8
---
 fs/cifs/smb2inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index b9db73687eaa..eba01d0908dd 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -115,6 +115,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
 	vars->oparms.fid = &fid;
 	vars->oparms.reconnect = false;
 	vars->oparms.mode = mode;
+	vars->oparms.cifs_sb = cifs_sb;
 
 	rqst[num_rqst].rq_iov = &vars->open_iov[0];
 	rqst[num_rqst].rq_nvec = SMB2_CREATE_IOV_SIZE;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount
  2020-08-13 17:44 [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount Steve French
@ 2020-08-13 17:55 ` Paulo Alcantara
  2020-08-13 23:10   ` Pavel Shilovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Alcantara @ 2020-08-13 17:55 UTC (permalink / raw)
  To: Steve French, CIFS

Steve French <smfrench@gmail.com> writes:

> From c8e2d959ddac89ee44f170b2f2549e749581ec55 Mon Sep 17 00:00:00 2001
> From: Steve French <stfrench@microsoft.com>
> Date: Thu, 13 Aug 2020 12:38:08 -0500
> Subject: [PATCH] SMB3: Fix mkdir when idsfromsid configured on mount
>
> mkdir uses a compounded create operation which was not setting
> the security descriptor on create of a directory. Fix so
> mkdir now sets the mode and owner info properly when idsfromsid
> and modefromsid are configured on the mount.
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> CC: Stable <stable@vger.kernel.org> # v5.8
> ---
>  fs/cifs/smb2inode.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
> index b9db73687eaa..eba01d0908dd 100644
> --- a/fs/cifs/smb2inode.c
> +++ b/fs/cifs/smb2inode.c
> @@ -115,6 +115,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
>  	vars->oparms.fid = &fid;
>  	vars->oparms.reconnect = false;
>  	vars->oparms.mode = mode;
> +	vars->oparms.cifs_sb = cifs_sb;
>  
>  	rqst[num_rqst].rq_iov = &vars->open_iov[0];
>  	rqst[num_rqst].rq_nvec = SMB2_CREATE_IOV_SIZE;

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount
  2020-08-13 17:55 ` Paulo Alcantara
@ 2020-08-13 23:10   ` Pavel Shilovsky
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Shilovsky @ 2020-08-13 23:10 UTC (permalink / raw)
  To: Paulo Alcantara; +Cc: Steve French, CIFS

Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
--
Best regards,
Pavel Shilovsky

чт, 13 авг. 2020 г. в 10:56, Paulo Alcantara <pc@cjr.nz>:
>
> Steve French <smfrench@gmail.com> writes:
>
> > From c8e2d959ddac89ee44f170b2f2549e749581ec55 Mon Sep 17 00:00:00 2001
> > From: Steve French <stfrench@microsoft.com>
> > Date: Thu, 13 Aug 2020 12:38:08 -0500
> > Subject: [PATCH] SMB3: Fix mkdir when idsfromsid configured on mount
> >
> > mkdir uses a compounded create operation which was not setting
> > the security descriptor on create of a directory. Fix so
> > mkdir now sets the mode and owner info properly when idsfromsid
> > and modefromsid are configured on the mount.
> >
> > Signed-off-by: Steve French <stfrench@microsoft.com>
> > CC: Stable <stable@vger.kernel.org> # v5.8
> > ---
> >  fs/cifs/smb2inode.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
> > index b9db73687eaa..eba01d0908dd 100644
> > --- a/fs/cifs/smb2inode.c
> > +++ b/fs/cifs/smb2inode.c
> > @@ -115,6 +115,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
> >       vars->oparms.fid = &fid;
> >       vars->oparms.reconnect = false;
> >       vars->oparms.mode = mode;
> > +     vars->oparms.cifs_sb = cifs_sb;
> >
> >       rqst[num_rqst].rq_iov = &vars->open_iov[0];
> >       rqst[num_rqst].rq_nvec = SMB2_CREATE_IOV_SIZE;
>
> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-13 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 17:44 [PATCH][SMB3] Fix mkdir when idsfromsid configured on mount Steve French
2020-08-13 17:55 ` Paulo Alcantara
2020-08-13 23:10   ` Pavel Shilovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.