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
1c85a8c0
Commit
1c85a8c0
authored
Nov 09, 2013
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.4 sources from stable (v3.4.68)
parent
67cb4618
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
14 deletions
+23
-14
cifs_unicode.h
sources/3.4/cifs_unicode.h
+4
-4
cifsencrypt.c
sources/3.4/cifsencrypt.c
+4
-4
cifsglob.h
sources/3.4/cifsglob.h
+1
-0
connect.c
sources/3.4/connect.c
+6
-3
inode.c
sources/3.4/inode.c
+5
-0
sess.c
sources/3.4/sess.c
+3
-3
No files found.
sources/3.4/cifs_unicode.h
View file @
1c85a8c0
...
...
@@ -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.4/cifsencrypt.c
View file @
1c85a8c0
...
...
@@ -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
=
ses
->
user_name
?
strlen
(
ses
->
user_name
)
:
0
;
user
=
kmalloc
(
2
+
(
len
*
2
),
GFP_KERNEL
);
if
(
user
==
NULL
)
{
...
...
@@ -429,7 +429,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
}
if
(
len
)
{
len
=
cifs_strtoUTF16
(
(
__le16
*
)
user
,
ses
->
user_name
,
len
,
nls_cp
);
len
=
cifs_strtoUTF16
(
user
,
ses
->
user_name
,
len
,
nls_cp
);
UniStrupr
(
user
);
}
else
{
memset
(
user
,
'\0'
,
2
);
...
...
sources/3.4/cifsglob.h
View file @
1c85a8c0
...
...
@@ -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.4/connect.c
View file @
1c85a8c0
...
...
@@ -363,6 +363,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
try_to_freeze
();
/* we should try only the port we connected to before */
mutex_lock
(
&
server
->
srv_mutex
);
rc
=
generic_ip_connect
(
server
);
if
(
rc
)
{
cFYI
(
1
,
"reconnect error %d"
,
rc
);
...
...
@@ -374,6 +375,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
server
->
tcpStatus
=
CifsNeedNegotiate
;
spin_unlock
(
&
GlobalMid_Lock
);
}
mutex_unlock
(
&
server
->
srv_mutex
);
}
while
(
server
->
tcpStatus
==
CifsNeedReconnect
);
return
rc
;
...
...
@@ -1704,7 +1706,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
if
(
string
==
NULL
)
goto
out_nomem
;
if
(
strnlen
(
string
,
256
)
==
256
)
{
if
(
strnlen
(
string
,
CIFS_MAX_DOMAINNAME_LEN
)
==
CIFS_MAX_DOMAINNAME_LEN
)
{
printk
(
KERN_WARNING
"CIFS: domain name too"
" long
\n
"
);
goto
cifs_parse_mount_err
;
...
...
@@ -2362,8 +2365,8 @@ cifs_put_smb_ses(struct cifs_ses *ses)
#ifdef CONFIG_KEYS
/* strlen("cifs:a:") +
INET6_ADDRSTR
LEN + 1 */
#define CIFSCREDS_DESC_SIZE (7 +
INET6_ADDRSTR
LEN + 1)
/* strlen("cifs:a:") +
CIFS_MAX_DOMAINNAME_
LEN + 1 */
#define CIFSCREDS_DESC_SIZE (7 +
CIFS_MAX_DOMAINNAME_
LEN + 1)
/* Populate username and pw fields from keyring if possible */
static
int
...
...
sources/3.4/inode.c
View file @
1c85a8c0
...
...
@@ -549,6 +549,11 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
fattr
->
cf_mode
&=
~
(
S_IWUGO
);
fattr
->
cf_nlink
=
le32_to_cpu
(
info
->
NumberOfLinks
);
if
(
fattr
->
cf_nlink
<
1
)
{
cFYI
(
1
,
"replacing bogus file nlink value %u
\n
"
,
fattr
->
cf_nlink
);
fattr
->
cf_nlink
=
1
;
}
}
fattr
->
cf_uid
=
cifs_sb
->
mnt_uid
;
...
...
sources/3.4/sess.c
View file @
1c85a8c0
...
...
@@ -198,7 +198,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
bytes_ret
=
0
;
}
else
bytes_ret
=
cifs_strtoUTF16
((
__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