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
7a1f6754
Commit
7a1f6754
authored
Jul 28, 2004
by
Steve French
Committed by
Steve French
Jul 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] xattr support for cifs filesystem part 5 of 5, add removexattr capability
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
486326cf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
2 deletions
+66
-2
fs/Kconfig
fs/Kconfig
+16
-0
fs/cifs/CHANGES
fs/cifs/CHANGES
+5
-0
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+2
-1
fs/cifs/xattr.c
fs/cifs/xattr.c
+43
-1
No files found.
fs/Kconfig
View file @
7a1f6754
...
@@ -1652,6 +1652,22 @@ config CIFS_STATS
...
@@ -1652,6 +1652,22 @@ config CIFS_STATS
Enabling this option will cause statistics for each server share
Enabling this option will cause statistics for each server share
mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
mounted by the cifs client to be displayed in /proc/fs/cifs/Stats
config CIFS_XATTR
bool "CIFS extended attributes (EXPERIMENTAL)"
depends on CIFS
help
Extended attributes are name:value pairs associated with inodes by
the kernel or by users (see the attr(5) manual page, or visit
<http://acl.bestbits.at/> for details). CIFS maps the name of
extended attributes beginning with the user namespace prefix
to SMB/CIFS EAs. EAs are stored on Windows servers without the
user namespace prefix, but their names are seen by Linux cifs clients
prefaced by the user namespace prefix. The system namespace
(used by some filesystems to store ACLs) is not supported at
this time.
If unsure, say N.
config CIFS_POSIX
config CIFS_POSIX
bool "CIFS POSIX Extensions (EXPERIMENTAL)"
bool "CIFS POSIX Extensions (EXPERIMENTAL)"
depends on CIFS
depends on CIFS
...
...
fs/cifs/CHANGES
View file @
7a1f6754
Version 1.22
------------
Add config option to enable XATTR (extended attribute) support, mapping
xattr names in the "user." namespace space to SMB/CIFS EAs.
Version 1.21
Version 1.21
------------
------------
Add new mount parm to control whether mode check (vfs_permission) is done on
Add new mount parm to control whether mode check (vfs_permission) is done on
...
...
fs/cifs/cifssmb.c
View file @
7a1f6754
...
@@ -3370,6 +3370,7 @@ CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName,
...
@@ -3370,6 +3370,7 @@ CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName,
/*BB add length check that it would fit in negotiated SMB buffer size BB */
/*BB add length check that it would fit in negotiated SMB buffer size BB */
/* if(ea_value_len > buffer_size - 512 (enough for header)) */
/* if(ea_value_len > buffer_size - 512 (enough for header)) */
if
(
ea_value_len
)
memcpy
(
parm_data
->
list
[
0
].
name
+
name_len
+
1
,
ea_value
,
ea_value_len
);
memcpy
(
parm_data
->
list
[
0
].
name
+
name_len
+
1
,
ea_value
,
ea_value_len
);
pSMB
->
TotalDataCount
=
pSMB
->
DataCount
;
pSMB
->
TotalDataCount
=
pSMB
->
DataCount
;
...
...
fs/cifs/xattr.c
View file @
7a1f6754
...
@@ -34,9 +34,51 @@
...
@@ -34,9 +34,51 @@
/* also note could add check for security prefix XATTR_SECURITY_PREFIX */
/* also note could add check for security prefix XATTR_SECURITY_PREFIX */
int
cifs_removexattr
(
struct
dentry
*
direntry
,
const
char
*
name
)
int
cifs_removexattr
(
struct
dentry
*
direntry
,
const
char
*
ea_
name
)
{
{
int
rc
=
-
EOPNOTSUPP
;
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
;
}
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
,
0
,
(
__u16
)
0
,
cifs_sb
->
local_nls
);
}
if
(
full_path
)
kfree
(
full_path
);
FreeXid
(
xid
);
#endif
return
rc
;
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