1
.TH ARCHIVE_ENTRY_PERMS 3 "February 22, 2010" ""
4
\fB\%archive_entry_gid\fP,
5
\fB\%archive_entry_set_gid\fP,
6
\fB\%archive_entry_uid\fP,
7
\fB\%archive_entry_set_uid\fP,
8
\fB\%archive_entry_perm\fP,
9
\fB\%archive_entry_set_perm\fP,
10
\fB\%archive_entry_strmode\fP,
11
\fB\%archive_entry_uname\fP
12
\fB\%archive_entry_uname_w\fP
13
\fB\%archive_entry_set_uname\fP,
14
\fB\%archive_entry_copy_uname\fP,
15
\fB\%archive_entry_copy_uname_w\fP,
16
\fB\%archive_entry_update_uname_utf8\fP,
17
\fB\%archive_entry_gname\fP,
18
\fB\%archive_entry_gname_w\fP,
19
\fB\%archive_entry_set_gname\fP,
20
\fB\%archive_entry_copy_gname\fP,
21
\fB\%archive_entry_copy_gname_w\fP,
22
\fB\%archive_entry_update_gname_utf8\fP,
23
\fB\%archive_entry_fflags\fP,
24
\fB\%archive_entry_fflags_text\fP,
25
\fB\%archive_entry_set_fflags\fP,
26
\fB\%archive_entry_copy_fflags_text\fP,
27
\fB\%archive_entry_copy_fflags_text_w\fP
28
\- functions for manipulating ownership and permissions in archive entry descriptions
31
\fB#include <archive_entry.h>\fP
35
\fB\%archive_entry_gid\fP(\fI\%struct\ archive_entry\ *a\fP);
39
\fB\%archive_entry_set_gid\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%gid_t\ gid\fP);
43
\fB\%archive_entry_uid\fP(\fI\%struct\ archive_entry\ *a\fP);
47
\fB\%archive_entry_set_uid\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%uid_t\ uid\fP);
51
\fB\%archive_entry_perm\fP(\fI\%struct\ archive_entry\ *a\fP);
55
\fB\%archive_entry_set_perm\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%mode_t\ mode\fP);
59
\fB\%archive_entry_strmode\fP(\fI\%struct\ archive_entry\ *a\fP);
63
\fB\%archive_entry_gname\fP(\fI\%struct\ archive_entry\ *a\fP);
67
\fB\%archive_entry_gname_w\fP(\fI\%struct\ archive_entry\ *a\fP);
71
\fB\%archive_entry_set_gname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *a\fP);
75
\fB\%archive_entry_copy_gname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
79
\fB\%archive_entry_copy_gname_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *name\fP);
83
\fB\%archive_entry_update_gname_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
87
\fB\%archive_entry_uname\fP(\fI\%struct\ archive_entry\ *a\fP);
91
\fB\%archive_entry_uname_w\fP(\fI\%struct\ archive_entry\ *a\fP);
95
\fB\%archive_entry_set_uname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
99
\fB\%archive_entry_copy_uname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
103
\fB\%archive_entry_copy_uname_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *name\fP);
107
\fB\%archive_entry_update_uname_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
111
\fB\%archive_entry_fflags\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ long\ *set_bits\fP, \fI\%unsigned\ long\ *clear_bits\fP);
115
\fB\%archive_entry_fflags_text\fP(\fI\%struct\ archive_entry\ *a\fP);
119
\fB\%archive_entry_set_fflags\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ long\ set_bits\fP, \fI\%unsigned\ long\ clear_bits\fP);
123
\fB\%archive_entry_copy_fflags_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *text\fP);
125
\fIconst wchar_t *\fP
127
\fB\%archive_entry_copy_fflags_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *text\fP);
130
.SS User id, group id and mode
132
\fB\%archive_entry_uid\fP(),
133
\fB\%archive_entry_gid\fP(),
135
\fB\%archive_entry_perm\fP()
136
can be used to extract the user id, group id and permission from the given entry.
137
The corresponding functions
138
\fB\%archive_entry_set_uid\fP(),
139
\fB\%archive_entry_set_gid\fP(),
141
\fB\%archive_entry_set_perm\fP()
142
store the given user id, group id and permission in the entry.
143
The permission is also set as side effect of calling
144
\fB\%archive_entry_set_mode\fP().
146
\fB\%archive_entry_strmode\fP()
147
returns a string representation of the permission as used by the long mode of
149
.SS User and group name
150
User and group names can be provided in one of three different ways:
154
Multibyte strings in the current locale.
157
Wide character strings in the current locale.
158
The accessor functions are named
162
Unicode strings encoded as UTF-8.
163
This are convience functions to update both the multibyte and wide
164
character strings at the same time.
167
\fB\%archive_entry_set_XXX\fP()
169
\fB\%archive_entry_copy_XXX\fP().
171
File flags are transparently converted between a bitmap
172
representation and a textual format.
173
For example, if you set the bitmap and ask for text, the library
174
will build a canonical text format.
175
However, if you set a text format and request a text format,
176
you will get back the same text, even if it is ill-formed.
177
If you need to canonicalize a textual flags string, you should first set the
178
text form, then request the bitmap form, then use that to set the bitmap form.
179
Setting the bitmap format will clear the internal text representation
180
and force it to be reconstructed when you next request the text form.
182
The bitmap format consists of two integers, one containing bits
183
that should be set, the other specifying bits that should be
185
Bits not mentioned in either bitmap will be ignored.
186
Usually, the bitmap of bits to be cleared will be set to zero.
187
In unusual circumstances, you can force a fully-specified set
188
of file flags by setting the bitmap of flags to clear to the complement
189
of the bitmap of flags to set.
191
\fBfflagstostr\fP(3),
192
which only includes names for set bits.)
193
Converting a bitmap to a textual string is a platform-specific
194
operation; bits that are not meaningful on the current platform
197
The canonical text format is a comma-separated list of flag names.
199
\fB\%archive_entry_copy_fflags_text\fP()
201
\fB\%archive_entry_copy_fflags_text_w\fP()
202
functions parse the provided text and sets the internal bitmap values.
203
This is a platform-specific operation; names that are not meaningful
204
on the current platform will be ignored.
205
The function returns a pointer to the start of the first name that was not
206
recognized, or NULL if every name was recognized.
207
Note that every name \(em including names that follow an unrecognized
208
name \(em will be evaluated, and the bitmaps will be set to reflect
209
every name that is recognized.
210
(In particular, this differs from
211
\fBstrtofflags\fP(3),
212
which stops parsing at the first unrecognized name.)
216
\fBarchive_entry\fP(3),
217
\fBarchive_entry_acl\fP(3),
218
\fBarchive_read_disk\fP(3),
219
\fBarchive_write_disk\fP(3)
226
are often 16 or 32 bit wide.
227
In this case it is possible that the ids can not be correctly restored
228
from archives and get truncated.