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
67cb4618
Commit
67cb4618
authored
Nov 09, 2013
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.2 sources from stable (v3.2.52)
parent
a9129faf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
cifs_unicode.h
sources/3.2/cifs_unicode.h
+4
-4
cifsencrypt.c
sources/3.2/cifsencrypt.c
+4
-4
cifsglob.h
sources/3.2/cifsglob.h
+1
-0
readdir.c
sources/3.2/readdir.c
+8
-0
sess.c
sources/3.2/sess.c
+3
-3
No files found.
sources/3.2/cifs_unicode.h
View file @
67cb4618
...
...
@@ -323,14 +323,14 @@ UniToupper(register wchar_t uc)
/*
* UniStrupr: Upper case a unicode string
*/
static
inline
wchar_t
*
UniStrupr
(
register
wchar_t
*
upin
)
static
inline
__le16
*
UniStrupr
(
register
__le16
*
upin
)
{
register
wchar_t
*
up
;
register
__le16
*
up
;
up
=
upin
;
while
(
*
up
)
{
/* For all characters */
*
up
=
UniToupper
(
*
up
);
*
up
=
cpu_to_le16
(
UniToupper
(
le16_to_cpu
(
*
up
))
);
up
++
;
}
return
upin
;
/* Return input pointer */
...
...
sources/3.2/cifsencrypt.c
View file @
67cb4618
...
...
@@ -369,7 +369,7 @@ find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)
if
(
blobptr
+
attrsize
>
blobend
)
break
;
if
(
type
==
NTLMSSP_AV_NB_DOMAIN_NAME
)
{
if
(
!
attrsize
)
if
(
!
attrsize
||
attrsize
>=
CIFS_MAX_DOMAINNAME_LEN
)
break
;
if
(
!
ses
->
domainName
)
{
ses
->
domainName
=
...
...
@@ -394,7 +394,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
int
rc
=
0
;
int
len
;
char
nt_hash
[
CIFS_NTHASH_SIZE
];
wchar_t
*
user
;
__le16
*
user
;
wchar_t
*
domain
;
wchar_t
*
server
;
...
...
@@ -419,7 +419,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
return
rc
;
}
/* convert ses->user_name to unicode
and uppercase
*/
/* convert ses->user_name to unicode */
len
=
strlen
(
ses
->
user_name
);
user
=
kmalloc
(
2
+
(
len
*
2
),
GFP_KERNEL
);
if
(
user
==
NULL
)
{
...
...
@@ -427,7 +427,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
rc
=
-
ENOMEM
;
return
rc
;
}
len
=
cifs_strtoUCS
(
(
__le16
*
)
user
,
ses
->
user_name
,
len
,
nls_cp
);
len
=
cifs_strtoUCS
(
user
,
ses
->
user_name
,
len
,
nls_cp
);
UniStrupr
(
user
);
rc
=
crypto_shash_update
(
&
ses
->
server
->
secmech
.
sdeschmacmd5
->
shash
,
...
...
sources/3.2/cifsglob.h
View file @
67cb4618
...
...
@@ -38,6 +38,7 @@
#define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1)
#define MAX_SERVER_SIZE 15
#define MAX_SHARE_SIZE 80
#define CIFS_MAX_DOMAINNAME_LEN 256
/* max domain name length */
#define MAX_USERNAME_SIZE 256
/* reasonable maximum for current servers */
#define MAX_PASSWORD_SIZE 512
/* max for windows seems to be 256 wide chars */
...
...
sources/3.2/readdir.c
View file @
67cb4618
...
...
@@ -96,6 +96,14 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
dput
(
dentry
);
}
/*
* If we know that the inode will need to be revalidated immediately,
* then don't create a new dentry for it. We'll end up doing an on
* the wire call either way and this spares us an invalidation.
*/
if
(
fattr
->
cf_flags
&
CIFS_FATTR_NEED_REVAL
)
return
NULL
;
dentry
=
d_alloc
(
parent
,
name
);
if
(
dentry
==
NULL
)
return
NULL
;
...
...
sources/3.2/sess.c
View file @
67cb4618
...
...
@@ -198,7 +198,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
bytes_ret
=
0
;
}
else
bytes_ret
=
cifs_strtoUCS
((
__le16
*
)
bcc_ptr
,
ses
->
domainName
,
256
,
nls_cp
);
CIFS_MAX_DOMAINNAME_LEN
,
nls_cp
);
bcc_ptr
+=
2
*
bytes_ret
;
bcc_ptr
+=
2
;
/* account for null terminator */
...
...
@@ -256,8 +256,8 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
/* copy domain */
if
(
ses
->
domainName
!=
NULL
)
{
strncpy
(
bcc_ptr
,
ses
->
domainName
,
256
);
bcc_ptr
+=
strnlen
(
ses
->
domainName
,
256
);
strncpy
(
bcc_ptr
,
ses
->
domainName
,
CIFS_MAX_DOMAINNAME_LEN
);
bcc_ptr
+=
strnlen
(
ses
->
domainName
,
CIFS_MAX_DOMAINNAME_LEN
);
}
/* else we will send a null domain name
so the server will default to its own domain */
*
bcc_ptr
=
0
;
...
...
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