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
Kirill Smelkov
linux
Commits
575b793d
Commit
575b793d
authored
Dec 14, 2004
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux.bkbits.net/linux-2.5
into bkbits.net:/repos/c/cifs/linux-2.5cifs
parents
6805ca03
071d001e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
fs/cifs/CHANGES
fs/cifs/CHANGES
+4
-1
fs/cifs/README
fs/cifs/README
+7
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+6
-0
fs/cifs/connect.c
fs/cifs/connect.c
+13
-6
fs/cifs/file.c
fs/cifs/file.c
+4
-3
No files found.
fs/cifs/CHANGES
View file @
575b793d
...
...
@@ -2,7 +2,10 @@ Version 1.28
------------
Add module init parm for large SMB buffer size (to allow it to be changed
from its default of 16K) which is especially useful for large file copy
when mounting with the directio mount option.
when mounting with the directio mount option. Fix oops after
returning from mount when experimental ExtendedSecurity enabled and
SpnegoNegotiated returning invalid error. Fix case to retry better when
peek returns from 1 to 3 bytes on socket which should have more data.
Version 1.27
------------
...
...
fs/cifs/README
View file @
575b793d
...
...
@@ -64,6 +64,13 @@ trivially built from Samba 3.0 or later source e.g. by executing:
gcc samba/source/client/mount.cifs.c -o mount.cifs
If cifs is built as a module, then the size and number of network buffers
and maximum number of simultaneous requests to one server can be configured.
Changing these from their defaults is not recommended. By executing modinfo
modinfo kernel/fs/cifs/cifs.ko
on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
at module initialization time (by running insmod cifs.ko) can be seen.
Allowing User Mounts
====================
To permit users to mount and unmount over directories they own is possible
...
...
fs/cifs/cifssmb.c
View file @
575b793d
...
...
@@ -389,6 +389,12 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
SecurityBlob
,
count
-
16
,
&
server
->
secType
);
if
(
rc
==
1
)
{
/* BB Need to fill struct for sessetup here */
rc
=
-
EOPNOTSUPP
;
}
else
{
rc
=
-
EINVAL
;
}
}
}
else
server
->
capabilities
&=
~
CAP_EXTENDED_SECURITY
;
...
...
fs/cifs/connect.c
View file @
575b793d
...
...
@@ -254,7 +254,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
cFYI
(
1
,(
"call to reconnect done"
));
csocket
=
server
->
ssocket
;
continue
;
}
else
if
((
length
==
-
ERESTARTSYS
)
||
(
length
==
-
EAGAIN
))
{
}
else
if
((
length
==
-
ERESTARTSYS
)
||
(
length
==
-
EAGAIN
)
||
((
length
>
0
)
&&
(
length
<=
3
))
)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
1
);
/* minimum sleep to prevent looping
allowing socket to clear and app threads to set
...
...
@@ -280,7 +281,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
}
pdu_length
=
4
+
ntohl
(
smb_buffer
->
smb_buf_length
);
/* Ony read pdu_length after below checks for too short (due
/* On
l
y read pdu_length after below checks for too short (due
to e.g. int overflow) and too long ie beyond end of buf */
cFYI
(
1
,
(
"Peek length rcvd: 0x%x beginning 0x%x)"
,
length
,
pdu_length
));
...
...
@@ -330,13 +331,19 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
csocket
=
server
->
ssocket
;
continue
;
}
else
{
if
(
/*(length != sizeof (struct smb_hdr) - 1)
||*/
(
pdu_length
>
if
(
length
<
16
)
{
/* We can not validate the SMB unless
at least this much of SMB available
so give the socket time to copy
a few more bytes and retry */
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
10
);
continue
;
}
else
if
(
(
pdu_length
>
CIFSMaxBufSize
+
MAX_CIFS_HDR_SIZE
)
||
(
pdu_length
<
sizeof
(
struct
smb_hdr
)
-
1
)
||
(
checkSMBhdr
||
(
checkSMBhdr
(
smb_buffer
,
smb_buffer
->
Mid
)))
{
cERROR
(
1
,
(
"Invalid size or format for SMB found with length %d and pdu_length %d"
,
...
...
fs/cifs/file.c
View file @
575b793d
...
...
@@ -64,7 +64,7 @@ cifs_open(struct inode *inode, struct file *file)
read_lock
(
&
GlobalSMBSeslock
);
list_for_each
(
tmp
,
&
pCifsInode
->
openFileList
)
{
pCifsFile
=
list_entry
(
tmp
,
struct
cifsFileInfo
,
flist
);
if
((
pCifsFile
->
pfile
==
NULL
)
&&
(
pCifsFile
->
pid
=
current
->
p
id
)){
if
((
pCifsFile
->
pfile
==
NULL
)
&&
(
pCifsFile
->
pid
=
=
current
->
tg
id
)){
/* mode set in cifs_create */
pCifsFile
->
pfile
=
file
;
/* needed for writepage */
file
->
private_data
=
pCifsFile
;
...
...
@@ -168,7 +168,7 @@ cifs_open(struct inode *inode, struct file *file)
memset
(
file
->
private_data
,
0
,
sizeof
(
struct
cifsFileInfo
));
pCifsFile
=
(
struct
cifsFileInfo
*
)
file
->
private_data
;
pCifsFile
->
netfid
=
netfid
;
pCifsFile
->
pid
=
current
->
p
id
;
pCifsFile
->
pid
=
current
->
tg
id
;
init_MUTEX
(
&
pCifsFile
->
fh_sem
);
pCifsFile
->
pfile
=
file
;
/* needed for writepage */
pCifsFile
->
pInode
=
inode
;
...
...
@@ -598,7 +598,8 @@ cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
pfLock
->
fl_start
,
numUnlock
,
numLock
,
lockType
,
wait_flag
);
if
(
rc
==
0
&&
(
pfLock
->
fl_flags
&
FL_POSIX
))
posix_lock_file
(
file
,
pfLock
);
if
(
experimEnabled
)
posix_lock_file
(
file
,
pfLock
);
FreeXid
(
xid
);
return
rc
;
}
...
...
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