bugattr - Bugs: bug #44326, getfattr/setfattr and empty...

 
 

bug #44326: getfattr/setfattr and empty attribute values

Submitted by:  Andreas Gruenbacher <agruen>
Submitted on:  Fri 20 Feb 2015 08:30:38 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 20 Feb 2015 09:53:25 PM UTC, comment #1:

Fixed in the git repo now.

Andreas Gruenbacher <agruen>
Project Administrator
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=""

Andreas Gruenbacher <agruen>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by agruen (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 20 Feb 2015 09:53:25 PM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1