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-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).

@@ -172,12 +172,12 @@
 /*
  * Convert individual characters to their uppercase equivalent value.
  * If the specified character is lowercase, the uppercase value will
  * be returned. Otherwise the original value will be returned.
  */
-int
-smb_toupper(int c)
+uint32_t
+smb_toupper(uint32_t c)
 {
         uint16_t mask = is_unicode ? 0xffff : 0xff;
 
         return (current_codepage[c & mask].upper);
 }

@@ -185,12 +185,12 @@
 /*
  * Convert individual characters to their lowercase equivalent value.
  * If the specified character is uppercase, the lowercase value will
  * be returned. Otherwise the original value will be returned.
  */
-int
-smb_tolower(int c)
+uint32_t
+smb_tolower(uint32_t c)
 {
         uint16_t mask = is_unicode ? 0xffff : 0xff;
 
         return (current_codepage[c & mask].lower);
 }

@@ -202,11 +202,11 @@
  * always result encode to the same length.
  */
 char *
 smb_strupr(char *s)
 {
-        smb_wchar_t c;
+        uint32_t c;
         char *p = s;
 
         while (*p) {
                 if (smb_isascii(*p)) {
                         *p = smb_toupper(*p);

@@ -233,11 +233,11 @@
  * always result encode to the same length.
  */
 char *
 smb_strlwr(char *s)
 {
-        smb_wchar_t c;
+        uint32_t c;
         char *p = s;
 
         while (*p) {
                 if (smb_isascii(*p)) {
                         *p = smb_tolower(*p);

@@ -262,11 +262,11 @@
  * -1 is returned if "s" is not a valid multi-byte string.
  */
 int
 smb_isstrlwr(const char *s)
 {
-        smb_wchar_t c;
+        uint32_t c;
         int n;
         const char *p = s;
 
         while (*p) {
                 if (smb_isascii(*p) && smb_isupper(*p))

@@ -293,11 +293,11 @@
  * -1 is returned if "s" is not a valid multi-byte string.
  */
 int
 smb_isstrupr(const char *s)
 {
-        smb_wchar_t c;
+        uint32_t c;
         int n;
         const char *p = s;
 
         while (*p) {
                 if (smb_isascii(*p) && smb_islower(*p))