smb_native.c (a0aa776e20803c84edd153d9cb584fd67163aef3) smb_native.c (bbf6f00c25b6a2bed23c35eac6d62998ecdb338c)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
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

--- 91 unchanged lines hidden (view full) ---

100 */
101 if (*native_os == '\0')
102 return (NATIVE_OS_WIN2000);
103
104 for (i = 0; i < sizeof (os_table)/sizeof (os_table[0]); ++i) {
105 name = os_table[i].sn_name;
106 len = strlen(name);
107
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
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

--- 91 unchanged lines hidden (view full) ---

100 */
101 if (*native_os == '\0')
102 return (NATIVE_OS_WIN2000);
103
104 for (i = 0; i < sizeof (os_table)/sizeof (os_table[0]); ++i) {
105 name = os_table[i].sn_name;
106 len = strlen(name);
107
108 if (utf8_strncasecmp(name, native_os, len) == 0)
108 if (smb_strcasecmp(name, native_os, len) == 0)
109 return (os_table[i].sn_value);
110 }
111
112 return (NATIVE_OS_UNKNOWN);
113}
114
115/*
116 * smbnative_lm_value

--- 37 unchanged lines hidden (view full) ---

154 */
155 if (native_lm == NULL || *native_lm == '\0')
156 return (NATIVE_LM_WIN2000);
157
158 for (i = 0; i < sizeof (lm_table)/sizeof (lm_table[0]); ++i) {
159 name = lm_table[i].sn_name;
160 len = strlen(name);
161
109 return (os_table[i].sn_value);
110 }
111
112 return (NATIVE_OS_UNKNOWN);
113}
114
115/*
116 * smbnative_lm_value

--- 37 unchanged lines hidden (view full) ---

154 */
155 if (native_lm == NULL || *native_lm == '\0')
156 return (NATIVE_LM_WIN2000);
157
158 for (i = 0; i < sizeof (lm_table)/sizeof (lm_table[0]); ++i) {
159 name = lm_table[i].sn_name;
160 len = strlen(name);
161
162 if ((utf8_strncasecmp(name, native_lm, len) == 0) ||
163 (utf8_strncasecmp(&name[1], native_lm, len - 1) == 0)) {
162 if ((smb_strcasecmp(name, native_lm, len) == 0) ||
163 (smb_strcasecmp(&name[1], native_lm, len - 1) == 0)) {
164 return (lm_table[i].sn_value);
165 }
166 }
167
168 return (NATIVE_LM_WIN2000);
169}
170
171/*

--- 32 unchanged lines hidden (view full) ---

204
205 if (native_lm == NULL || *native_lm == '\0')
206 return (PDC_WIN2000);
207
208 for (i = 0; i < sizeof (pdc_table)/sizeof (pdc_table[0]); ++i) {
209 name = pdc_table[i].sn_name;
210 len = strlen(name);
211
164 return (lm_table[i].sn_value);
165 }
166 }
167
168 return (NATIVE_LM_WIN2000);
169}
170
171/*

--- 32 unchanged lines hidden (view full) ---

204
205 if (native_lm == NULL || *native_lm == '\0')
206 return (PDC_WIN2000);
207
208 for (i = 0; i < sizeof (pdc_table)/sizeof (pdc_table[0]); ++i) {
209 name = pdc_table[i].sn_name;
210 len = strlen(name);
211
212 if ((utf8_strncasecmp(name, native_lm, len) == 0) ||
213 (utf8_strncasecmp(&name[1], native_lm, len - 1) == 0)) {
212 if ((smb_strcasecmp(name, native_lm, len) == 0) ||
213 (smb_strcasecmp(&name[1], native_lm, len - 1) == 0)) {
214 return (pdc_table[i].sn_value);
215 }
216 }
217
218 return (PDC_WIN2000);
219}
214 return (pdc_table[i].sn_value);
215 }
216 }
217
218 return (PDC_WIN2000);
219}