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
eb394736
Commit
eb394736
authored
Dec 09, 2008
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update all sources:
Add mount option "forcemand"
parent
4a267003
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
75 additions
and
18 deletions
+75
-18
cifs_fs_sb.h
sources/2.6.23/cifs_fs_sb.h
+1
-0
connect.c
sources/2.6.23/connect.c
+5
-0
file.c
sources/2.6.23/file.c
+5
-3
cifs_fs_sb.h
sources/2.6.24/cifs_fs_sb.h
+1
-0
connect.c
sources/2.6.24/connect.c
+5
-0
file.c
sources/2.6.24/file.c
+5
-3
cifs_fs_sb.h
sources/2.6.25/cifs_fs_sb.h
+1
-0
connect.c
sources/2.6.25/connect.c
+5
-0
file.c
sources/2.6.25/file.c
+5
-3
cifs_fs_sb.h
sources/2.6.26/cifs_fs_sb.h
+1
-0
connect.c
sources/2.6.26/connect.c
+5
-0
file.c
sources/2.6.26/file.c
+5
-3
cifs_fs_sb.h
sources/2.6.27/cifs_fs_sb.h
+1
-0
connect.c
sources/2.6.27/connect.c
+14
-0
file.c
sources/2.6.27/file.c
+5
-3
cifs_fs_sb.h
sources/legacy/cifs_fs_sb.h
+1
-0
connect.c
sources/legacy/connect.c
+5
-0
file.c
sources/legacy/file.c
+5
-3
No files found.
sources/2.6.23/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -30,6 +30,7 @@
#define CIFS_MOUNT_CIFS_ACL 0x200
/* send ACL requests to non-POSIX srv */
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/2.6.23/connect.c
View file @
eb394736
...
...
@@ -90,6 +90,7 @@ struct smb_vol {
unsigned
nullauth
:
1
;
/* attempt to authenticate with null user */
unsigned
nocase
;
/* request case insensitive filenames */
unsigned
nobrl
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
unsigned
int
rsize
;
unsigned
int
wsize
;
unsigned
int
sockopt
;
...
...
@@ -1212,6 +1213,8 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -2064,6 +2067,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
volume_info
.
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
volume_info
.
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
volume_info
.
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
volume_info
.
override_uid
)
...
...
sources/2.6.23/file.c
View file @
eb394736
...
...
@@ -629,7 +629,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
int
posix_locking
;
int
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -688,8 +688,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
sources/2.6.24/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -30,6 +30,7 @@
#define CIFS_MOUNT_CIFS_ACL 0x200
/* send ACL requests to non-POSIX srv */
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/2.6.24/connect.c
View file @
eb394736
...
...
@@ -90,6 +90,7 @@ struct smb_vol {
unsigned
nullauth
:
1
;
/* attempt to authenticate with null user */
unsigned
nocase
;
/* request case insensitive filenames */
unsigned
nobrl
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
unsigned
int
rsize
;
unsigned
int
wsize
;
unsigned
int
sockopt
;
...
...
@@ -1236,6 +1237,8 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -2070,6 +2073,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
volume_info
.
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
volume_info
.
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
volume_info
.
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
volume_info
.
override_uid
)
...
...
sources/2.6.24/file.c
View file @
eb394736
...
...
@@ -652,7 +652,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
int
posix_locking
;
int
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -711,8 +711,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
sources/2.6.25/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -30,6 +30,7 @@
#define CIFS_MOUNT_CIFS_ACL 0x200
/* send ACL requests to non-POSIX srv */
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/2.6.25/connect.c
View file @
eb394736
...
...
@@ -90,6 +90,7 @@ struct smb_vol {
unsigned
nullauth
:
1
;
/* attempt to authenticate with null user */
unsigned
nocase
;
/* request case insensitive filenames */
unsigned
nobrl
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
unsigned
int
rsize
;
unsigned
int
wsize
;
unsigned
int
sockopt
;
...
...
@@ -1236,6 +1237,8 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -2112,6 +2115,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
volume_info
.
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
volume_info
.
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
volume_info
.
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
volume_info
.
override_uid
)
...
...
sources/2.6.25/file.c
View file @
eb394736
...
...
@@ -651,7 +651,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
int
posix_locking
;
int
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -710,8 +710,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
sources/2.6.26/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -31,6 +31,7 @@
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_DYNPERM 0x1000
/* allow in-memory only mode setting */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/2.6.26/connect.c
View file @
eb394736
...
...
@@ -89,6 +89,7 @@ struct smb_vol {
bool
nullauth
:
1
;
/* attempt to authenticate with null user */
bool
nocase
:
1
;
/* request case insensitive filenames */
bool
nobrl
:
1
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
bool
seal
:
1
;
/* request transport encryption on share */
unsigned
int
rsize
;
unsigned
int
wsize
;
...
...
@@ -1245,6 +1246,8 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -2108,6 +2111,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
volume_info
.
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
volume_info
.
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
volume_info
.
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
volume_info
.
override_uid
)
...
...
sources/2.6.26/file.c
View file @
eb394736
...
...
@@ -648,7 +648,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
bool
posix_locking
;
bool
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -707,8 +707,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
sources/2.6.27/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -31,6 +31,7 @@
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_DYNPERM 0x1000
/* allow in-memory only mode setting */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/2.6.27/connect.c
View file @
eb394736
...
...
@@ -89,6 +89,7 @@ struct smb_vol {
bool
nullauth
:
1
;
/* attempt to authenticate with null user */
bool
nocase
:
1
;
/* request case insensitive filenames */
bool
nobrl
:
1
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
bool
seal
:
1
;
/* request transport encryption on share */
bool
noblocksnd
:
1
;
bool
noautotune
:
1
;
...
...
@@ -1253,6 +1254,17 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
/* will take the shorter form "forcemand" as well */
/* This mount option will force use of mandatory
(DOS/Windows style) byte range locks, instead of
using posix advisory byte range locks, even if the
Unix extensions are available and posix locks would
be supported otherwise. If Unix extensions are not
negotiated this has no effect since mandatory locks
would be used (mandatory locks is all that those
those servers support) */
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -1998,6 +2010,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
pvolume_info
->
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
pvolume_info
->
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
pvolume_info
->
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
pvolume_info
->
override_uid
)
...
...
sources/2.6.27/file.c
View file @
eb394736
...
...
@@ -649,7 +649,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
bool
posix_locking
;
bool
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -708,8 +708,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
sources/legacy/cifs_fs_sb.h
View file @
eb394736
...
...
@@ -30,6 +30,7 @@
#define CIFS_MOUNT_CIFS_ACL 0x200
/* send ACL requests to non-POSIX srv */
#define CIFS_MOUNT_OVERR_UID 0x400
/* override uid returned from server */
#define CIFS_MOUNT_OVERR_GID 0x800
/* override gid returned from server */
#define CIFS_MOUNT_NOPOSIXBRL 0x2000
/* mandatory not posix byte range lock */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
...
...
sources/legacy/connect.c
View file @
eb394736
...
...
@@ -106,6 +106,7 @@ struct smb_vol {
unsigned
nullauth
:
1
;
/* attempt to authenticate with null user */
unsigned
nocase
;
/* request case insensitive filenames */
unsigned
nobrl
;
/* disable sending byte range locks to srv */
bool
mand_lock
:
1
;
/* send mandatory not posix byte range lock reqs */
unsigned
int
rsize
;
unsigned
int
wsize
;
unsigned
int
sockopt
;
...
...
@@ -1266,6 +1267,8 @@ cifs_parse_mount_options(char *options, const char *devname,
if
(
vol
->
file_mode
==
(
S_IALLUGO
&
~
(
S_ISUID
|
S_IXGRP
)))
vol
->
file_mode
=
S_IALLUGO
;
}
else
if
(
strnicmp
(
data
,
"forcemandatorylock"
,
9
)
==
0
)
{
vol
->
mand_lock
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
...
...
@@ -2155,6 +2158,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_UNX_EMUL
;
if
(
volume_info
.
nobrl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_BRL
;
if
(
volume_info
.
mand_lock
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NOPOSIXBRL
;
if
(
volume_info
.
cifs_acl
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_CIFS_ACL
;
if
(
volume_info
.
override_uid
)
...
...
sources/legacy/file.c
View file @
eb394736
...
...
@@ -756,7 +756,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
struct
cifsTconInfo
*
pTcon
;
__u16
netfid
;
__u8
lockType
=
LOCKING_ANDX_LARGE_FILES
;
int
posix_locking
;
int
posix_locking
=
0
;
length
=
1
+
pfLock
->
fl_end
-
pfLock
->
fl_start
;
rc
=
-
EACCES
;
...
...
@@ -819,8 +819,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
}
netfid
=
((
struct
cifsFileInfo
*
)
file
->
private_data
)
->
netfid
;
posix_locking
=
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
cifs_sb
->
tcon
->
fsUnixInfo
.
Capability
));
if
((
pTcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
CIFS_UNIX_FCNTL_CAP
&
le64_to_cpu
(
pTcon
->
fsUnixInfo
.
Capability
))
&&
((
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NOPOSIXBRL
)
==
0
))
posix_locking
=
1
;
/* BB add code here to normalize offset and length to
account for negative length which we can not accept over the
...
...
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