Skip to contentSkip to conversation

getfattr and -d options

PATCH Zdenek Prikryl 1 participant 1 message Oct 29, 2008

lore
Share & tools
lore
#0 lore raw

Hello,
in getfattr's man page there is "-d Dump the values of all extended attributes associated with path-name". If you use SELinux, files have this extended attribute:

security.selinux="...".

-d option works in such way that it only prints extended attributes, which names begin with "user." So, in this case, selinux attribute isn't printed. I'm sending simple patch, which corrects this.

Best regards.

Signature · 1 line
Zdenek Prikryl <[email protected]>
getfattr/getfattr.c renamed from getfattr/getfattr.c.dump +1 -0
diff -up attr-2.4.43/getfattr/getfattr.c.dump attr-2.4.43/getfattr/getfattr.c
@@ -408,6 +408,7 @@ int main(int argc, char *argv[])
 
 			case 'd': /* dump attribute values */
 				opt_dump = 1;
+				opt_name_pattern = "";
 				break;
 
 			case 'e':  /* encoding */