Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
8cdfe6c0
Commit
8cdfe6c0
authored
Jul 02, 2016
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.10 sources from stable (v3.10.102)
parent
9dc48a94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
16 deletions
+39
-16
cifsencrypt.c
sources/3.10/cifsencrypt.c
+1
-1
cifssmb.c
sources/3.10/cifssmb.c
+18
-3
sess.c
sources/3.10/sess.c
+20
-12
No files found.
sources/3.10/cifsencrypt.c
View file @
8cdfe6c0
...
...
@@ -591,7 +591,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
ses
->
auth_key
.
response
=
kmalloc
(
baselen
+
tilen
,
GFP_KERNEL
);
if
(
!
ses
->
auth_key
.
response
)
{
rc
=
ENOMEM
;
rc
=
-
ENOMEM
;
ses
->
auth_key
.
len
=
0
;
goto
setup_ntlmv2_rsp_ret
;
}
...
...
sources/3.10/cifssmb.c
View file @
8cdfe6c0
...
...
@@ -1396,11 +1396,10 @@ openRetry:
* current bigbuf.
*/
static
int
cifs_readv_discard
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
discard_remaining_data
(
struct
TCP_Server_Info
*
server
)
{
unsigned
int
rfclen
=
get_rfc1002_length
(
server
->
smallbuf
);
int
remaining
=
rfclen
+
4
-
server
->
total_read
;
struct
cifs_readdata
*
rdata
=
mid
->
callback_data
;
while
(
remaining
>
0
)
{
int
length
;
...
...
@@ -1414,10 +1413,20 @@ cifs_readv_discard(struct TCP_Server_Info *server, struct mid_q_entry *mid)
remaining
-=
length
;
}
dequeue_mid
(
mid
,
rdata
->
result
);
return
0
;
}
static
int
cifs_readv_discard
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
{
int
length
;
struct
cifs_readdata
*
rdata
=
mid
->
callback_data
;
length
=
discard_remaining_data
(
server
);
dequeue_mid
(
mid
,
rdata
->
result
);
return
length
;
}
int
cifs_readv_receive
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
{
...
...
@@ -1446,6 +1455,12 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
return
length
;
server
->
total_read
+=
length
;
if
(
server
->
ops
->
is_status_pending
&&
server
->
ops
->
is_status_pending
(
buf
,
server
,
0
))
{
discard_remaining_data
(
server
);
return
-
1
;
}
/* Was the SMB read successful? */
rdata
->
result
=
server
->
ops
->
map_error
(
buf
,
false
);
if
(
rdata
->
result
!=
0
)
{
...
...
sources/3.10/sess.c
View file @
8cdfe6c0
...
...
@@ -487,19 +487,27 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
sec_blob
->
LmChallengeResponse
.
MaximumLength
=
0
;
sec_blob
->
NtChallengeResponse
.
BufferOffset
=
cpu_to_le32
(
tmp
-
pbuffer
);
rc
=
setup_ntlmv2_rsp
(
ses
,
nls_cp
);
if
(
rc
)
{
cifs_dbg
(
VFS
,
"Error %d during NTLMSSP authentication
\n
"
,
rc
);
goto
setup_ntlmv2_ret
;
}
memcpy
(
tmp
,
ses
->
auth_key
.
response
+
CIFS_SESS_KEY_SIZE
,
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
tmp
+=
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
;
if
(
ses
->
user_name
!=
NULL
)
{
rc
=
setup_ntlmv2_rsp
(
ses
,
nls_cp
);
if
(
rc
)
{
cifs_dbg
(
VFS
,
"Error %d during NTLMSSP authentication
\n
"
,
rc
);
goto
setup_ntlmv2_ret
;
}
memcpy
(
tmp
,
ses
->
auth_key
.
response
+
CIFS_SESS_KEY_SIZE
,
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
tmp
+=
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
;
sec_blob
->
NtChallengeResponse
.
Length
=
cpu_to_le16
(
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
sec_blob
->
NtChallengeResponse
.
MaximumLength
=
cpu_to_le16
(
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
sec_blob
->
NtChallengeResponse
.
Length
=
cpu_to_le16
(
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
sec_blob
->
NtChallengeResponse
.
MaximumLength
=
cpu_to_le16
(
ses
->
auth_key
.
len
-
CIFS_SESS_KEY_SIZE
);
}
else
{
/*
* don't send an NT Response for anonymous access
*/
sec_blob
->
NtChallengeResponse
.
Length
=
0
;
sec_blob
->
NtChallengeResponse
.
MaximumLength
=
0
;
}
if
(
ses
->
domainName
==
NULL
)
{
sec_blob
->
DomainName
.
BufferOffset
=
cpu_to_le32
(
tmp
-
pbuffer
);
...
...
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