xattrs.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Support for extended attributes.
  2. Copyright (C) 2006-2019 Free Software Foundation, Inc.
  3. This file is part of GNU tar.
  4. GNU tar is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. GNU tar is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. Written by James Antill, on 2006-07-27. */
  15. #ifndef GUARD_XATTTRS_H
  16. #define GUARD_XATTTRS_H
  17. /* Add include/exclude fnmatch pattern for xattr key domain. Set INCL parameter
  18. to true/false if you want to add include/exclude pattern */
  19. extern void xattrs_mask_add (const char *mask, bool incl);
  20. /* clear helping structures when tar finishes */
  21. extern void xattrs_clear_setup (void);
  22. extern void xattrs_acls_get (int parentfd, char const *file_name,
  23. struct tar_stat_info *st, int fd, int xisfile);
  24. extern void xattrs_selinux_get (int parentfd, char const *file_name,
  25. struct tar_stat_info *st, int fd);
  26. extern void xattrs_xattrs_get (int parentfd, char const *file_name,
  27. struct tar_stat_info *st, int fd);
  28. extern void xattrs_acls_set (struct tar_stat_info const *st,
  29. char const *file_name, char typeflag);
  30. extern void xattrs_selinux_set (struct tar_stat_info const *st,
  31. char const *file_name, char typeflag);
  32. extern void xattrs_xattrs_set (struct tar_stat_info const *st,
  33. char const *file_name, char typeflag,
  34. int later_run);
  35. extern void xattrs_print_char (struct tar_stat_info const *st, char *output);
  36. extern void xattrs_print (struct tar_stat_info const *st);
  37. #endif /* GUARD_XATTTRS_H */