Bug 59811 - CIFS getxattr() returns success for non existing extended attributes
Summary: CIFS getxattr() returns success for non existing extended attributes
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-17 09:30 UTC by Jean-Francois Dockes
Modified: 2016-03-20 10:15 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.2.0-48-generic
Tree: Mainline
Regression: No


Attachments

Description Jean-Francois Dockes 2013-06-17 09:30:46 UTC
getxattr should return -1 for non-existing attributes, but it returns 0 (meaning existing attribute with empty value) instead.

How to reproduce: just use getfattr:

/mnt is cifs mount, /tmp/local is a local file system
hautmedoc$ mount
[...]
//y/tmp on /mnt type cifs (rw)
[...]


hautmedoc$ cd /mnt
hautmedoc$ getfattr -n user.nosuchattr orange3.pdf 
# file: orange3.pdf
user.nosuchattr

hautmedoc$ cd /tmp
hautmedoc$ getfattr -n user.nosuchattr orange3.pdf 
orange3.pdf: user.nosuchattr: No such attribute
Comment 1 Jeff Layton 2013-06-17 10:45:21 UTC
cc'ing Steve since he has been doing some xattr work recently. Steve maybe you can fix this while you're in there too?

Note You need to log in before you can comment on or make changes to this bug.