Fri 20 Feb 2015 08:30:38 PM UTC, original submission:
Extended attribute values can be "empty", for example:
setxattr("file", "user.name", "", 0, 0)
When the file is inspected with getfattr, getfattr does not show the value as empty:
$ getfattr -m- -d file
# file: file
user.name
The expected output would be:
$ getfattr -m- -d file
# file: file
user.name=""
Even worse, setfattr silently ignores empty attribute values:
$ setfattr -n user.name -v 'something' file
$ getfattr -m- -d file
# file: file
user.name="something"
$ setfattr -n user.name -v '' file
$ getfattr -m- -d file
# file: file
user.name="something"
This is clearly wrong; the expected output would be:
$ getfattr -m- -d file
# file: file
user.name=""
|