Add basic suuport for extended attributes.
[tar.git] / src / xattrs.h
blob0c08cd787749c29ab46dd7e0ee6b6f0a42aa0599
1 #ifndef GUARD_XATTTRS_H
2 #define GUARD_XATTTRS_H
4 /* Support for extended attributes.
6 Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
7 Foundation, Inc.
9 Written by James Antill, on 2006-07-27.
11 This program is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2, or (at your option) any later
14 version.
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 Public License for more details.
21 You should have received a copy of the GNU General Public License along
22 with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 /* Add include/exclude fnmatch pattern for xattr key domain. Set INCL parameter
28 to true/false if you want to add include/exclude pattern */
29 extern void xattrs_mask_add (const char *mask, bool incl);
31 /* clear helping structures when tar finishes */
32 extern void xattrs_clear_setup ();
34 extern void xattrs_acls_get (int parentfd, char const *file_name,
35 struct tar_stat_info *st, int fd, int xisfile);
36 extern void xattrs_selinux_get (int parentfd, char const *file_name,
37 struct tar_stat_info *st, int fd);
38 extern void xattrs_xattrs_get (int parentfd, char const *file_name,
39 struct tar_stat_info *st, int fd);
41 extern void xattrs_acls_set (struct tar_stat_info const *st,
42 char const *file_name, char typeflag);
43 extern void xattrs_selinux_set (struct tar_stat_info const *st,
44 char const *file_name, char typeflag);
45 extern void xattrs_xattrs_set (struct tar_stat_info const *st,
46 char const *file_name, char typeflag,
47 int later_run);
49 extern void xattrs_print_char (struct tar_stat_info const *st, char *output);
50 extern void xattrs_print (struct tar_stat_info const *st);
52 #endif /* GUARD_XATTTRS_H */