Project

General

Profile

Bug #1931

smb_convert_wildcards incorrectly expands < at the end of the pattern

Added by Yuri Pankov almost 9 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cifs - CIFS server and client
Start date:
2011-12-27
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
cifs wildcards
Gerrit CR:

Description

smb_convert_wildcards incorrectly converts '<' at the end of the pattern to '*', making the results from dir *. on illumos CIFS share differ from the ones returned by other CIFS implementations (or just simple dir *. on local Windows filesystem, this should return filenames without extension).
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/smbsrv/smb_kutil.c#149 is just simply wrong - patterns are starting with '\' and we don't give special meaning to '<' (converting it to '*') if it's not at the end of the pattern.

#1

Updated by Yuri Pankov almost 9 years ago

  • Assignee deleted (Yuri Pankov)
#2

Updated by Gordon Ross about 8 years ago

Our fix for #1930 also fixes this issue.

#3

Updated by Gordon Ross about 8 years ago

  • Subject changed from smb_convert_wildcards incorrectly expands '<' at the end of the pattern to smb_convert_wildcards incorrectly expands < at the end of the pattern
  • Assignee set to Gordon Ross
#4

Updated by Gordon Ross about 8 years ago

  • Status changed from New to Resolved
changeset:   13839:2d7fbebd2923
tag:         tip
user:        Gordon Ross <gwr@nexenta.com>
date:        Thu Sep 27 13:58:00 2012 -0400

description:
    1930 smb_match functions incorrectly handle multibyte characters
    1931 smb_convert_wildcards incorrectly expands < at the end of the pattern
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

modified:
   usr/src/common/smbsrv/smb_match.c
   usr/src/common/smbsrv/smb_xdr.c
   usr/src/lib/smbsrv/libsmb/common/mapfile-vers
   usr/src/uts/common/fs/smbsrv/smb_delete.c
   usr/src/uts/common/fs/smbsrv/smb_kutil.c
   usr/src/uts/common/fs/smbsrv/smb_odir.c
   usr/src/uts/common/fs/smbsrv/smb_pathname.c
   usr/src/uts/common/smbsrv/string.h

Also available in: Atom PDF