Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
0223cf0b
Commit
0223cf0b
authored
Jun 27, 2006
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] Fix alignment of unicode strings in previous patch
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
750d1151
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
fs/cifs/sess.c
fs/cifs/sess.c
+15
-7
No files found.
fs/cifs/sess.c
View file @
0223cf0b
...
...
@@ -83,11 +83,11 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
/* BB FIXME add check that strings total less
than 335 or will need to send them as arrays */
/*
align unicode strings, must be word aligned
*/
if
((
long
)
bcc_ptr
%
2
)
{
/*
unicode strings, must be word aligned before the call
*/
/*
if ((long) bcc_ptr % 2) {
*bcc_ptr = 0;
bcc_ptr++;
}
}
*/
/* copy user */
if
(
ses
->
userName
==
NULL
)
{
/* BB what about null user mounts - check that we do this BB */
...
...
@@ -416,9 +416,14 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
bcc_ptr
+=
CIFS_SESS_KEY_SIZE
;
memcpy
(
bcc_ptr
,
(
char
*
)
ntlm_session_key
,
CIFS_SESS_KEY_SIZE
);
bcc_ptr
+=
CIFS_SESS_KEY_SIZE
;
if
(
ses
->
capabilities
&
CAP_UNICODE
)
if
(
ses
->
capabilities
&
CAP_UNICODE
)
{
/* unicode strings must be word aligned */
if
(
iov
[
0
].
iov_len
%
2
)
{
*
bcc_ptr
=
0
;
bcc_ptr
++
;
}
unicode_ssetup_strings
(
&
bcc_ptr
,
ses
,
nls_cp
);
else
}
else
ascii_ssetup_strings
(
&
bcc_ptr
,
ses
,
nls_cp
);
}
else
if
(
type
==
NTLMv2
)
{
char
*
v2_sess_key
=
...
...
@@ -455,9 +460,12 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
memcpy
(
bcc_ptr
,
(
char
*
)
v2_sess_key
,
sizeof
(
struct
ntlmv2_resp
));
bcc_ptr
+=
sizeof
(
struct
ntlmv2_resp
);
kfree
(
v2_sess_key
);
if
(
ses
->
capabilities
&
CAP_UNICODE
)
if
(
ses
->
capabilities
&
CAP_UNICODE
)
{
if
(
iov
[
0
].
iov_len
%
2
)
{
*
bcc_ptr
=
0
;
}
bcc_ptr
++
;
unicode_ssetup_strings
(
&
bcc_ptr
,
ses
,
nls_cp
);
else
}
else
ascii_ssetup_strings
(
&
bcc_ptr
,
ses
,
nls_cp
);
}
else
/* NTLMSSP or SPNEGO */
{
pSMB
->
req
.
hdr
.
Flags2
|=
SMBFLG2_EXT_SEC
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment