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
nexedi
linux
Commits
486326cf
Commit
486326cf
authored
Jul 26, 2004
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
parents
bb262c63
5b64aaf9
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
643 additions
and
100 deletions
+643
-100
fs/cifs/CHANGES
fs/cifs/CHANGES
+13
-0
fs/cifs/README
fs/cifs/README
+27
-1
fs/cifs/cifs_fs_sb.h
fs/cifs/cifs_fs_sb.h
+4
-0
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+3
-7
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+0
-4
fs/cifs/cifspdu.h
fs/cifs/cifspdu.h
+19
-4
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+13
-31
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+391
-9
fs/cifs/connect.c
fs/cifs/connect.c
+16
-0
fs/cifs/dir.c
fs/cifs/dir.c
+19
-4
fs/cifs/inode.c
fs/cifs/inode.c
+14
-6
fs/cifs/smbencrypt.c
fs/cifs/smbencrypt.c
+0
-2
fs/cifs/xattr.c
fs/cifs/xattr.c
+121
-7
include/linux/pkt_cls.h
include/linux/pkt_cls.h
+2
-23
net/sched/Kconfig
net/sched/Kconfig
+1
-2
No files found.
fs/cifs/CHANGES
View file @
486326cf
Version 1.21
------------
Add new mount parm to control whether mode check (vfs_permission) is done on
the client. If Unix extensions are enabled and the uids on the client
and server do not match, client permission checks are meaningless on
server uids that do not exist on the client (this does not affect the
normal ACL check which occurs on the server). Fix default uid
on mknod to match create and mkdir. Add optional mount parm to allow
override of the default uid behavior (in which the server sets the uid
and gid of newly created files). Normally for network filesystem mounts
user want the server to set the uid/gid on newly created files (rather than
using uid of the client processes you would in a local filesystem).
Version 1.20
------------
Make transaction counts more consistent. Merge /proc/fs/cifs/SimultaneousOps
...
...
fs/cifs/README
View file @
486326cf
...
...
@@ -255,7 +255,33 @@ A partial list of the supported mount options follows:
mount helper will not prompt the user for a password
if guest is specified on the mount options. If no
password is specified a null password will be used.
perm Client does permission checks (vfs_permission check of uid
and gid of the file against the mode and desired operation),
Note that this is in addition to the normal ACL check on the
target machine done by the server software.
Client permission checking is enabled by default.
noperm Client does not do permission checks. This can expose
files on this mount to access by other users on the local
client system. It is typically only needed when the server
supports the CIFS Unix Extensions but the UIDs/GIDs on the
client and server system do not match closely enough to allow
access by the user doing the mount.
Note that this does not affect the normal ACL check on the
target machine done by the server software (of the server
ACL against the user name provided at mount time).
setuids If the CIFS Unix extensions are negotiated with the server
the client will attempt to set the effective uid and gid of
the local process on newly created files, directories, and
devices (create, mkdir, mknod).
nosetuids The client will not attempt to set the uid and gid on
on newly created files, directories, and devices (create,
mkdir, mknod) which will result in the server setting the
uid and gid to the default (usually the server uid of the
usern who mounted the share). Letting the server (rather than
the client) set the uid and gid is the default. This
parameter has no effect if the CIFS Unix Extensions are not
negotiated.
The mount.cifs mount helper also accepts a few mount options before -o
including:
...
...
fs/cifs/cifs_fs_sb.h
View file @
486326cf
...
...
@@ -18,6 +18,9 @@
#ifndef _CIFS_FS_SB_H
#define _CIFS_FS_SB_H
#define CIFS_MOUNT_NO_PERM 1
/* do not do client vfs_perm check */
#define CIFS_MOUNT_SET_UID 2
/* set current->euid in create etc. */
struct
cifs_sb_info
{
struct
cifsTconInfo
*
tcon
;
/* primary mount */
struct
list_head
nested_tcon_q
;
...
...
@@ -28,5 +31,6 @@ struct cifs_sb_info {
gid_t
mnt_gid
;
mode_t
mnt_file_mode
;
mode_t
mnt_dir_mode
;
int
mnt_cifs_flags
;
};
#endif
/* _CIFS_FS_SB_H */
fs/cifs/cifsfs.c
View file @
486326cf
...
...
@@ -192,15 +192,11 @@ cifs_statfs(struct super_block *sb, struct kstatfs *buf)
static
int
cifs_permission
(
struct
inode
*
inode
,
int
mask
,
struct
nameidata
*
nd
)
{
struct
cifs_sb_info
*
cifs_sb
;
struct
cifs_sb_info
*
cifs_sb
;
cifs_sb
=
CIFS_SB
(
inode
->
i_sb
);
cifs_sb
=
CIFS_SB
(
inode
->
i_sb
);
if
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
{
/* the server supports the Unix-like mode bits and does its
own permission checks, and therefore we do not allow the file
mode to be overriden on these mounts - so do not do perm
check on client side */
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_NO_PERM
)
{
return
0
;
}
else
/* file mode might have been restricted at mount time
on the client (above and beyond ACL on servers) for
...
...
fs/cifs/cifsfs.h
View file @
486326cf
...
...
@@ -32,14 +32,10 @@
#define TRUE 1
#endif
extern
int
map_cifs_error
(
int
error_class
,
int
error_code
,
int
status_codes_negotiated
);
extern
struct
address_space_operations
cifs_addr_ops
;
/* Functions related to super block operations */
extern
struct
super_operations
cifs_super_ops
;
extern
void
cifs_put_inode
(
struct
inode
*
);
extern
void
cifs_read_inode
(
struct
inode
*
);
extern
void
cifs_delete_inode
(
struct
inode
*
);
/* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */
...
...
fs/cifs/cifspdu.h
View file @
486326cf
...
...
@@ -1046,6 +1046,8 @@ typedef union smb_com_transaction2 {
/* PathInfo/FileInfo infolevels */
#define SMB_INFO_STANDARD 1
#define SMB_SET_FILE_EA 2
#define SMB_QUERY_FILE_EA_SIZE 2
#define SMB_INFO_QUERY_EAS_FROM_LIST 3
#define SMB_INFO_QUERY_ALL_EAS 4
#define SMB_INFO_IS_NAME_VALID 6
...
...
@@ -1620,6 +1622,19 @@ typedef struct {
char
LinkDest
[
1
];
}
FILE_UNIX_LINK_INFO
;
/* level 513 QPathInfo */
typedef
struct
{
__u16
CreationDate
;
__u16
CreationTime
;
__u16
LastAccessDate
;
__u16
LastAccessTime
;
__u16
LastWriteDate
;
__u16
LastWriteTime
;
__u32
DataSize
;
/* File Size (EOF) */
__u32
AllocationSize
;
__u16
Attributes
;
/* verify not u32 */
__u32
EASize
;
}
FILE_INFO_STANDARD
;
/* level 1 SetPath/FileInfo */
/* defines for enumerating possible values of the Unix type field below */
#define UNIX_FILE 0
#define UNIX_DIR 1
...
...
@@ -1680,12 +1695,12 @@ typedef struct {
}
FILE_DIRECTORY_INFO
;
/* level 257 FF response data area */
struct
gea
{
unsigned
char
cbName
;
char
szN
ame
[
1
];
unsigned
char
name_len
;
char
n
ame
[
1
];
};
struct
gealist
{
unsigned
long
cbList
;
unsigned
long
list_len
;
struct
gea
list
[
1
];
};
...
...
@@ -1693,7 +1708,7 @@ struct fea {
unsigned
char
EA_flags
;
__u8
name_len
;
__u16
value_len
;
char
szN
ame
[
1
];
char
n
ame
[
1
];
/* optionally followed by value */
};
/* flags for _FEA.fEA */
...
...
fs/cifs/cifsproto.h
View file @
486326cf
...
...
@@ -128,10 +128,10 @@ extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon,
const
struct
nls_table
*
nls_codepage
);
extern
int
CIFSSMBSetTimes
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
c
har
*
fileName
,
FILE_BASIC_INFO
*
data
,
c
onst
char
*
fileName
,
const
FILE_BASIC_INFO
*
data
,
const
struct
nls_table
*
nls_codepage
);
extern
int
CIFSSMBSetEOF
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
char
*
fileName
,
__u64
size
,
int
setAllocationSizeFlag
,
c
onst
c
har
*
fileName
,
__u64
size
,
int
setAllocationSizeFlag
,
const
struct
nls_table
*
nls_codepage
);
extern
int
CIFSSMBSetFileSize
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
__u64
size
,
__u16
fileHandle
,
__u32
opener_pid
,
int
AllocSizeFlag
);
...
...
@@ -213,31 +213,6 @@ extern int cifs_verify_signature(const struct smb_hdr *, const char * mac_key,
extern
int
cifs_calculate_mac_key
(
char
*
key
,
const
char
*
rn
,
const
char
*
pass
);
extern
void
CalcNTLMv2_partial_mac_key
(
struct
cifsSesInfo
*
,
struct
nls_table
*
);
extern
void
CalcNTLMv2_response
(
const
struct
cifsSesInfo
*
,
char
*
);
extern
int
CIFSBuildServerList
(
int
xid
,
char
*
serverBufferList
,
int
recordlength
,
int
*
entries
,
int
*
totalEntries
,
int
*
topoChangedFlag
);
extern
int
CIFSSMBQueryShares
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
struct
shareInfo
*
shareList
,
int
bufferLen
,
int
*
entries
,
int
*
totalEntries
);
extern
int
CIFSSMBQueryAlias
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
struct
aliasInfo
*
aliasList
,
int
bufferLen
,
int
*
entries
,
int
*
totalEntries
);
extern
int
CIFSSMBAliasInfo
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
char
*
aliasName
,
char
*
serverName
,
char
*
shareName
,
char
*
comment
);
extern
int
CIFSSMBGetShareInfo
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
char
*
share
,
char
*
comment
);
extern
int
CIFSSMBGetUserPerms
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
char
*
userName
,
char
*
searchName
,
int
*
perms
);
extern
int
CIFSSMBSync
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
int
netfid
,
int
pid
);
extern
int
CIFSSMBSeek
(
int
xid
,
struct
cifsTconInfo
*
tcon
,
int
netfid
,
int
pid
,
int
whence
,
unsigned
long
offset
,
long
long
*
newoffset
);
extern
int
CIFSSMBCopy
(
int
xid
,
struct
cifsTconInfo
*
source_tcon
,
const
char
*
fromName
,
...
...
@@ -247,8 +222,15 @@ extern int CIFSSMBCopy(int xid,
extern
int
CIFSSMBNotify
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
int
notify_subdirs
,
const
__u16
netfid
,
__u32
filter
,
const
struct
nls_table
*
nls_codepage
);
extern
int
CIFSSMBQAllEAs
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
char
*
EAData
,
size_t
size
,
const
struct
nls_table
*
nls_codepage
);
extern
ssize_t
CIFSSMBQAllEAs
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
char
*
EAData
,
size_t
bufsize
,
const
struct
nls_table
*
nls_codepage
);
extern
ssize_t
CIFSSMBQueryEA
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
const
unsigned
char
*
ea_name
,
unsigned
char
*
ea_value
,
size_t
buf_size
,
const
struct
nls_table
*
nls_codepage
);
extern
int
CIFSSMBSetEA
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
char
*
fileName
,
const
char
*
ea_name
,
const
void
*
ea_value
,
const
__u16
ea_value_len
,
const
struct
nls_table
*
nls_codepage
);
#endif
/* _CIFSPROTO_H */
fs/cifs/cifssmb.c
View file @
486326cf
This diff is collapsed.
Click to expand it.
fs/cifs/connect.c
View file @
486326cf
...
...
@@ -64,6 +64,8 @@ struct smb_vol {
int
rw
:
1
;
int
retry
:
1
;
int
intr
:
1
;
int
setuids
:
1
;
int
noperm
:
1
;
unsigned
int
rsize
;
unsigned
int
wsize
;
unsigned
int
sockopt
;
...
...
@@ -740,6 +742,14 @@ cifs_parse_mount_options(char *options, const char *devname, struct smb_vol *vol
vol
->
retry
=
1
;
}
else
if
(
strnicmp
(
data
,
"soft"
,
4
)
==
0
)
{
vol
->
retry
=
0
;
}
else
if
(
strnicmp
(
data
,
"perm"
,
4
)
==
0
)
{
vol
->
noperm
=
0
;
}
else
if
(
strnicmp
(
data
,
"noperm"
,
6
)
==
0
)
{
vol
->
noperm
=
1
;
}
else
if
(
strnicmp
(
data
,
"setuids"
,
7
)
==
0
)
{
vol
->
setuids
=
1
;
}
else
if
(
strnicmp
(
data
,
"nosetuids"
,
9
)
==
0
)
{
vol
->
setuids
=
0
;
}
else
if
(
strnicmp
(
data
,
"nohard"
,
6
)
==
0
)
{
vol
->
retry
=
0
;
}
else
if
(
strnicmp
(
data
,
"nosoft"
,
6
)
==
0
)
{
...
...
@@ -1314,6 +1324,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb
->
mnt_file_mode
=
volume_info
.
file_mode
;
cifs_sb
->
mnt_dir_mode
=
volume_info
.
dir_mode
;
cFYI
(
1
,(
"file mode: 0x%x dir mode: 0x%x"
,
cifs_sb
->
mnt_file_mode
,
cifs_sb
->
mnt_dir_mode
));
if
(
volume_info
.
noperm
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_NO_PERM
;
if
(
volume_info
.
setuids
)
cifs_sb
->
mnt_cifs_flags
|=
CIFS_MOUNT_SET_UID
;
tcon
=
find_unc
(
sin_server
.
sin_addr
.
s_addr
,
volume_info
.
UNC
,
volume_info
.
username
);
...
...
fs/cifs/dir.c
View file @
486326cf
...
...
@@ -243,11 +243,19 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
then we now have to set the mode if possible */
if
((
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
&&
(
oplock
&
CIFS_CREATE_ACTION
))
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_SET_UID
)
{
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
current
->
euid
,
(
__u64
)
current
->
egid
,
0
/* dev */
,
cifs_sb
->
local_nls
);
}
else
{
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
-
1
,
(
__u64
)
-
1
,
0
/* dev */
,
cifs_sb
->
local_nls
);
}
else
{
/* BB implement via Windows security descriptors */
/* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/
...
...
@@ -348,9 +356,16 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, dev_t dev
rc
=
-
ENOMEM
;
if
(
full_path
&&
(
pTcon
->
ses
->
capabilities
&
CAP_UNIX
))
{
rc
=
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
current
->
euid
,
current
->
egid
,
device_number
,
cifs_sb
->
local_nls
);
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_SET_UID
)
{
rc
=
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,(
__u64
)
current
->
euid
,(
__u64
)
current
->
egid
,
device_number
,
cifs_sb
->
local_nls
);
}
else
{
rc
=
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
-
1
,
(
__u64
)
-
1
,
device_number
,
cifs_sb
->
local_nls
);
}
if
(
!
rc
)
{
rc
=
cifs_get_inode_info_unix
(
&
newinode
,
full_path
,
inode
->
i_sb
,
xid
);
...
...
fs/cifs/inode.c
View file @
486326cf
...
...
@@ -480,12 +480,20 @@ cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
d_instantiate
(
direntry
,
newinode
);
if
(
direntry
->
d_inode
)
direntry
->
d_inode
->
i_nlink
=
2
;
if
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
-
1
,
(
__u64
)
-
1
,
0
/* dev_t */
,
cifs_sb
->
local_nls
);
if
(
cifs_sb
->
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_SET_UID
)
{
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
current
->
euid
,
(
__u64
)
current
->
egid
,
0
/* dev_t */
,
cifs_sb
->
local_nls
);
}
else
{
CIFSSMBUnixSetPerms
(
xid
,
pTcon
,
full_path
,
mode
,
(
__u64
)
-
1
,
(
__u64
)
-
1
,
0
/* dev_t */
,
cifs_sb
->
local_nls
);
}
else
{
/* BB to be implemented via Windows secrty descriptors*/
/* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/
}
...
...
fs/cifs/smbencrypt.c
View file @
486326cf
...
...
@@ -70,8 +70,6 @@ void SMBOWFencrypt(unsigned char passwd[16], unsigned char *c8,
void
NTLMSSPOWFencrypt
(
unsigned
char
passwd
[
8
],
unsigned
char
*
ntlmchalresp
,
unsigned
char
p24
[
24
]);
void
SMBNTencrypt
(
unsigned
char
*
passwd
,
unsigned
char
*
c8
,
unsigned
char
*
p24
);
int
decode_pw_buffer
(
char
in_buffer
[
516
],
char
*
new_pwrd
,
int
new_pwrd_size
,
__u32
*
new_pw_len
);
/*
This implements the X/Open SMB password encryption
...
...
fs/cifs/xattr.c
View file @
486326cf
...
...
@@ -26,27 +26,136 @@
#include "cifsproto.h"
#include "cifs_debug.h"
#define MAX_EA_VALUE_SIZE 65535
#define CIFS_XATTR_DOS_ATTRIB "user.DOSATTRIB"
#define CIFS_XATTR_USER_PREFIX "user."
#define CIFS_XATTR_SYSTEM_PREFIX "system."
#define CIFS_XATTR_OS2_PREFIX "OS2."
/* BB should check for this someday */
/* also note could add check for security prefix XATTR_SECURITY_PREFIX */
int
cifs_removexattr
(
struct
dentry
*
direntry
,
const
char
*
name
)
{
int
rc
=
-
EOPNOTSUPP
;
return
rc
;
}
int
cifs_setxattr
(
struct
dentry
*
direntry
,
const
char
*
name
,
const
void
*
value
,
size_t
size
,
int
flags
)
int
cifs_setxattr
(
struct
dentry
*
direntry
,
const
char
*
ea_
name
,
const
void
*
ea_value
,
size_t
value_
size
,
int
flags
)
{
int
rc
=
-
EOPNOTSUPP
;
#ifdef CONFIG_CIFS_XATTR
int
xid
;
struct
cifs_sb_info
*
cifs_sb
;
struct
cifsTconInfo
*
pTcon
;
struct
super_block
*
sb
;
char
*
full_path
;
if
(
direntry
==
NULL
)
return
-
EIO
;
if
(
direntry
->
d_inode
==
NULL
)
return
-
EIO
;
sb
=
direntry
->
d_inode
->
i_sb
;
if
(
sb
==
NULL
)
return
-
EIO
;
xid
=
GetXid
();
cifs_sb
=
CIFS_SB
(
sb
);
pTcon
=
cifs_sb
->
tcon
;
down
(
&
sb
->
s_vfs_rename_sem
);
full_path
=
build_path_from_dentry
(
direntry
);
up
(
&
sb
->
s_vfs_rename_sem
);
if
(
full_path
==
NULL
)
{
FreeXid
(
xid
);
return
-
ENOMEM
;
}
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
/* if proc/fs/cifs/streamstoxattr is set then
search server for EAs or streams to
returns as xattrs */
if
(
value_size
>
MAX_EA_VALUE_SIZE
)
{
cFYI
(
1
,(
"size of EA value too large"
));
if
(
full_path
)
kfree
(
full_path
);
FreeXid
(
xid
);
return
-
EOPNOTSUPP
;
}
if
(
ea_name
==
NULL
)
{
cFYI
(
1
,(
"Null xattr names not supported"
));
}
else
if
(
strncmp
(
ea_name
,
CIFS_XATTR_USER_PREFIX
,
5
))
{
cFYI
(
1
,(
"illegal xattr namespace %s (only user namespace supported)"
,
ea_name
));
/* BB what if no namespace prefix? */
/* Should we just pass them to server, except for
system and perhaps security prefixes? */
}
else
{
ea_name
+=
5
;
/* skip past user. prefix */
rc
=
CIFSSMBSetEA
(
xid
,
pTcon
,
full_path
,
ea_name
,
ea_value
,
(
__u16
)
value_size
,
cifs_sb
->
local_nls
);
}
if
(
full_path
)
kfree
(
full_path
);
FreeXid
(
xid
);
#endif
return
rc
;
}
ssize_t
cifs_getxattr
(
struct
dentry
*
direntry
,
const
char
*
name
,
void
*
value
,
size_t
size
)
ssize_t
cifs_getxattr
(
struct
dentry
*
direntry
,
const
char
*
ea_
name
,
void
*
ea_value
,
size_t
buf_
size
)
{
ssize_t
rc
=
-
EOPNOTSUPP
;
#ifdef CONFIG_CIFS_XATTR
int
xid
;
struct
cifs_sb_info
*
cifs_sb
;
struct
cifsTconInfo
*
pTcon
;
struct
super_block
*
sb
;
char
*
full_path
;
if
(
direntry
==
NULL
)
return
-
EIO
;
if
(
direntry
->
d_inode
==
NULL
)
return
-
EIO
;
sb
=
direntry
->
d_inode
->
i_sb
;
if
(
sb
==
NULL
)
return
-
EIO
;
xid
=
GetXid
();
cifs_sb
=
CIFS_SB
(
sb
);
pTcon
=
cifs_sb
->
tcon
;
down
(
&
sb
->
s_vfs_rename_sem
);
full_path
=
build_path_from_dentry
(
direntry
);
up
(
&
sb
->
s_vfs_rename_sem
);
if
(
full_path
==
NULL
)
{
FreeXid
(
xid
);
return
-
ENOMEM
;
}
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
if
(
strncmp
(
ea_name
,
CIFS_XATTR_USER_PREFIX
,
5
))
{
cFYI
(
1
,(
"illegal xattr namespace %s (only user namespace supported)"
,
ea_name
));
/* BB what if no namespace prefix? */
/* Should we just pass them to server, except for system? */
}
else
{
/* We could add a check here
if proc/fs/cifs/streamstoxattr is set then
search server for EAs or streams to
returns as xattrs */
ea_name
+=
5
;
/* skip past user. */
rc
=
CIFSSMBQueryEA
(
xid
,
pTcon
,
full_path
,
ea_name
,
ea_value
,
buf_size
,
cifs_sb
->
local_nls
);
}
if
(
full_path
)
kfree
(
full_path
);
FreeXid
(
xid
);
#endif
return
rc
;
}
ssize_t
cifs_listxattr
(
struct
dentry
*
direntry
,
char
*
ea_data
,
size_t
ea
_size
)
ssize_t
cifs_listxattr
(
struct
dentry
*
direntry
,
char
*
data
,
size_t
buf
_size
)
{
ssize_t
rc
=
-
EOPNOTSUPP
;
#ifdef CONFIG_CIFS_XATTR
...
...
@@ -55,6 +164,7 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * ea_data, size_t ea_size)
struct
cifsTconInfo
*
pTcon
;
struct
super_block
*
sb
;
char
*
full_path
;
if
(
direntry
==
NULL
)
return
-
EIO
;
if
(
direntry
->
d_inode
==
NULL
)
...
...
@@ -74,13 +184,17 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * ea_data, size_t ea_size)
FreeXid
(
xid
);
return
-
ENOMEM
;
}
/* return dosattributes as pseudo xattr */
/* return dos
attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
/* if proc/fs/cifs/streamstoxattr is set then
search server for EAs or streams to
returns as xattrs */
rc
=
CIFSSMBQAllEAs
(
xid
,
pTcon
,
full_path
,
ea_data
,
ea_size
,
cifs_sb
->
local_nls
);
rc
=
CIFSSMBQAllEAs
(
xid
,
pTcon
,
full_path
,
data
,
buf_size
,
cifs_sb
->
local_nls
);
if
(
full_path
)
kfree
(
full_path
);
FreeXid
(
xid
);
#endif
return
rc
;
...
...
include/linux/pkt_cls.h
View file @
486326cf
...
...
@@ -117,17 +117,8 @@ enum
struct
tc_police
{
__u32
index
;
#ifdef CONFIG_NET_CLS_ACT
int
refcnt
;
int
bindcnt
;
#endif
/* Turned off because it requires new tc
* to work (for now maintain ABI)
*
#ifdef CONFIG_NET_CLS_ACT
__u32 capab;
#endif
*/
int
action
;
#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
#define TC_POLICE_OK TC_ACT_OK
...
...
@@ -195,12 +186,8 @@ enum
TCA_U32_DIVISOR
,
TCA_U32_SEL
,
TCA_U32_POLICE
,
#ifdef CONFIG_NET_CLS_ACT
TCA_U32_ACT
,
#endif
#ifdef CONFIG_NET_CLS_IND
TCA_U32_INDEV
,
#endif
__TCA_U32_MAX
};
...
...
@@ -212,9 +199,7 @@ struct tc_u32_key
__u32
val
;
int
off
;
int
offmask
;
#ifdef CONFIG_CLS_U32_PERF
unsigned
long
kcnt
;
#endif
__u32
kcnt
;
};
struct
tc_u32_sel
...
...
@@ -229,11 +214,9 @@ struct tc_u32_sel
short
hoff
;
__u32
hmask
;
#ifdef CONFIG_CLS_U32_PERF
struct
tc_u32_key
keys
[
0
];
unsigned
long
rcnt
;
unsigned
long
rhit
;
#endif
struct
tc_u32_key
keys
[
0
];
};
/* Flags */
...
...
@@ -300,12 +283,8 @@ enum
TCA_FW_UNSPEC
,
TCA_FW_CLASSID
,
TCA_FW_POLICE
,
#ifdef CONFIG_NET_CLS_IND
TCA_FW_INDEV
,
#endif
#ifdef CONFIG_NET_CLS_ACT
TCA_FW_ACT
,
#endif
__TCA_FW_MAX
};
...
...
net/sched/Kconfig
View file @
486326cf
...
...
@@ -37,7 +37,7 @@ config NET_SCH_CLK_GETTIMEOFDAY
config NET_SCH_CLK_CPU
bool "CPU cycle counter"
depends on X86_TSC || X86_64 ||
ALPHA ||
SPARC64 || PPC64 || IA64
depends on X86_TSC || X86_64 || SPARC64 || PPC64 || IA64
help
Say Y here if you want to use the CPU's cycle counter as clock source.
This is a cheap and high resolution clock source, but on some
...
...
@@ -47,7 +47,6 @@ config NET_SCH_CLK_CPU
The useable cycle counters are:
x86/x86_64 - Timestamp Counter
alpha - Cycle Counter
sparc64 - %ticks register
ppc64 - Time base
ia64 - Interval Time Counter
...
...
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