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
4f75e546
You need to sign in or sign up before continuing.
Commit
4f75e546
authored
Feb 08, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 3.2 up to v3.2.98
parent
dcdfaeb3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
17 deletions
+28
-17
cifssmb.c
sources/3.2/cifssmb.c
+15
-12
dir.c
sources/3.2/dir.c
+8
-0
inode.c
sources/3.2/inode.c
+2
-2
netmisc.c
sources/3.2/netmisc.c
+3
-3
sess.c
sources/3.2/sess.c
+0
-0
No files found.
sources/3.2/cifssmb.c
View file @
4f75e546
...
...
@@ -764,6 +764,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
if
(
rc
)
return
rc
;
if
(
server
->
capabilities
&
CAP_UNICODE
)
smb
->
hdr
.
Flags2
|=
SMBFLG2_UNICODE
;
/* set up echo request */
smb
->
hdr
.
Tid
=
0xffff
;
smb
->
hdr
.
WordCount
=
1
;
...
...
@@ -3913,13 +3916,12 @@ CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
int
rc
=
0
;
int
bytes_returned
=
0
;
SET_SEC_DESC_REQ
*
pSMB
=
NULL
;
NTRANSACT_RSP
*
pSMBr
=
NULL
;
void
*
pSMBr
;
setCifsAclRetry:
rc
=
smb_init
(
SMB_COM_NT_TRANSACT
,
19
,
tcon
,
(
void
**
)
&
pSMB
,
(
void
**
)
&
pSMBr
);
rc
=
smb_init
(
SMB_COM_NT_TRANSACT
,
19
,
tcon
,
(
void
**
)
&
pSMB
,
&
pSMBr
);
if
(
rc
)
return
(
rc
)
;
return
rc
;
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
...
...
@@ -3947,9 +3949,8 @@ setCifsAclRetry:
pSMB
->
AclFlags
=
cpu_to_le32
(
aclflag
);
if
(
pntsd
&&
acllen
)
{
memcpy
((
char
*
)
&
pSMBr
->
hdr
.
Protocol
+
data_offset
,
(
char
*
)
pntsd
,
acllen
);
memcpy
((
char
*
)
pSMBr
+
offsetof
(
struct
smb_hdr
,
Protocol
)
+
data_offset
,
pntsd
,
acllen
);
inc_rfc1001_len
(
pSMB
,
byte_count
+
data_count
);
}
else
inc_rfc1001_len
(
pSMB
,
byte_count
);
...
...
@@ -5728,7 +5729,8 @@ CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset
=
offsetof
(
struct
smb_com_transaction2_sfi_req
,
Fid
)
-
4
;
offset
=
param_offset
+
params
;
data_offset
=
(
char
*
)
(
&
pSMB
->
hdr
.
Protocol
)
+
offset
;
data_offset
=
(
char
*
)
pSMB
+
offsetof
(
struct
smb_hdr
,
Protocol
)
+
offset
;
count
=
sizeof
(
FILE_BASIC_INFO
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
...
...
@@ -5997,7 +5999,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
u16
fid
,
u32
pid_of_opener
)
{
struct
smb_com_transaction2_sfi_req
*
pSMB
=
NULL
;
FILE_UNIX_BASIC_INFO
*
data_offset
;
char
*
data_offset
;
int
rc
=
0
;
u16
params
,
param_offset
,
offset
,
byte_count
,
count
;
...
...
@@ -6019,8 +6021,9 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset
=
offsetof
(
struct
smb_com_transaction2_sfi_req
,
Fid
)
-
4
;
offset
=
param_offset
+
params
;
data_offset
=
(
FILE_UNIX_BASIC_INFO
*
)
((
char
*
)(
&
pSMB
->
hdr
.
Protocol
)
+
offset
);
data_offset
=
(
char
*
)
pSMB
+
offsetof
(
struct
smb_hdr
,
Protocol
)
+
offset
;
count
=
sizeof
(
FILE_UNIX_BASIC_INFO
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
...
...
@@ -6042,7 +6045,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
inc_rfc1001_len
(
pSMB
,
byte_count
);
pSMB
->
ByteCount
=
cpu_to_le16
(
byte_count
);
cifs_fill_unix_set_info
(
data_offset
,
args
);
cifs_fill_unix_set_info
(
(
FILE_UNIX_BASIC_INFO
*
)
data_offset
,
args
);
rc
=
SendReceiveNoRsp
(
xid
,
tcon
->
ses
,
(
struct
smb_hdr
*
)
pSMB
,
0
);
if
(
rc
)
...
...
sources/3.2/dir.c
View file @
4f75e546
...
...
@@ -523,6 +523,14 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
oplock
=
pTcon
->
ses
->
server
->
oplocks
?
REQ_OPLOCK
:
0
;
/* Don't allow path components longer than the server max. */
if
(
unlikely
(
pTcon
->
fsAttrInfo
.
MaxPathNameComponentLength
&&
direntry
->
d_name
.
len
>
le32_to_cpu
(
pTcon
->
fsAttrInfo
.
MaxPathNameComponentLength
)))
{
rc
=
-
ENAMETOOLONG
;
goto
lookup_out
;
}
/*
* Don't allow the separator character in a path component.
* The VFS will not allow "/", but "\" is allowed by posix.
...
...
sources/3.2/inode.c
View file @
4f75e546
...
...
@@ -1948,7 +1948,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NO_PERM
)
attrs
->
ia_valid
|=
ATTR_FORCE
;
rc
=
inode_change_ok
(
inode
,
attrs
);
rc
=
setattr_prepare
(
direntry
,
attrs
);
if
(
rc
<
0
)
goto
out
;
...
...
@@ -2089,7 +2089,7 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NO_PERM
)
attrs
->
ia_valid
|=
ATTR_FORCE
;
rc
=
inode_change_ok
(
inode
,
attrs
);
rc
=
setattr_prepare
(
direntry
,
attrs
);
if
(
rc
<
0
)
{
FreeXid
(
xid
);
return
rc
;
...
...
sources/3.2/netmisc.c
View file @
4f75e546
...
...
@@ -974,10 +974,10 @@ struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset)
cERROR
(
1
,
"illegal hours %d"
,
st
->
Hours
);
days
=
sd
->
Day
;
month
=
sd
->
Month
;
if
(
(
days
>
31
)
||
(
month
>
12
)
)
{
if
(
days
<
1
||
days
>
31
||
month
<
1
||
month
>
12
)
{
cERROR
(
1
,
"illegal date, month %d day: %d"
,
month
,
days
);
if
(
month
>
12
)
month
=
12
;
days
=
clamp
(
days
,
1
,
31
);
month
=
clamp
(
month
,
1
,
12
)
;
}
month
-=
1
;
days
+=
total_days_of_prev_months
[
month
];
...
...
sources/3.2/sess.c
View file @
4f75e546
This diff is collapsed.
Click to expand it.
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