[Bug 1953] Implementation of xattr in sftp-server for sshfs

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Apr 19 03:18:20 AEST 2016


TJ Saunders <tj at castaglia.org> changed:

           What    |Removed                     |Added
                 CC|                            |tj at castaglia.org

--- Comment #6 from TJ Saunders <tj at castaglia.org> ---
Instead of using custom SFTP extensions for xattr functionality,
another approach you might consider, protocol-wise, is the use of the
SSH_FILEXFER_ATTR_EXTENDED flag of the ATTRS structure, which is part
of SFTP protocol version 3 (and earlier); see:


SFTP clients can send xattrs as ATTR_EXTENDED key/value pairs in
SETSTAT/FSETSTAT requests; OpenSSH should send the xattrs in READDIR
and STAT et al requests the same way.

This would still require patching OpenSSH's SFTP server to use the
platform-specific extended attribute APIs (extattr(9) for BSDs,
xattr(8) for Linux, with Mac providing something similar to Linux but
with different function signatures).

It would also leave open the question of how an SFTP client could
_remove_ an extended attribute from a file; the Draft for SFTP does not
provide a way of doing so.  One MIGHT argue for a SETSTAT request that
contains an attribute name with an empty value as a signal that that
extended attribute should be deleted.

With the above approach, xattr support might benefit more existing
clients (and servers) than the approach using custom OpenSSH-specific

You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list