Lines Matching refs:bcc_ptr
83 char *bcc_ptr = *pbcc_area; in unicode_oslm_strings() local
87 bytes_ret = cifs_strtoUTF16((__le16 *)bcc_ptr, "Linux version ", 32, in unicode_oslm_strings()
89 bcc_ptr += 2 * bytes_ret; in unicode_oslm_strings()
90 bytes_ret = cifs_strtoUTF16((__le16 *) bcc_ptr, init_utsname()->release, in unicode_oslm_strings()
92 bcc_ptr += 2 * bytes_ret; in unicode_oslm_strings()
93 bcc_ptr += 2; /* trailing null */ in unicode_oslm_strings()
95 bytes_ret = cifs_strtoUTF16((__le16 *) bcc_ptr, CIFS_NETWORK_OPSYS, in unicode_oslm_strings()
97 bcc_ptr += 2 * bytes_ret; in unicode_oslm_strings()
98 bcc_ptr += 2; /* trailing null */ in unicode_oslm_strings()
100 *pbcc_area = bcc_ptr; in unicode_oslm_strings()
106 char *bcc_ptr = *pbcc_area; in unicode_domain_string() local
113 *bcc_ptr = 0; in unicode_domain_string()
114 *(bcc_ptr+1) = 0; in unicode_domain_string()
117 bytes_ret = cifs_strtoUTF16((__le16 *) bcc_ptr, ses->domainName, in unicode_domain_string()
119 bcc_ptr += 2 * bytes_ret; in unicode_domain_string()
120 bcc_ptr += 2; /* account for null terminator */ in unicode_domain_string()
122 *pbcc_area = bcc_ptr; in unicode_domain_string()
129 char *bcc_ptr = *pbcc_area; in unicode_ssetup_strings() local
143 *bcc_ptr = 0; in unicode_ssetup_strings()
144 *(bcc_ptr+1) = 0; in unicode_ssetup_strings()
146 bytes_ret = cifs_strtoUTF16((__le16 *) bcc_ptr, ses->user_name, in unicode_ssetup_strings()
149 bcc_ptr += 2 * bytes_ret; in unicode_ssetup_strings()
150 bcc_ptr += 2; /* account for null termination */ in unicode_ssetup_strings()
152 unicode_domain_string(&bcc_ptr, ses, nls_cp); in unicode_ssetup_strings()
153 unicode_oslm_strings(&bcc_ptr, nls_cp); in unicode_ssetup_strings()
155 *pbcc_area = bcc_ptr; in unicode_ssetup_strings()
161 char *bcc_ptr = *pbcc_area; in ascii_ssetup_strings() local
167 strncpy(bcc_ptr, ses->user_name, CIFS_MAX_USERNAME_LEN); in ascii_ssetup_strings()
168 bcc_ptr += strnlen(ses->user_name, CIFS_MAX_USERNAME_LEN); in ascii_ssetup_strings()
171 *bcc_ptr = 0; in ascii_ssetup_strings()
172 bcc_ptr++; /* account for null termination */ in ascii_ssetup_strings()
176 strncpy(bcc_ptr, ses->domainName, CIFS_MAX_DOMAINNAME_LEN); in ascii_ssetup_strings()
177 bcc_ptr += strnlen(ses->domainName, CIFS_MAX_DOMAINNAME_LEN); in ascii_ssetup_strings()
180 *bcc_ptr = 0; in ascii_ssetup_strings()
181 bcc_ptr++; in ascii_ssetup_strings()
185 strcpy(bcc_ptr, "Linux version "); in ascii_ssetup_strings()
186 bcc_ptr += strlen("Linux version "); in ascii_ssetup_strings()
187 strcpy(bcc_ptr, init_utsname()->release); in ascii_ssetup_strings()
188 bcc_ptr += strlen(init_utsname()->release) + 1; in ascii_ssetup_strings()
190 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); in ascii_ssetup_strings()
191 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; in ascii_ssetup_strings()
193 *pbcc_area = bcc_ptr; in ascii_ssetup_strings()
235 char *bcc_ptr = *pbcc_area; in decode_ascii_ssetup() local
239 len = strnlen(bcc_ptr, bleft); in decode_ascii_ssetup()
247 strncpy(ses->serverOS, bcc_ptr, len); in decode_ascii_ssetup()
252 bcc_ptr += len + 1; in decode_ascii_ssetup()
255 len = strnlen(bcc_ptr, bleft); in decode_ascii_ssetup()
263 strncpy(ses->serverNOS, bcc_ptr, len); in decode_ascii_ssetup()
265 bcc_ptr += len + 1; in decode_ascii_ssetup()
268 len = strnlen(bcc_ptr, bleft); in decode_ascii_ssetup()
280 int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, in decode_ntlmssp_challenge() argument
286 CHALLENGE_MESSAGE *pblob = (CHALLENGE_MESSAGE *)bcc_ptr; in decode_ntlmssp_challenge()
318 ses->auth_key.response = kmemdup(bcc_ptr + tioffset, tilen, in decode_ntlmssp_challenge()
690 char *bcc_ptr; in sess_auth_lanman() local
703 bcc_ptr = sess_data->iov[2].iov_base; in sess_auth_lanman()
723 memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE); in sess_auth_lanman()
724 bcc_ptr += CIFS_AUTH_RESP_SIZE; in sess_auth_lanman()
738 ascii_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_lanman()
740 sess_data->iov[2].iov_len = (long) bcc_ptr - in sess_auth_lanman()
764 bcc_ptr = pByteArea(smb_buf); in sess_auth_lanman()
771 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { in sess_auth_lanman()
772 ++bcc_ptr; in sess_auth_lanman()
775 decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_lanman()
778 decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_lanman()
797 char *bcc_ptr; in sess_auth_ntlm() local
809 bcc_ptr = sess_data->iov[2].iov_base; in sess_auth_ntlm()
828 memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE, in sess_auth_ntlm()
830 bcc_ptr += CIFS_AUTH_RESP_SIZE; in sess_auth_ntlm()
831 memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE, in sess_auth_ntlm()
833 bcc_ptr += CIFS_AUTH_RESP_SIZE; in sess_auth_ntlm()
842 *bcc_ptr = 0; in sess_auth_ntlm()
843 bcc_ptr++; in sess_auth_ntlm()
845 unicode_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_ntlm()
847 ascii_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_ntlm()
851 sess_data->iov[2].iov_len = (long) bcc_ptr - in sess_auth_ntlm()
874 bcc_ptr = pByteArea(smb_buf); in sess_auth_ntlm()
881 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { in sess_auth_ntlm()
882 ++bcc_ptr; in sess_auth_ntlm()
885 decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_ntlm()
888 decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_ntlm()
907 char *bcc_ptr; in sess_auth_ntlmv2() local
919 bcc_ptr = sess_data->iov[2].iov_base; in sess_auth_ntlmv2()
935 memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE, in sess_auth_ntlmv2()
937 bcc_ptr += ses->auth_key.len - CIFS_SESS_KEY_SIZE; in sess_auth_ntlmv2()
950 *bcc_ptr = 0; in sess_auth_ntlmv2()
951 bcc_ptr++; in sess_auth_ntlmv2()
953 unicode_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_ntlmv2()
955 ascii_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_ntlmv2()
959 sess_data->iov[2].iov_len = (long) bcc_ptr - in sess_auth_ntlmv2()
982 bcc_ptr = pByteArea(smb_buf); in sess_auth_ntlmv2()
989 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { in sess_auth_ntlmv2()
990 ++bcc_ptr; in sess_auth_ntlmv2()
993 decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_ntlmv2()
996 decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_ntlmv2()
1016 char *bcc_ptr; in sess_auth_kerberos() local
1031 bcc_ptr = sess_data->iov[2].iov_base; in sess_auth_kerberos()
1075 *bcc_ptr = 0; in sess_auth_kerberos()
1076 bcc_ptr++; in sess_auth_kerberos()
1078 unicode_oslm_strings(&bcc_ptr, sess_data->nls_cp); in sess_auth_kerberos()
1079 unicode_domain_string(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_kerberos()
1082 ascii_ssetup_strings(&bcc_ptr, ses, sess_data->nls_cp); in sess_auth_kerberos()
1085 sess_data->iov[2].iov_len = (long) bcc_ptr - in sess_auth_kerberos()
1108 bcc_ptr = pByteArea(smb_buf); in sess_auth_kerberos()
1117 bcc_ptr += blob_len; in sess_auth_kerberos()
1125 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { in sess_auth_kerberos()
1126 ++bcc_ptr; in sess_auth_kerberos()
1129 decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_kerberos()
1132 decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_kerberos()
1161 char *bcc_ptr; in _sess_auth_rawntlmssp_assemble_req() local
1176 bcc_ptr = sess_data->iov[2].iov_base; in _sess_auth_rawntlmssp_assemble_req()
1179 *bcc_ptr = 0; in _sess_auth_rawntlmssp_assemble_req()
1180 bcc_ptr++; in _sess_auth_rawntlmssp_assemble_req()
1182 unicode_oslm_strings(&bcc_ptr, sess_data->nls_cp); in _sess_auth_rawntlmssp_assemble_req()
1184 sess_data->iov[2].iov_len = (long) bcc_ptr - in _sess_auth_rawntlmssp_assemble_req()
1201 char *bcc_ptr; in sess_auth_rawntlmssp_negotiate() local
1260 bcc_ptr = pByteArea(smb_buf); in sess_auth_rawntlmssp_negotiate()
1270 rc = decode_ntlmssp_challenge(bcc_ptr, blob_len, ses); in sess_auth_rawntlmssp_negotiate()
1297 char *bcc_ptr; in sess_auth_rawntlmssp_authenticate() local
1350 bcc_ptr = pByteArea(smb_buf); in sess_auth_rawntlmssp_authenticate()
1358 bcc_ptr += blob_len; in sess_auth_rawntlmssp_authenticate()
1367 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { in sess_auth_rawntlmssp_authenticate()
1368 ++bcc_ptr; in sess_auth_rawntlmssp_authenticate()
1371 decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_rawntlmssp_authenticate()
1374 decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, in sess_auth_rawntlmssp_authenticate()