Package: attr
Version: 2.4.16-1

I am trying to set an extended attribute value of the form "0x20"
(literally ASCII letters zero, x, two, zero) but setfattr presumes that
I want a literal space (ASCII 0x20 or 32 decimal) instead. setfattr
seemingly has no option to override this, and its behaviour in
automatically converting my input isn't documented.

For example:
  $ cd /tmp
  $ >foo
  $ setfattr -n user.DOSATTRIB -v 0x20 foo
  $ getfattr -n user.DOSATTRIB foo
  # file: foo
  user.DOSATTRIB=" "

  $

What I want to see is:
  user.DOSATTRIB="0x20"

This is the form samba saves this particular attribute in. Seemingly the
only way to work around this is to convert the entire thing into
hexadecimal coded ASCII:
  $ setfattr -n user.DOSATTRIB -v 0x30783230 foo
  $ getfattr -n user.DOSATTRIB foo
  # file: foo
  user.DOSATTRIB="0x20"

  $

This is crazy, however, for a tool that an admin is supposed to use.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to