[v2] CIFS: display noacl in the mount options
diff mbox series

Message ID 20190410014158.27517-1-xifeng@redhat.com
State New
Headers show
Series
  • [v2] CIFS: display noacl in the mount options
Related show

Commit Message

Xiaoli Feng April 10, 2019, 1:41 a.m. UTC
From: "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>

The mount option noacl aren't shown in /proc/mounts
even if they are mounted successfully. And smb2.0+
don't support ACL. Display noacl acquiescently if ACL
is unsupported.

Signed-off-by: fengxiaoli0714@gmai.com <fengxiaoli0714@gmail.com>
---
 fs/cifs/cifsfs.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Steve French April 10, 2019, 2:56 a.m. UTC | #1
Could this get users confused who mount with "cifsacl" and see "noacl" as well?

Also this is really saying no support for "POSIX (draft standard) ACL
support" not no support for SMB3 ACL (or similarly "RichACL" or NFS
ACL or ... NTFS ACL or ... which are somewhat similar and common).

Could get confusing

On Tue, Apr 9, 2019 at 8:43 PM XiaoLi Feng <xifeng@redhat.com> wrote:
>
> From: "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
>
> The mount option noacl aren't shown in /proc/mounts
> even if they are mounted successfully. And smb2.0+
> don't support ACL. Display noacl acquiescently if ACL
> is unsupported.
>
> Signed-off-by: fengxiaoli0714@gmai.com <fengxiaoli0714@gmail.com>
> ---
>  fs/cifs/cifsfs.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index f9b71c12cc9f..80ee4fbcd25b 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -535,6 +535,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
>                 seq_puts(s, ",dynperm");
>         if (root->d_sb->s_flags & SB_POSIXACL)
>                 seq_puts(s, ",acl");
> +       else
> +               seq_puts(s, ",noacl");
>         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
>                 seq_puts(s, ",mfsymlinks");
>         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
> --
> 2.18.1
>
Xiaoli Feng April 10, 2019, 3:40 a.m. UTC | #2
Yes, could get users confused. But from the Man page:

       noacl  Do not allow POSIX ACL operations even if server would support them.
              The  CIFS  client  can get and set POSIX ACLs (getfacl, setfacl) to Samba servers version 3.0.10 and later. Setting POSIX ACLs requires enabling both CIFS_XATTR and then    CIFS_POSIX support in the CIFS configuration options when building the cifs module. POSIX ACL support can be disabled on a per mount basis by specifying noacl on mount.

       cifsacl
              This option is used to map CIFS/NTFS ACLs to/from Linux permission bits, map SIDs to/from UIDs and GIDs, and get and set Security Descriptors.
              See section on CIFS/NTFS ACL, SID/UID/GID MAPPING, SECURITY DESCRIPTORS for more information.

These two options are for different ACL. There is still a option "acl". It also can be mounted with cifsacl together for SMB1.0. 
There are some errors in my commit log. Should say "smb2.0+ don't support POSIX ACL". What do you think about this patch? It also
makes sense if doesn't display "noacl". 

----- Original Message -----
> From: "Steve French" <smfrench@gmail.com>
> To: "XiaoLi Feng" <xifeng@redhat.com>
> Cc: "CIFS" <linux-cifs@vger.kernel.org>, "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> Sent: Wednesday, April 10, 2019 10:56:19 AM
> Subject: Re: [PATCH v2] CIFS: display noacl in the mount options
> 
> Could this get users confused who mount with "cifsacl" and see "noacl" as
> well?
> 
> Also this is really saying no support for "POSIX (draft standard) ACL
> support" not no support for SMB3 ACL (or similarly "RichACL" or NFS
> ACL or ... NTFS ACL or ... which are somewhat similar and common).
> 
> Could get confusing
> 
> On Tue, Apr 9, 2019 at 8:43 PM XiaoLi Feng <xifeng@redhat.com> wrote:
> >
> > From: "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> >
> > The mount option noacl aren't shown in /proc/mounts
> > even if they are mounted successfully. And smb2.0+
> > don't support ACL. Display noacl acquiescently if ACL
> > is unsupported.
> >
> > Signed-off-by: fengxiaoli0714@gmai.com <fengxiaoli0714@gmail.com>
> > ---
> >  fs/cifs/cifsfs.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> > index f9b71c12cc9f..80ee4fbcd25b 100644
> > --- a/fs/cifs/cifsfs.c
> > +++ b/fs/cifs/cifsfs.c
> > @@ -535,6 +535,8 @@ cifs_show_options(struct seq_file *s, struct dentry
> > *root)
> >                 seq_puts(s, ",dynperm");
> >         if (root->d_sb->s_flags & SB_POSIXACL)
> >                 seq_puts(s, ",acl");
> > +       else
> > +               seq_puts(s, ",noacl");
> >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
> >                 seq_puts(s, ",mfsymlinks");
> >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
> > --
> > 2.18.1
> >
> 
> 
> --
> Thanks,
> 
> Steve
>
Xiaoli Feng April 10, 2019, 9:46 a.m. UTC | #3
Maybe we should change the option "acl|noacl" to "posixacl|noposixacl".

----- Original Message -----
> From: "Xiaoli Feng" <xifeng@redhat.com>
> To: "Steve French" <smfrench@gmail.com>
> Cc: "CIFS" <linux-cifs@vger.kernel.org>, "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> Sent: Wednesday, April 10, 2019 11:40:16 AM
> Subject: Re: [PATCH v2] CIFS: display noacl in the mount options
> 
> Yes, could get users confused. But from the Man page:
> 
>        noacl  Do not allow POSIX ACL operations even if server would support
>        them.
>               The  CIFS  client  can get and set POSIX ACLs (getfacl,
>               setfacl) to Samba servers version 3.0.10 and later. Setting
>               POSIX ACLs requires enabling both CIFS_XATTR and then
>               CIFS_POSIX support in the CIFS configuration options when
>               building the cifs module. POSIX ACL support can be disabled on
>               a per mount basis by specifying noacl on mount.
> 
>        cifsacl
>               This option is used to map CIFS/NTFS ACLs to/from Linux
>               permission bits, map SIDs to/from UIDs and GIDs, and get and
>               set Security Descriptors.
>               See section on CIFS/NTFS ACL, SID/UID/GID MAPPING, SECURITY
>               DESCRIPTORS for more information.
> 
> These two options are for different ACL. There is still a option "acl". It
> also can be mounted with cifsacl together for SMB1.0.
> There are some errors in my commit log. Should say "smb2.0+ don't support
> POSIX ACL". What do you think about this patch? It also
> makes sense if doesn't display "noacl".
> 
> ----- Original Message -----
> > From: "Steve French" <smfrench@gmail.com>
> > To: "XiaoLi Feng" <xifeng@redhat.com>
> > Cc: "CIFS" <linux-cifs@vger.kernel.org>, "fengxiaoli0714@gmai.com"
> > <fengxiaoli0714@gmail.com>
> > Sent: Wednesday, April 10, 2019 10:56:19 AM
> > Subject: Re: [PATCH v2] CIFS: display noacl in the mount options
> > 
> > Could this get users confused who mount with "cifsacl" and see "noacl" as
> > well?
> > 
> > Also this is really saying no support for "POSIX (draft standard) ACL
> > support" not no support for SMB3 ACL (or similarly "RichACL" or NFS
> > ACL or ... NTFS ACL or ... which are somewhat similar and common).
> > 
> > Could get confusing
> > 
> > On Tue, Apr 9, 2019 at 8:43 PM XiaoLi Feng <xifeng@redhat.com> wrote:
> > >
> > > From: "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> > >
> > > The mount option noacl aren't shown in /proc/mounts
> > > even if they are mounted successfully. And smb2.0+
> > > don't support ACL. Display noacl acquiescently if ACL
> > > is unsupported.
> > >
> > > Signed-off-by: fengxiaoli0714@gmai.com <fengxiaoli0714@gmail.com>
> > > ---
> > >  fs/cifs/cifsfs.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> > > index f9b71c12cc9f..80ee4fbcd25b 100644
> > > --- a/fs/cifs/cifsfs.c
> > > +++ b/fs/cifs/cifsfs.c
> > > @@ -535,6 +535,8 @@ cifs_show_options(struct seq_file *s, struct dentry
> > > *root)
> > >                 seq_puts(s, ",dynperm");
> > >         if (root->d_sb->s_flags & SB_POSIXACL)
> > >                 seq_puts(s, ",acl");
> > > +       else
> > > +               seq_puts(s, ",noacl");
> > >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
> > >                 seq_puts(s, ",mfsymlinks");
> > >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
> > > --
> > > 2.18.1
> > >
> > 
> > 
> > --
> > Thanks,
> > 
> > Steve
> > 
>
Steve French April 10, 2019, 5:27 p.m. UTC | #4
On Wed, Apr 10, 2019 at 4:46 AM Xiaoli Feng <xifeng@redhat.com> wrote:
>
>
> Maybe we should change the option "acl|noacl" to "posixacl|noposixacl".

That could be better although I lean toward waiting until we
experiment a little more with the SMB3.1.1 POSIX Extensions and any
additional mount options for them.


> ----- Original Message -----
> > From: "Xiaoli Feng" <xifeng@redhat.com>
> > To: "Steve French" <smfrench@gmail.com>
> > Cc: "CIFS" <linux-cifs@vger.kernel.org>, "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> > Sent: Wednesday, April 10, 2019 11:40:16 AM
> > Subject: Re: [PATCH v2] CIFS: display noacl in the mount options
> >
> > Yes, could get users confused. But from the Man page:
> >
> >        noacl  Do not allow POSIX ACL operations even if server would support
> >        them.
> >               The  CIFS  client  can get and set POSIX ACLs (getfacl,
> >               setfacl) to Samba servers version 3.0.10 and later. Setting
> >               POSIX ACLs requires enabling both CIFS_XATTR and then
> >               CIFS_POSIX support in the CIFS configuration options when
> >               building the cifs module. POSIX ACL support can be disabled on
> >               a per mount basis by specifying noacl on mount.
> >
> >        cifsacl
> >               This option is used to map CIFS/NTFS ACLs to/from Linux
> >               permission bits, map SIDs to/from UIDs and GIDs, and get and
> >               set Security Descriptors.
> >               See section on CIFS/NTFS ACL, SID/UID/GID MAPPING, SECURITY
> >               DESCRIPTORS for more information.
> >
> > These two options are for different ACL. There is still a option "acl". It
> > also can be mounted with cifsacl together for SMB1.0.
> > There are some errors in my commit log. Should say "smb2.0+ don't support
> > POSIX ACL". What do you think about this patch? It also
> > makes sense if doesn't display "noacl".
> >
> > ----- Original Message -----
> > > From: "Steve French" <smfrench@gmail.com>
> > > To: "XiaoLi Feng" <xifeng@redhat.com>
> > > Cc: "CIFS" <linux-cifs@vger.kernel.org>, "fengxiaoli0714@gmai.com"
> > > <fengxiaoli0714@gmail.com>
> > > Sent: Wednesday, April 10, 2019 10:56:19 AM
> > > Subject: Re: [PATCH v2] CIFS: display noacl in the mount options
> > >
> > > Could this get users confused who mount with "cifsacl" and see "noacl" as
> > > well?
> > >
> > > Also this is really saying no support for "POSIX (draft standard) ACL
> > > support" not no support for SMB3 ACL (or similarly "RichACL" or NFS
> > > ACL or ... NTFS ACL or ... which are somewhat similar and common).
> > >
> > > Could get confusing
> > >
> > > On Tue, Apr 9, 2019 at 8:43 PM XiaoLi Feng <xifeng@redhat.com> wrote:
> > > >
> > > > From: "fengxiaoli0714@gmai.com" <fengxiaoli0714@gmail.com>
> > > >
> > > > The mount option noacl aren't shown in /proc/mounts
> > > > even if they are mounted successfully. And smb2.0+
> > > > don't support ACL. Display noacl acquiescently if ACL
> > > > is unsupported.
> > > >
> > > > Signed-off-by: fengxiaoli0714@gmai.com <fengxiaoli0714@gmail.com>
> > > > ---
> > > >  fs/cifs/cifsfs.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> > > > index f9b71c12cc9f..80ee4fbcd25b 100644
> > > > --- a/fs/cifs/cifsfs.c
> > > > +++ b/fs/cifs/cifsfs.c
> > > > @@ -535,6 +535,8 @@ cifs_show_options(struct seq_file *s, struct dentry
> > > > *root)
> > > >                 seq_puts(s, ",dynperm");
> > > >         if (root->d_sb->s_flags & SB_POSIXACL)
> > > >                 seq_puts(s, ",acl");
> > > > +       else
> > > > +               seq_puts(s, ",noacl");
> > > >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
> > > >                 seq_puts(s, ",mfsymlinks");
> > > >         if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
> > > > --
> > > > 2.18.1
> > > >
> > >
> > >
> > > --
> > > Thanks,
> > >
> > > Steve
> > >
> >

Patch
diff mbox series

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index f9b71c12cc9f..80ee4fbcd25b 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -535,6 +535,8 @@  cifs_show_options(struct seq_file *s, struct dentry *root)
 		seq_puts(s, ",dynperm");
 	if (root->d_sb->s_flags & SB_POSIXACL)
 		seq_puts(s, ",acl");
+	else
+		seq_puts(s, ",noacl");
 	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
 		seq_puts(s, ",mfsymlinks");
 	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)