|
Packit Service |
1d0348 |
ARCHIVE_ENTRY_PERMS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PERMS(3)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
NAME
|
|
Packit Service |
1d0348 |
archive_entry_gid, archive_entry_set_gid, archive_entry_uid,
|
|
Packit Service |
1d0348 |
archive_entry_set_uid, archive_entry_perm, archive_entry_set_perm,
|
|
Packit Service |
1d0348 |
archive_entry_strmode, archive_entry_uname, archive_entry_uname_w,
|
|
Packit Service |
1d0348 |
archive_entry_set_uname, archive_entry_copy_uname,
|
|
Packit Service |
1d0348 |
archive_entry_copy_uname_w, archive_entry_update_uname_utf8,
|
|
Packit Service |
1d0348 |
archive_entry_gname, archive_entry_gname_w, archive_entry_set_gname,
|
|
Packit Service |
1d0348 |
archive_entry_copy_gname, archive_entry_copy_gname_w,
|
|
Packit Service |
1d0348 |
archive_entry_update_gname_utf8, archive_entry_fflags,
|
|
Packit Service |
1d0348 |
archive_entry_fflags_text, archive_entry_set_fflags,
|
|
Packit Service |
1d0348 |
archive_entry_copy_fflags_text, archive_entry_copy_fflags_text_w — func‐
|
|
Packit Service |
1d0348 |
tions for manipulating ownership and permissions in archive entry
|
|
Packit Service |
1d0348 |
descriptions
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
LIBRARY
|
|
Packit Service |
1d0348 |
Streaming Archive Library (libarchive, -larchive)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
SYNOPSIS
|
|
Packit Service |
1d0348 |
#include <archive_entry.h>
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
gid_t
|
|
Packit Service |
1d0348 |
archive_entry_gid(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_gid(struct archive_entry *a, gid_t gid);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
uid_t
|
|
Packit Service |
1d0348 |
archive_entry_uid(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_uid(struct archive_entry *a, uid_t uid);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
mode_t
|
|
Packit Service |
1d0348 |
archive_entry_perm(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_perm(struct archive_entry *a, mode_t mode);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const char *
|
|
Packit Service |
1d0348 |
archive_entry_strmode(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const char *
|
|
Packit Service |
1d0348 |
archive_entry_gname(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const wchar_t *
|
|
Packit Service |
1d0348 |
archive_entry_gname_w(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_gname(struct archive_entry *a, const char *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_copy_gname(struct archive_entry *a, const char *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_copy_gname_w(struct archive_entry *a, const wchar_t *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_entry_update_gname_utf8(struct archive_entry *a,
|
|
Packit Service |
1d0348 |
const char *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const char *
|
|
Packit Service |
1d0348 |
archive_entry_uname(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const wchar_t *
|
|
Packit Service |
1d0348 |
archive_entry_uname_w(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_uname(struct archive_entry *a, const char *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_copy_uname(struct archive_entry *a, const char *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_copy_uname_w(struct archive_entry *a, const wchar_t *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_entry_update_uname_utf8(struct archive_entry *a,
|
|
Packit Service |
1d0348 |
const char *name);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_fflags(struct archive_entry *a, unsigned long *set_bits,
|
|
Packit Service |
1d0348 |
unsigned long *clear_bits);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const char *
|
|
Packit Service |
1d0348 |
archive_entry_fflags_text(struct archive_entry *a);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_entry_set_fflags(struct archive_entry *a, unsigned long set_bits,
|
|
Packit Service |
1d0348 |
unsigned long clear_bits);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const char *
|
|
Packit Service |
1d0348 |
archive_entry_copy_fflags_text(struct archive_entry *a,
|
|
Packit Service |
1d0348 |
const char *text);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
const wchar_t *
|
|
Packit Service |
1d0348 |
archive_entry_copy_fflags_text_w(struct archive_entry *a,
|
|
Packit Service |
1d0348 |
const wchar_t *text);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
DESCRIPTION
|
|
Packit Service |
1d0348 |
User id, group id and mode
|
|
Packit Service |
1d0348 |
The functions archive_entry_uid(), archive_entry_gid(), and
|
|
Packit Service |
1d0348 |
archive_entry_perm() can be used to extract the user id, group id and
|
|
Packit Service |
1d0348 |
permission from the given entry. The corresponding functions
|
|
Packit Service |
1d0348 |
archive_entry_set_uid(), archive_entry_set_gid(), and
|
|
Packit Service |
1d0348 |
archive_entry_set_perm() store the given user id, group id and permission
|
|
Packit Service |
1d0348 |
in the entry. The permission is also set as side effect of calling
|
|
Packit Service |
1d0348 |
archive_entry_set_mode().
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_entry_strmode() returns a string representation of the permission
|
|
Packit Service |
1d0348 |
as used by the long mode of ls(1).
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
User and group name
|
|
Packit Service |
1d0348 |
User and group names can be provided in one of three different ways:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
char * Multibyte strings in the current locale.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
wchar_t * Wide character strings in the current locale. The accessor
|
|
Packit Service |
1d0348 |
functions are named XXX_w().
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
UTF-8 Unicode strings encoded as UTF-8. This are convience func‐
|
|
Packit Service |
1d0348 |
tions to update both the multibyte and wide character strings
|
|
Packit Service |
1d0348 |
at the same time.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_entry_set_XXX() is an alias for archive_entry_copy_XXX().
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
File Flags
|
|
Packit Service |
1d0348 |
File flags are transparently converted between a bitmap representation
|
|
Packit Service |
1d0348 |
and a textual format. For example, if you set the bitmap and ask for
|
|
Packit Service |
1d0348 |
text, the library will build a canonical text format. However, if you
|
|
Packit Service |
1d0348 |
set a text format and request a text format, you will get back the same
|
|
Packit Service |
1d0348 |
text, even if it is ill-formed. If you need to canonicalize a textual
|
|
Packit Service |
1d0348 |
flags string, you should first set the text form, then request the bitmap
|
|
Packit Service |
1d0348 |
form, then use that to set the bitmap form. Setting the bitmap format
|
|
Packit Service |
1d0348 |
will clear the internal text representation and force it to be recon‐
|
|
Packit Service |
1d0348 |
structed when you next request the text form.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
The bitmap format consists of two integers, one containing bits that
|
|
Packit Service |
1d0348 |
should be set, the other specifying bits that should be cleared. Bits
|
|
Packit Service |
1d0348 |
not mentioned in either bitmap will be ignored. Usually, the bitmap of
|
|
Packit Service |
1d0348 |
bits to be cleared will be set to zero. In unusual circumstances, you
|
|
Packit Service |
1d0348 |
can force a fully-specified set of file flags by setting the bitmap of
|
|
Packit Service |
1d0348 |
flags to clear to the complement of the bitmap of flags to set. (This
|
|
Packit Service |
1d0348 |
differs from fflagstostr(3), which only includes names for set bits.)
|
|
Packit Service |
1d0348 |
Converting a bitmap to a textual string is a platform-specific operation;
|
|
Packit Service |
1d0348 |
bits that are not meaningful on the current platform will be ignored.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
The canonical text format is a comma-separated list of flag names. The
|
|
Packit Service |
1d0348 |
archive_entry_copy_fflags_text() and archive_entry_copy_fflags_text_w()
|
|
Packit Service |
1d0348 |
functions parse the provided text and sets the internal bitmap values.
|
|
Packit Service |
1d0348 |
This is a platform-specific operation; names that are not meaningful on
|
|
Packit Service |
1d0348 |
the current platform will be ignored. The function returns a pointer to
|
|
Packit Service |
1d0348 |
the start of the first name that was not recognized, or NULL if every
|
|
Packit Service |
1d0348 |
name was recognized. Note that every name — including names that follow
|
|
Packit Service |
1d0348 |
an unrecognized name — will be evaluated, and the bitmaps will be set to
|
|
Packit Service |
1d0348 |
reflect every name that is recognized. (In particular, this differs from
|
|
Packit Service |
1d0348 |
strtofflags(3), which stops parsing at the first unrecognized name.)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
SEE ALSO
|
|
Packit Service |
1d0348 |
archive_entry(3), archive_entry_acl(3), archive_read_disk(3),
|
|
Packit Service |
1d0348 |
archive_write_disk(3) libarchive(3),
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
BUGS
|
|
Packit Service |
1d0348 |
The platform types uid_t and gid_t are often 16 or 32 bit wide. In this
|
|
Packit Service |
1d0348 |
case it is possible that the ids can not be correctly restored from ar‐
|
|
Packit Service |
1d0348 |
chives and get truncated.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
BSD February 2, 2012 BSD
|