Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extended file attributes via SFTP. #271

Merged
merged 50 commits into from
Apr 22, 2016
Merged

Support extended file attributes via SFTP. #271

merged 50 commits into from
Apr 22, 2016

Commits on Mar 25, 2016

  1. Configuration menu
    Copy the full SHA
    96546e7 View commit details
    Browse the repository at this point in the history
  2. Try to build properly where no l*xattr() functions exists, AND the

    XATTR_NOFOLLOW flag is not defined.
    Castaglia committed Mar 25, 2016
    Configuration menu
    Copy the full SHA
    e7381e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb4092c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    775fc3b View commit details
    Browse the repository at this point in the history
  5. Support f*xattr variants, for operating on open file handles. Remove the

    unimplemented getxattrs extended request, for now.
    Castaglia committed Mar 25, 2016
    Configuration menu
    Copy the full SHA
    0ef68c0 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2016

  1. Adding markers in the code for properly supporting extended attribute…

    …s for
    
    protocol version 6 sessions.
    Castaglia committed Mar 31, 2016
    Configuration menu
    Copy the full SHA
    01aad96 View commit details
    Browse the repository at this point in the history
  2. Make it possible to handle more/larger xattrs, even if via recompile.…

    … This
    
    is easier than requiring patching.
    Castaglia committed Mar 31, 2016
    Configuration menu
    Copy the full SHA
    0644169 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    564fdd7 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2016

  1. Configuration menu
    Copy the full SHA
    85cbe3d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5bd9735 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed9ee0d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fc1b39e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    41684df View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2016

  1. Threading the xattr support through more of the request handlers, and…

    … adding
    
    two new SFTPOptions for ignoring xattrs on SETSTAT and OPEN requests, mirroring
    the existing options for ownership/permissions.
    Castaglia committed Apr 13, 2016
    Configuration menu
    Copy the full SHA
    5adcf3a View commit details
    Browse the repository at this point in the history
  2. Move the xattr implementation/handling of the system calls to the FSI…

    …O API,
    
    where they should be.  This involves adding a --disable-xattr configure option,
    expanding the FSIO API and its unit tests, and refactoring the mod_sftp use
    of those calls.
    Castaglia committed Apr 13, 2016
    Configuration menu
    Copy the full SHA
    3acfe32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dbe830d View commit details
    Browse the repository at this point in the history
  4. Check for the attr/xattr.h header for xattrs; it appears that on some…

    … platforms,
    
    this is where the ENODATA/ENOATTR errno values are defined.  Sigh.
    Castaglia committed Apr 13, 2016
    Configuration menu
    Copy the full SHA
    059b376 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2016

  1. Configuration menu
    Copy the full SHA
    d55a2a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f4f225 View commit details
    Browse the repository at this point in the history
  3. Apparently sys/xattr.h needs to be included BEFORE attr/xattr.h, to a…

    …void
    
    issues (one defines the setxattr flag values using an enum, the other uses
    macros; what a mess).
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    e142688 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0049120 View commit details
    Browse the repository at this point in the history
  5. Quell compiler warning.

    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    a658dcd View commit details
    Browse the repository at this point in the history
  6. Quell compiler warning.

    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    4299fac View commit details
    Browse the repository at this point in the history
  7. Gracefully handle where ENOATTR and ENODATA are defined to the be sam…

    …e value;
    
    this causes build failures with some picky/strict compiler flags.
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    fe4a84a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c1ebd01 View commit details
    Browse the repository at this point in the history
  9. Typos.

    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    06f5465 View commit details
    Browse the repository at this point in the history
  10. Needed to handle the (very) different xattr implementation in *BSDs, …

    …which
    
    rippled through the entire API.  Almost ready.
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    06f28c8 View commit details
    Browse the repository at this point in the history
  11. By using a buffer structure, we allow for READDIR responses large enough

    to contain all of the xattrs for a file.  This required some refactoring,
    to allow for possible resizing of the READDIR response buffer.
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    7fd3d16 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    546b327 View commit details
    Browse the repository at this point in the history
  13. Typo in configure script.

    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    2c4099b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    94f70fa View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9385794 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    19c7e3f View commit details
    Browse the repository at this point in the history
  17. We only need to translate the FSIO setxattr flags on systems where <s…

    …ys/xattr.h>
    
    is used, not where <sys/extattr.h> is used (i.e. BSDs).
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    eba86ba View commit details
    Browse the repository at this point in the history
  18. Quell compiler warning.

    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    ee8419f View commit details
    Browse the repository at this point in the history
  19. Fix more of the autoconf detection for xattr-related functions; we ne…

    …ed to
    
    link, not just compile, to perfectly detect their presence.  Silly compilers.
    Castaglia committed Apr 14, 2016
    Configuration menu
    Copy the full SHA
    1f92164 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2016

  1. Start honoring the flags field in e.g. STAT/LSTAT requests. For READL…

    …INK and
    
    READDIR requests, though, a set of attribute flags had to be assumed, as
    those requests do not have a flags field defined.
    Castaglia committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    4940d68 View commit details
    Browse the repository at this point in the history
  2. Include the ATTR_LINK_COUNT attribute in READDIR requests, but NOT

    ATTR_EXTENDED, as some clients (e.g. lftp) choke on those in FXP_NAMEs in a
    READDIR response.
    Castaglia committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    03db126 View commit details
    Browse the repository at this point in the history
  3. Actually, we CAN include ATTR_EXTENDED in READDIR responses. We simpl…

    …y need
    
    to make sure that if no xattrs are found, we still include the xattr count
    (i.e. of zero).
    Castaglia committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    85af5a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f1e3817 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9e2a5e3 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2016

  1. Make sure that we read in ATTR_EXTENDED regardless of SFTP protocol v…

    …ersion,
    
    rather than just for protocol version 4 and higher; they are defined for
    protocol version 3 as well.
    Castaglia committed Apr 16, 2016
    Configuration menu
    Copy the full SHA
    17f8d00 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82bac30 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2016

  1. Make sure that we properly honor ENODATA and ENOATTR, even if both ar…

    …e defined
    
    and use the same value.
    Castaglia committed Apr 17, 2016
    Configuration menu
    Copy the full SHA
    0df7898 View commit details
    Browse the repository at this point in the history
  2. Fix the SFTPOption names for xattrs, and update the code/log messages to

    match.  Make sure those new SFTPOptions are documented.
    Castaglia committed Apr 17, 2016
    Configuration menu
    Copy the full SHA
    443dab8 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2016

  1. Configuration menu
    Copy the full SHA
    fdabb79 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2016

  1. Configuration menu
    Copy the full SHA
    e9e6ed6 View commit details
    Browse the repository at this point in the history
  2. Make sure that any xattrs on the source file are copied to the destin…

    …ation
    
    file by the pr_fs_copy_file() function.
    Castaglia committed Apr 19, 2016
    Configuration menu
    Copy the full SHA
    63a0abf View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2016

  1. Provide a way to disable xattr support (e.g. in the face of buggy cli…

    …ents) via
    
    a new FSOptions directive.
    Castaglia committed Apr 20, 2016
    Configuration menu
    Copy the full SHA
    9162383 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2016

  1. Configuration menu
    Copy the full SHA
    1e33272 View commit details
    Browse the repository at this point in the history