Print this page
NEX-19025 CIFS gets confused with filenames containing enhanced Unicode
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
and: (fix build, check-rtime)
NEX-4458 Incorrect directory listing response for non-UNICODE clients
Reviewed by: Matt Barden <Matt.Barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
NEX-2460 libfksmbd should not link with libsmb
SMB-65 SMB server in non-global zones (data structure changes)
Many things move to the smb_server_t object, and
many functions gain an sv arg (which server).


   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * Support for oem <-> unicode translations.
  30  */
  31 
  32 #if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
  33 #include <stdlib.h>
  34 #include <thread.h>
  35 #include <synch.h>
  36 #include <string.h>
  37 #else

  38 #include <sys/ksynch.h>

  39 #endif /* _KERNEL */
  40 
  41 #include <sys/byteorder.h>
  42 #include <smbsrv/alloc.h>
  43 #include <smbsrv/string.h>
  44 
  45 /*
  46  * cpid         The oemcpg_table index for this oempage.
  47  * value        The conversion values.
  48  */
  49 typedef struct oempage {
  50         uint32_t        cpid;
  51         smb_wchar_t     *value;
  52 } oempage_t;
  53 
  54 /*
  55  * filename     The actual filename contains the codepage.
  56  * bytesperchar The codepage uses double or single bytes per char.
  57  * oempage      The oempage is used to convert Unicode characters to
  58  *              OEM characters.  Memory needs to be allocated for




   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * Support for oem <-> unicode translations.
  30  */
  31 
  32 #if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
  33 #include <stdlib.h>
  34 #include <thread.h>
  35 #include <synch.h>
  36 #include <string.h>
  37 #else
  38 #include <sys/types.h>
  39 #include <sys/ksynch.h>
  40 #include <sys/sunddi.h>
  41 #endif /* _KERNEL */
  42 
  43 #include <sys/byteorder.h>
  44 #include <smbsrv/alloc.h>
  45 #include <smbsrv/string.h>
  46 
  47 /*
  48  * cpid         The oemcpg_table index for this oempage.
  49  * value        The conversion values.
  50  */
  51 typedef struct oempage {
  52         uint32_t        cpid;
  53         smb_wchar_t     *value;
  54 } oempage_t;
  55 
  56 /*
  57  * filename     The actual filename contains the codepage.
  58  * bytesperchar The codepage uses double or single bytes per char.
  59  * oempage      The oempage is used to convert Unicode characters to
  60  *              OEM characters.  Memory needs to be allocated for