case sensitive = yes and zfs casesensitivity = insensitive
Richard Sharpe
realrichardsharpe at gmail.com
Tue Jun 23 12:00:21 MDT 2015
On Tue, Jun 23, 2015 at 7:15 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
>
> On Mon, Jun 22, 2015 at 9:39 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
> >
> > On Mon, Jun 22, 2015 at 12:12 PM, Richard Sharpe <realrichardsharpe at gmail.com> wrote:
> >>
> >> 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.
> >
> > OK, we have figured it out. The problem was in the GetDFSReferral
> > pathway where we create a new connection object because the request
> > comes in on IPC$ and were not setting the case_sensitive flag ...
>
> The problem appears to be that create_conn_struct_as_root is not
> setting conn->case_sensitive. Something like this seems to be needed:
>
> /* Case options for the share. */
> if (lp_case_sensitive(snum) == Auto) {
> /* We will be setting this per packet. Set to be case
> * insensitive for now. */
> conn->case_sensitive = False;
> } else {
> conn->case_sensitive = (bool)lp_case_sensitive(snum);
> }
In addition, we found that we needed fields like:
conn->sconn->local_address, conn->sconn->remote_address, etc, when
doing certain things, but these are not available in the
GetDFSReferral path ...
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list