case sensitive = yes and zfs casesensitivity = insensitive

Richard Sharpe realrichardsharpe at gmail.com
Mon Jun 22 13:12:07 MDT 2015


On Mon, Jun 22, 2015 at 10:51 AM, Jeremy Allison <jra at samba.org> wrote:

> On Fri, Jun 19, 2015 at 02:26:21PM -0700, Richard Sharpe wrote:
> > Hi,
> >
> > We were testing with this option in Samba master with ZFS and it was not
> > working, and it seems to revolve around the need for a change like this:
> >
> > --- a/source3/smbd/filename.c
> > +++ b/source3/smbd/filename.c
> > @@ -472,7 +472,9 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
> >                  * won't help.
> >                  */
> >
> > -               if ((conn->case_sensitive || !(conn->fs_capabilities &
> > +               if ((lp_case_sensitive(SNUM(conn))
> > +                                       || conn->case_sensitive
> > +                                       || !(conn->fs_capabilities &
> >                                         FILE_CASE_SENSITIVE_SEARCH)) &&
> >                                 !mangle_is_mangled(smb_fname->base_name,
> > conn->p
> >
> > Did someone break this functionality at some time?
>
> Maybe. That change shouldn't be needed. Inside set_current_service()
> we have:
>
>         switch (lp_case_sensitive(snum)) {
>                 case Auto:
>                         {
>                                 /* We need this uglyness due to DOS/Win9x
> clients that lie about case inse
>                                 enum remote_arch_types ra_type =
> get_remote_arch();
>                                 if ((ra_type != RA_SAMBA) && (ra_type !=
> RA_CIFSFS)) {
>                                         /* Client can't support per-packet
> case sensitive pathnames. */
>                                         conn->case_sensitive = False;
>                                 } else {
>                                         conn->case_sensitive = !(flags &
> FLAG_CASELESS_PATHNAMES);
>                                 }
>                         }
>                         break;
>                 case True:
>                         conn->case_sensitive = True;
>                         break;
>                 default:
>                         conn->case_sensitive = False;
>                         break;
>         }
>
> which means when "case sensitive = true" is set then
> conn->case_sensitive should always be set to true.
>
> Can you work with me to debug this ? I don't know
> exactly what you're seeing here.
>

I notice that there are two places where this should have been set, as it
is also done in make_connection_snum and there does not appear to be
anywhere where it is unset. We are rechecking whether or not this is needed.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list