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