Quantcast

getfattr and -d options

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

getfattr and -d options

Zdenek Prikryl
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.

--
Zdenek Prikryl <[hidden email]>


diff -up attr-2.4.43/getfattr/getfattr.c.dump attr-2.4.43/getfattr/getfattr.c
--- attr-2.4.43/getfattr/getfattr.c.dump 2008-10-29 16:55:43.000000000 +0100
+++ attr-2.4.43/getfattr/getfattr.c 2008-10-29 16:55:45.000000000 +0100
@@ -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 */
Loading...