summaryrefslogtreecommitdiff
path: root/include/ntfs-3g/xattrs.h (plain)
blob: 515831142e5030f040ce6e555b1445fa78139c3e
1/*
2 * xattrs.h : definitions related to system extended attributes
3 *
4 * Copyright (c) 2010 Jean-Pierre Andre
5 *
6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program/include file is distributed in the hope that it will be
12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program (in the main directory of the NTFS-3G
18 * distribution in the file COPYING); if not, write to the Free Software
19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef _NTFS_XATTR_H_
23#define _NTFS_XATTR_H_
24
25/*
26 * Identification of data mapped to the system name space
27 */
28
29enum SYSTEMXATTRS {
30 XATTR_UNMAPPED,
31 XATTR_NTFS_ACL,
32 XATTR_NTFS_ATTRIB,
33 XATTR_NTFS_ATTRIB_BE,
34 XATTR_NTFS_EFSINFO,
35 XATTR_NTFS_REPARSE_DATA,
36 XATTR_NTFS_OBJECT_ID,
37 XATTR_NTFS_DOS_NAME,
38 XATTR_NTFS_TIMES,
39 XATTR_NTFS_TIMES_BE,
40 XATTR_NTFS_CRTIME,
41 XATTR_NTFS_CRTIME_BE,
42 XATTR_POSIX_ACC,
43 XATTR_POSIX_DEF
44} ;
45
46struct XATTRMAPPING {
47 struct XATTRMAPPING *next;
48 enum SYSTEMXATTRS xattr;
49 char name[1]; /* variable length */
50} ;
51
52#ifdef XATTR_MAPPINGS
53
54struct XATTRMAPPING *ntfs_xattr_build_mapping(ntfs_volume *vol,
55 const char *path);
56void ntfs_xattr_free_mapping(struct XATTRMAPPING*);
57
58#endif /* XATTR_MAPPINGS */
59
60enum SYSTEMXATTRS ntfs_xattr_system_type(const char *name,
61 ntfs_volume *vol);
62
63int ntfs_xattr_system_getxattr(struct SECURITY_CONTEXT *scx,
64 enum SYSTEMXATTRS attr,
65 ntfs_inode *ni, ntfs_inode *dir_ni,
66 char *value, size_t size);
67int ntfs_xattr_system_setxattr(struct SECURITY_CONTEXT *scx,
68 enum SYSTEMXATTRS attr,
69 ntfs_inode *ni, ntfs_inode *dir_ni,
70 const char *value, size_t size, int flags);
71int ntfs_xattr_system_removexattr(struct SECURITY_CONTEXT *scx,
72 enum SYSTEMXATTRS attr,
73 ntfs_inode *ni, ntfs_inode *dir_ni);
74
75#endif /* _NTFS_XATTR_H_ */
76