Whamcloud - gitweb
libext2fs: sort keys for xattr blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 6 Mar 2016 02:42:17 +0000 (21:42 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 7 Mar 2016 01:08:53 +0000 (20:08 -0500)
commitba380eea99c6035080728f042c8cb96f02fbdb18
tree1c90ece3d5775aaef9310dddb97898942b2c7e53
parent84244683c03a6602e91043271206652a40149775
libext2fs: sort keys for xattr blocks

Richard Purdie reports that libext2fs doesn't sort attribute keys in
the xattr block correctly, causing the kernel to return -ENODATA when
querying attributes that should be there.  Therefore, sort attributes
so that whatever ends up in the xattr block is sorted according to
what the kernel expects.

Cc: Darren Hart <dvhart@linux.intel.com>
Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tested-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext_attr.c
tests/d_xattr_sorting/expect [new file with mode: 0644]
tests/d_xattr_sorting/name [new file with mode: 0644]
tests/d_xattr_sorting/script [new file with mode: 0644]