[PATCH 2/2 v3] vfs_ceph: add empty ACL callbacks

Michael Adam obnox at samba.org
Thu Apr 2 05:59:26 MDT 2015


reviewed-by me - pushing.

Michael

On 2015-04-02 at 07:01 -0400, Ira Cooper wrote:
> Reviewed-by: Ira Cooper <ira at samba.org>
> 
> -Ira
> 
> On Wed, Apr 1, 2015 at 10:11 PM, Yan, Zheng <zyan at redhat.com> wrote:
> 
> > If a vfs module has no ACL callbacks, smbd will use its default ACL
> > callbacks. These default ACL callbacks operate on local filesytem,
> > it's clearly wrong for ceph case.
> >
> > libcephfs does not support ACL yet, so this patch adds ACL callbacks
> > that do nothing.
> >
> > Signed-off-by: Yan, Zheng <zyan at redhat.com>
> > ---
> >  source3/modules/vfs_ceph.c | 48
> > ++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 48 insertions(+)
> >
> > diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
> > index e9f000c..409189b 100644
> > --- a/source3/modules/vfs_ceph.c
> > +++ b/source3/modules/vfs_ceph.c
> > @@ -1205,6 +1205,47 @@ static int cephwrap_set_offline(struct
> > vfs_handle_struct *handle,
> >         return -1;
> >  }
> >
> > +static SMB_ACL_T cephwrap_sys_acl_get_file(struct vfs_handle_struct
> > *handle,
> > +                                          const char *path_p,
> > +                                          SMB_ACL_TYPE_T type,
> > +                                          TALLOC_CTX *mem_ctx)
> > +{
> > +       errno = ENOTSUP;
> > +       return NULL;
> > +}
> > +
> > +static SMB_ACL_T cephwrap_sys_acl_get_fd(struct vfs_handle_struct *handle,
> > +                                        struct files_struct *fsp,
> > +                                        TALLOC_CTX *mem_ctx)
> > +{
> > +       errno = ENOTSUP;
> > +       return NULL;
> > +}
> > +
> > +static int cephwrap_sys_acl_set_file(struct vfs_handle_struct *handle,
> > +                                    const char *name,
> > +                                    SMB_ACL_TYPE_T acltype,
> > +                                    SMB_ACL_T theacl)
> > +{
> > +       errno = ENOTSUP;
> > +       return -1;
> > +}
> > +
> > +static int cephwrap_sys_acl_set_fd(struct vfs_handle_struct *handle,
> > +                                  struct files_struct *fsp,
> > +                                  SMB_ACL_T theacl)
> > +{
> > +       errno = ENOTSUP;
> > +       return -1;
> > +}
> > +
> > +static int cephwrap_sys_acl_delete_def_file(struct vfs_handle_struct
> > *handle,
> > +                                           const char *path)
> > +{
> > +       errno = ENOTSUP;
> > +       return -1;
> > +}
> > +
> >  static struct vfs_fn_pointers ceph_fns = {
> >         /* Disk operations */
> >
> > @@ -1277,6 +1318,13 @@ static struct vfs_fn_pointers ceph_fns = {
> >         .setxattr_fn = cephwrap_setxattr,
> >         .fsetxattr_fn = cephwrap_fsetxattr,
> >
> > +       /* Posix ACL Operations */
> > +       .sys_acl_get_file_fn = cephwrap_sys_acl_get_file,
> > +       .sys_acl_get_fd_fn = cephwrap_sys_acl_get_fd,
> > +       .sys_acl_set_file_fn = cephwrap_sys_acl_set_file,
> > +       .sys_acl_set_fd_fn = cephwrap_sys_acl_set_fd,
> > +       .sys_acl_delete_def_file_fn = cephwrap_sys_acl_delete_def_file,
> > +
> >         /* aio operations */
> >         .aio_force_fn = cephwrap_aio_force,
> >
> > --
> > 1.9.3
> >
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150402/053221a5/attachment.pgp>


More information about the samba-technical mailing list