head 1.10; access; symbols libarchive-3-8-10:1.1.1.8 pkgsrc-2026Q3:1.9.0.16 pkgsrc-2026Q3-base:1.9 libarchive-3-8-9:1.1.1.7 libarchive-3-8-8:1.1.1.7 pkgsrc-2026Q2:1.9.0.14 pkgsrc-2026Q2-base:1.9 libarchive-3-8-7:1.1.1.7 libarchive-3-8-6:1.1.1.7 pkgsrc-2026Q1:1.9.0.12 pkgsrc-2026Q1-base:1.9 libarchive-3-8-5:1.1.1.7 libarchive-3-8-4:1.1.1.7 pkgsrc-2025Q4:1.9.0.10 pkgsrc-2025Q4-base:1.9 libarchive-3-8-3:1.1.1.7 libarchive-3-8-2:1.1.1.7 pkgsrc-2025Q3:1.9.0.8 pkgsrc-2025Q3-base:1.9 libarchive-3-8-1:1.1.1.7 pkgsrc-2025Q2:1.9.0.6 pkgsrc-2025Q2-base:1.9 libarchive-3-8-0:1.1.1.7 libarchive-3-7-9:1.1.1.7 pkgsrc-2025Q1:1.9.0.4 pkgsrc-2025Q1-base:1.9 pkgsrc-2024Q4:1.9.0.2 pkgsrc-2024Q4-base:1.9 libarchive-3-7-7:1.1.1.7 pkgsrc-2024Q3:1.8.0.4 pkgsrc-2024Q3-base:1.8 libarchive-3-7-5:1.1.1.6 pkgsrc-2024Q2:1.8.0.2 pkgsrc-2024Q2-base:1.8 libarchive-3-7-4:1.1.1.6 libarchive-3-7-3:1.1.1.5 pkgsrc-2024Q1:1.7.0.2 pkgsrc-2024Q1-base:1.7 libarchive-3-7-2:1.1.1.5 pkgsrc-2023Q4:1.6.0.30 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.28 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.26 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.24 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.22 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.20 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.18 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.16 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.14 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.12 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.10 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.8 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.6 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.4 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.2 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.5.0.4 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.6 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.2 pkgsrc-2019Q3-base:1.5 libarchive-3-4-0:1.1.1.4 libarchive-3-3-3:1.1.1.3 pkgsrc-2019Q2:1.4.0.18 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.16 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.14 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.12 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.10 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.8 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.6 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.4 pkgsrc-2017Q3-base:1.4 libarchive-3-3-2:1.1.1.3 pkgsrc-2017Q2:1.3.0.4 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.2 pkgsrc-2017Q1-base:1.3 libarchive-3-3-1:1.1.1.2 pkgsrc-2016Q4:1.2.0.6 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.4 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.2 pkgsrc-2016Q2-base:1.2 libarchive-3-2-1:1.1.1.1 KIENTZLE:1.1.1 pkgsrc-2016Q1:1.1.0.10 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.8 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.6 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.4 pkgsrc-2015Q2-base:1.1 pkgsrc-2015Q1:1.1.0.2 pkgsrc-2015Q1-base:1.1; locks; strict; comment @# @; 1.10 date 2026.10.19.12.05.17; author adam; state Exp; branches; next 1.9; commitid R3KJfVxz3NuPb50H; 1.9 date 2024.10.19.05.39.57; author adam; state Exp; branches; next 1.8; commitid fYRSlpIWMYluweuF; 1.8 date 2024.04.30.06.05.19; author adam; state Exp; branches; next 1.7; commitid id0E8i4RwCC4c88F; 1.7 date 2024.01.18.18.00.15; author adam; state Exp; branches; next 1.6; commitid hNXpsHx3SuHqsXUE; 1.6 date 2020.05.26.09.16.41; author nia; state Exp; branches; next 1.5; commitid nNhsdZACz3PjmJ9C; 1.5 date 2019.09.22.09.55.08; author joerg; state Exp; branches; next 1.4; commitid FdPvRjF4OzwBwZDB; 1.4 date 2017.08.01.22.26.23; author joerg; state Exp; branches; next 1.3; commitid 32clTfkmVE8bPy1A; 1.3 date 2017.02.25.21.11.19; author joerg; state Exp; branches; next 1.2; commitid rW8QfCWrsCO1snHz; 1.2 date 2016.06.20.17.24.57; author joerg; state Exp; branches; next 1.1; commitid ArUvympBjfBseebz; 1.1 date 2015.01.17.12.44.49; author adam; state Exp; branches 1.1.1.1; next ; commitid yy7e1hLrfmA2pn6y; 1.1.1.1 date 2016.06.20.17.12.01; author joerg; state Exp; branches; next 1.1.1.2; commitid rRgm3BqbmbI8aebz; 1.1.1.2 date 2017.02.25.20.54.13; author joerg; state Exp; branches; next 1.1.1.3; commitid ReqPI0ibLYjdmnHz; 1.1.1.3 date 2017.08.01.22.21.12; author joerg; state Exp; branches; next 1.1.1.4; commitid XQwPAFJku336Ny1A; 1.1.1.4 date 2019.09.22.09.51.33; author joerg; state Exp; branches; next 1.1.1.5; commitid 5kDbfPbiV3INvZDB; 1.1.1.5 date 2024.01.18.17.37.45; author adam; state Exp; branches; next 1.1.1.6; commitid zDULEPUODGjTkXUE; 1.1.1.6 date 2024.04.30.05.50.49; author adam; state Exp; branches; next 1.1.1.7; commitid e4DnFoZdQV9Z688F; 1.1.1.7 date 2024.10.19.05.27.34; author adam; state Exp; branches; next 1.1.1.8; commitid v1iXM4j1Na52seuF; 1.1.1.8 date 2026.10.19.11.50.40; author adam; state Exp; branches; next ; commitid eS0MvMrTxXQX650H; desc @@ 1.10 log @libarchive: updated to 3.8.10 3.8.10 New features: 7z: add Delta, RISCV, ARMTHUMB and IA64 filters for non-lzma archives libarchive: support digest with nettle 4 and mbedtls 3 tar: add --mode option Security and Bug Fixes see ChangeLog @ text @4mARCHIVE_ENTRY_ACL24m(3) Library Functions Manual 4mARCHIVE_ENTRY_ACL24m(3) 1mNAME0m archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, archive_entry_acl_next, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions 1mLIBRARY0m Streaming Archive Library (libarchive, -larchive) 1mSYNOPSIS0m 1m#include 0m 4mvoid0m 1marchive_entry_acl_add_entry22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mchar24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_add_entry_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mwchar_t24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_clear22m(4mstruct24m 4marchive_entry24m 4m*a24m); 4mint0m 1marchive_entry_acl_count22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_next22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mchar24m 4m**ret_name24m); 4mint0m 1marchive_entry_acl_reset22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mchar24m 4m*0m 1marchive_entry_acl_to_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mwchar_t24m 4m*0m 1marchive_entry_acl_to_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mint0m 1marchive_entry_acl_types22m(4mstruct24m 4marchive_entry24m 4m*a24m); 1mDESCRIPTION0m The “Access Control Lists (ACLs)” extend the standard Unix permission model. The ACL interface of 1mlibarchive 22msupports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. 1mPOSIX.1e Access Control Lists0m A POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the 4mpermset24m are: ARCHIVE_ENTRY_ACL_READ (1mr22m) ARCHIVE_ENTRY_ACL_WRITE (1mw22m) ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) The permissions correspond to the normal Unix permissions. The 4mtag24m specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be ob‐ tained via group permissions. ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file owner or a member of the owning group. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Di‐ rectories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly-created directory en‐ tries. 1mNFSv4 Access Control Lists0m An NFSv4 ACL consists of multiple individual entries called Access Con‐ trol Entries (ACEs). There are four possible types of an NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permis‐ sions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require given permissions. The 4mtag24m specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the 4mname24m string and optionally the user or group ID in the 4mqualifier24m integer. NFSv4 ACE permissions and flags are stored in the same 4mpermset24m bit‐ field. Some permissions share the same constant and permission charac‐ ter but have different effect on directories than on files. The fol‐ lowing ACE permissions are supported: ARCHIVE_ENTRY_ACL_READ_DATA (1mr22m) Read data (file). ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (1mr22m) List entries (directory). ARCHIVE_ENTRY_ACL_WRITE_DATA (1mw22m) Write data (file). ARCHIVE_ENTRY_ACL_ADD_FILE (1mw22m) Create files (directory). ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) Execute file or change into a directory. ARCHIVE_ENTRY_ACL_APPEND_DATA (1mp22m) Append data (file). ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (1mp22m) Create subdirectories (directory). ARCHIVE_ENTRY_ACL_DELETE_CHILD (1mD22m) Remove files and subdirectories inside a directory. ARCHIVE_ENTRY_ACL_DELETE (1md22m) Remove file or directory. ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (1ma22m) Read file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (1mA22m) Write file or directory attributes. ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (1mR22m) Read named file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (1mW22m) Write named file or directory attributes. ARCHIVE_ENTRY_ACL_READ_ACL (1mc22m) Read file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_ACL (1mC22m) Write file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_OWNER (1mo22m) Change owner of a file or directory. ARCHIVE_ENTRY_ACL_SYNCHRONIZE (1ms22m) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (1mf22m) Inherit parent directory ACE to files. ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (1md22m) Inherit parent directory ACE to subdirectories. ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (1mi22m) Only inherit, do not apply the permission on the direc‐ tory itself. ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (1mn22m) Do not propagate inherit flags. Only first-level entries inherit ACLs. ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (1mS22m) Trigger alarm or audit on successful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (1mF22m) Trigger alarm or audit on failed access. ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (1mI22m) Mark that ACE was inherited. 1mFunctions0m 1marchive_entry_acl_add_entry22m() and 1marchive_entry_acl_add_entry_w22m() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. 1marchive_entry_acl_clear22m() removes all ACL entries and resets the enu‐ meration pointer. 1marchive_entry_acl_count22m() counts the ACL entries that have the given type mask. 4mtype24m can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and ARCHIVE_ENTRY_ACL_TYPE_ALLOW ARCHIVE_ENTRY_ACL_TYPE_DENY ARCHIVE_ENTRY_ACL_TYPE_AUDIT ARCHIVE_ENTRY_ACL_TYPE_ALARM for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non- extended ACLs are added. 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() add new (or merge with existing) ACL entries from (wide) text. The argu‐ ment 4mtype24m may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with 1marchive_entry_acl_to_text22m() or respectively 1marchive_entry_acl_to_text_w22m(). Existing ACL entries are preserved. To get a clean new ACL from text 1marchive_entry_acl_clear22m() must be called first. Entries prefixed with “default:” are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless 4mtype24m is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL en‐ tries and entries beginning with the ‘#’ character (comments) are skipped. 1marchive_entry_acl_next22m() returns the next entry of the ACL list. This function may only be called after 1marchive_entry_acl_reset22m() has indi‐ cated the presence of extended ACL entries. 1marchive_entry_acl_reset22m() prepares reading the list of ACL entries with 1marchive_entry_acl_next22m(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be ob‐ tained by 4marchive_entry_mode24m(3) or set using 4mchmod24m(2). Otherwise, the function returns the same value as 1marchive_entry_acl_count22m(). 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the ACL entries for the given type into a (wide) string of ACL entries separated by newline. If the pointer 4mlen_p24m is not NULL, then the func‐ tion shall return the length of the string (not including the NULL terminator) in the location pointed to by 4mlen_p24m. The 4mflag24m argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: ARCHIVE_ENTRY_ACL_TYPE_ACCESS Output access ACLs. ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT Prefix each default ACL entry with the word “default:”. ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs do not contain a double colon. The following flags are effective only on NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_COMPACT Do not output minus characters for unset permissions and flags in NFSv4 ACL permission and flag fields. The following flags are effective on both POSIX.1e and NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Add an additional colon-separated field containing the user or group id. ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. If the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access and default entries are returned and default en‐ tries are prefixed with “default:”. 1marchive_entry_acl_types22m() gets ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. 1mRETURN VALUES0m 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() return the num‐ ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() re‐ turn ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. 1marchive_entry_acl_next22m() returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if 1marchive_entry_acl_reset22m() has not been called first. 1marchive_entry_acl_to_text22m() returns a string representing the ACL en‐ tries matching the given type and flags on success or NULL on error. 1marchive_entry_acl_to_text_w22m() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on er‐ ror. 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. 1mSEE ALSO0m 4marchive_entry24m(3), 4mlibarchive24m(3) Debian February 15, 2017 4mARCHIVE_ENTRY_ACL24m(3) @ 1.9 log @libarchive: updated to 3.7.7 Libarchive 3.7.7 is a bugfix and security release Security fixes: gzip: prevent a hang when processing a malformed gzip inside a gzip tar: don't crash on truncated tar archives tar: fix two leaks in tar header parsing Important bugfixes: 7-zip: read/write symlink paths as UTF-8 cpio: exit with an error code if an entry could not be extracted rar5: report encrypted entries tar: fix truncation of entry pathnames in specific archives windows: fix ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS Libarchive 3.7.6 is a bugfix and security release. This release fixes a tar regression introduced in libarchive 3.7.5 Important bugfixes. tar: clean up linkpath between entries tar: fix memory leaks when processing symlinks or parsing pax headers iso: be more cautious about parsing ISO-9660 timestamps @ text @d99 1 a99 1 A NFSv4 ACL consists of multiple individual entries called Access Con‐ d102 11 a112 10 There are four possible types of a NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ tempts by principal which require given permissions. d225 2 a226 2 1marchive_entry_acl_next22m() return the next entry of the ACL list. This functions may only be called after 1marchive_entry_acl_reset22m() has indi‐ d229 4 a232 4 1marchive_entry_acl_reset22m() prepare reading the list of ACL entries with 1marchive_entry_acl_next22m(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be ob‐ tained by 4marchive_entry_mode24m(3) or set using 4mchmod24m(2). Otherwise, the d235 2 a236 2 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the ACL entries for the given type into a (wide) string of ACL entries d238 2 a239 2 tion shall return the length of the string (not including the NULL terminator) in the location pointed to by 4mlen_p24m. The 4mflag24m argument is d250 1 a250 1 The mask and other ACLs don not contain a double colon. d254 1 a254 1 Do not output minus characters for unset permissions and d259 1 a259 1 Add an additional colon-separated field containing the d264 3 a266 3 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are d270 3 a272 3 1marchive_entry_acl_types22m() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains d276 5 a280 5 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() returns the number of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. d282 2 a283 2 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() re‐ turn ARCHIVE_OK if all entries were successfully parsed and d286 1 a286 1 1marchive_entry_acl_next22m() returns ARCHIVE_OK on success, ARCHIVE_EOF if d290 1 a290 1 1marchive_entry_acl_to_text22m() returns a string representing the ACL en‐ d293 1 a293 1 1marchive_entry_acl_to_text_w22m() returns a wide string representing the d297 1 a297 1 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if @ 1.8 log @libarchive: updated to 3.7.4 Libarchive 3.7.4 is a bugfix and security release Security fixes: rar: Fix OOB in rar e8 filter (CVE-2024-26256) zip: Fix out of boundary access Important bugfixes: 7zip: Limit amount of properties bsdtar: Fix error handling around strtol() usages passphrase: Improve newline handling on Windows passphrase: Never allow empty passwords rar: Fix "File CRC Error" when extracting specific rar4 archives xar: Avoid infinite link loop zip: Update AppleDouble support for directories zstd: Implement core detection @ text @d1 1 a1 1 ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) d3 292 a294 280 NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, archive_entry_acl_next, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions LIBRARY Streaming Archive Library (libarchive, -larchive) SYNOPSIS #include void archive_entry_acl_add_entry(struct archive_entry *a, int type, int permset, int tag, int qualifier, const char *name); void archive_entry_acl_add_entry_w(struct archive_entry *a, int type, int permset, int tag, int qualifier, const wchar_t *name); void archive_entry_acl_clear(struct archive_entry *a); int archive_entry_acl_count(struct archive_entry *a, int type); int archive_entry_acl_from_text(struct archive_entry *a, const char *text, int type); int archive_entry_acl_from_text_w(struct archive_entry *a, const wchar_t *text, int type); int archive_entry_acl_next(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const char **ret_name); int archive_entry_acl_reset(struct archive_entry *a, int type); char * archive_entry_acl_to_text(struct archive_entry *a, ssize_t *len_p, int flags); wchar_t * archive_entry_acl_to_text_w(struct archive_entry *a, ssize_t *len_p, int flags); int archive_entry_acl_types(struct archive_entry *a); DESCRIPTION The “Access Control Lists (ACLs)” extend the standard Unix permission model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. POSIX.1e Access Control Lists A POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the permset are: ARCHIVE_ENTRY_ACL_READ (r) ARCHIVE_ENTRY_ACL_WRITE (w) ARCHIVE_ENTRY_ACL_EXECUTE (x) The permissions correspond to the normal Unix permissions. The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file owner or a member of the owning group. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This spec‐ ifies the permissions required for access to the file itself. Directo‐ ries have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which con‐ trols the initial access ACL for newly-created directory entries. NFSv4 Access Control Lists A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). There are four possible types of a NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions re‐ quiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing ac‐ tions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ tempts by principal which require given permissions. The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the name string and optionally the user or group ID in the qualifier integer. NFSv4 ACE permissions and flags are stored in the same permset bitfield. Some permissions share the same constant and permission character but have different effect on directories than on files. The following ACE permissions are supported: ARCHIVE_ENTRY_ACL_READ_DATA (r) Read data (file). ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (r) List entries (directory). ARCHIVE_ENTRY_ACL_WRITE_DATA (w) Write data (file). ARCHIVE_ENTRY_ACL_ADD_FILE (w) Create files (directory). ARCHIVE_ENTRY_ACL_EXECUTE (x) Execute file or change into a directory. ARCHIVE_ENTRY_ACL_APPEND_DATA (p) Append data (file). ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (p) Create subdirectories (directory). ARCHIVE_ENTRY_ACL_DELETE_CHILD (D) Remove files and subdirectories inside a directory. ARCHIVE_ENTRY_ACL_DELETE (d) Remove file or directory. ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (a) Read file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (A) Write file or directory attributes. ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (R) Read named file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (W) Write named file or directory attributes. ARCHIVE_ENTRY_ACL_READ_ACL (c) Read file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_ACL (C) Write file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_OWNER (o) Change owner of a file or directory. ARCHIVE_ENTRY_ACL_SYNCHRONIZE (s) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (f) Inherit parent directory ACE to files. ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (d) Inherit parent directory ACE to subdirectories. ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (i) Only inherit, do not apply the permission on the directory itself. ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (n) Do not propagate inherit flags. Only first-level entries inherit ACLs. ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S) Trigger alarm or audit on successful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (F) Trigger alarm or audit on failed access. ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (I) Mark that ACE was inherited. Functions archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ tion pointer. archive_entry_acl_count() counts the ACL entries that have the given type mask. type can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and ARCHIVE_ENTRY_ACL_TYPE_ALLOW ARCHIVE_ENTRY_ACL_TYPE_DENY ARCHIVE_ENTRY_ACL_TYPE_AUDIT ARCHIVE_ENTRY_ACL_TYPE_ALARM for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-ex‐ tended ACLs are added. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() add new (or merge with existing) ACL entries from (wide) text. The argument type may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with archive_entry_acl_to_text() or respectively archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with “default:” are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries and entries beginning with the ‘#’ character (comments) are skipped. archive_entry_acl_next() return the next entry of the ACL list. This functions may only be called after archive_entry_acl_reset() has indi‐ cated the presence of extended ACL entries. archive_entry_acl_reset() prepare reading the list of ACL entries with archive_entry_acl_next(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function re‐ turns the same value as archive_entry_acl_count(). archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the ACL entries for the given type into a (wide) string of ACL entries sepa‐ rated by newline. If the pointer len_p is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by len_p. The flag argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: ARCHIVE_ENTRY_ACL_TYPE_ACCESS Output access ACLs. ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT Prefix each default ACL entry with the word “default:”. ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs don not contain a double colon. The following flags are effective only on NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_COMPACT Do not output minus characters for unset permissions and flags in NFSv4 ACL permission and flag fields. The following flags are effective on both POSIX.1e and NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Add an additional colon-separated field containing the user or group id. ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are re‐ turned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec‐ ified, both access and default entries are returned and default entries are prefixed with “default:”. archive_entry_acl_types() get ACL entry types contained in an archive en‐ try's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this func‐ tion is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. RETURN VALUES archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one ex‐ tended ACL entry exists, the three classic Unix permissions are counted. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() return ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. archive_entry_acl_next() returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has not been called first. archive_entry_acl_to_text() returns a string representing the ACL entries matching the given type and flags on success or NULL on error. archive_entry_acl_to_text_w() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on error. d296 2 a297 2 archive_entry_acl_types() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. d299 2 a300 2 SEE ALSO archive_entry(3), libarchive(3) d302 1 a302 1 BSD February 15, 2017 BSD @ 1.7 log @libarchive: updated to 3.7.2 Libarchive 3.7.2 is a security, bugfix and feature release. Security fixes: Multiple vulnerabilities have been fixed in the PAX writer (1b4e0d0) Important bugfixes: bsdunzip(1) now correctly handles arguments following an -x after the zipfile New features: bsdunzip(1) now supports the "--version" flag 7-zip reader now translates Windows permissions into UNIX permissions uudecode filter in raw mode now supports file name and file mode zstd filter now supports the "long" write option Libarchive 3.7.1 is a security, feature and bugfix release. Security fixes: SEGV and stack buffer overflow in verbose mode of cpio Feature updates: bsdunzip updated to match latest upstream code Important bugfixes: miscellaneous functional bugfixes build fixes on multiple platforms Libarchive 3.7.0 is a feature and bugfix release. New features: bsdunzip: new tool ported from FreeBSD drop-in replacement for Info-ZIP unzip, not yet ported for Windows 7zip reader: support for Zstandard compression 7zip reader: support for ARM64 filter zstd filter: support for multi-frame zstd archives Other notable bugfixes and improvements: pax: fix year 2038 problem on platforms with 64-bit time_t Windows: Universal Windows Platform (UWP) fixes and improvements Windows: bcrypt usage fixes and improvements Windows: time function usage fixes and improvements @ text @d241 1 a241 1 The following flags are effecive only on NFSv4 ACL: @ 1.6 log @libarchive: Update to 3.4.3 Libarchive 3.4.3 is a feature and bugfix release. New features: support for pzstd compressed files (#1357) support for RHT.security.selinux tar extended attribute (#1348) Important bugfixes: various zstd fixes and improvements (#1342 #1352 #1359) child process handling fixes (#1372) Libarchive 3.4.2 is a feature and security release. New features: support for atomic file extraction (bsdtar -x --safe-writes) (#1289) support for mbed TLS (PolarSSL) (#1301) Important bugfixes: security fixes in RAR5 reader (#1280 #1326) compression buffer fix in XAR writer (#1317) fix uname and gname longer than 32 characters in PAX writer (#1319) fix segfault when archiving hard links in ISO9660 and XAR writers (#1325) fix support for extracting 7z archive entries with Delta filter (#987) Libarchive 3.4.1 is a feature and security release. New features: Unicode filename support for reading lha/lzh archives New pax write option "xattrhdr" Important bugfixes: security fixes in wide string processing (#1276 #1298) security fixes in RAR5 reader (#1212 #1217 #1296) security fixes and optimizations to write filter logic (#351) security fix related to use of readlink(2) (1dae5a5) sparse file handling fixes (#1218 #1260) Thanks to all contributors and bug reporters. Special thanks to Christos Zoulas (@@zoulasc) from NetBSD for the atomic file extraction feature. @ text @d9 2 a10 2 archive_entry_acl_types -- functions for manipulating Access Control Lists in archive entry descriptions d60 1 a60 1 The ``Access Control Lists (ACLs)'' extend the standard Unix permission d89 3 a91 3 All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This spec- ifies the permissions required for access to the file itself. Directo- ries have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which con- d99 4 a102 4 ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. d105 2 a106 2 ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require d185 1 a185 1 archive_entry_acl_clear() removes all ACL entries and resets the enumera- d198 2 a199 2 included and at least one extended ACL entry is found, the three non- extended ACLs are added. d209 2 a210 2 preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with ``default:'' are treated as d213 1 a213 1 and entries beginning with the '#' character (comments) are skipped. d216 1 a216 1 functions may only be called after archive_entry_acl_reset() has indi- d221 3 a223 3 are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as archive_entry_acl_count(). d226 1 a226 1 ACL entries for the given type into a (wide) string of ACL entries sepa- d237 1 a237 1 Prefix each default ACL entry with the word ``default:''. d253 3 a255 3 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec- d257 1 a257 1 are prefixed with ``default:''. d259 3 a261 3 archive_entry_acl_types() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains d265 4 a268 5 archive_entry_acl_count() and archive_entry_acl_reset() returns the num- ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. @ 1.5 log @Update for libarchive-3.4.0: - improvements for Android APK and JAR archives - better support for non-recursive list and extract - tar --exclude-vcs support - fixes for file attributes and flags handling - zipx support - rar 5.0 reader @ text @d7 4 a10 4 archive_entry_acl_next, archive_entry_acl_next_w, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for ma‐ nipulating Access Control Lists in archive entry descriptions a45 5 archive_entry_acl_next_w(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const wchar_t **ret_name); int d60 1 a60 1 The “Access Control Lists (ACLs)” extend the standard Unix perssion d62 2 a63 2 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. d67 2 a68 2 specifies the permission set as bitmask of basic permissions. Valid per‐ missions in the permset are: d78 2 a79 2 ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. d82 2 a83 2 ARCHIVE_ENTRY_ACL_OTHER Any principal who is not file owner or a member of the owning group. d89 4 a92 4 All files with have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Direc‐ tories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly created directory entries. d99 4 a102 4 ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions re‐ quiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing ac‐ tions requiring given permissions. d105 2 a106 2 ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ tempts by principal which require d113 4 a116 4 ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not file owner or a member of the owning group. d124 1 a124 1 have different effect on directories than on files. The following ACE d170 1 a170 1 Do not propagate inherit flags. Only first-level entries d182 1 a182 1 classic Unix permissions are updated. An archive entry cannot contain d185 1 a185 1 archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ d197 3 a199 3 for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is in‐ cluded and at least one extended ACL entry is found, the three non-ex‐ tended ACLs are added. d202 1 a202 1 (or merge with existing) ACL entries from (wide) text. The argument type d208 3 a210 3 or respective archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with “default:” are treated as d213 1 a213 1 and entries beginning with the ‘#’ character (comments) are skipped. d215 3 a217 4 archive_entry_acl_next() and archive_entry_acl_next_w() return the next entry of the ACL list. This functions may only be called after archive_entry_acl_reset() has indicated the presence of extended ACL en‐ tries. d220 4 a223 5 archive_entry_acl_next() or archive_entry_acl_next_w(). The function re‐ turns either 0, if no non-extended ACLs are found. In this case, the ac‐ cess permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as archive_entry_acl_count(). d226 2 a227 2 ACL entries for the given type into a (wide) string of ACL entries sepa‐ rated by newline. If the pointer len_p is not NULL, then the function d237 1 a237 1 Prefix each default ACL entry with the word “default:”. d253 3 a255 3 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are re‐ turned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec‐ d257 1 a257 1 are prefixed with “default:”. d259 3 a261 3 archive_entry_acl_types() get ACL entry types contained in an archive en‐ try's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this func‐ tion is a very efficient way to detect if an ACL already contains d265 1 a265 1 archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ d267 3 a269 2 the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one ex‐ tended ACL entry exists, the three classic Unix permissions are counted. d275 3 a277 3 archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has not been called first. @ 1.4 log @Merge for libarchive-3.3.2. @ text @d9 2 a10 2 archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions d104 4 a107 4 ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. d110 2 a111 2 ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require d202 3 a204 3 for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non- extended ACLs are added. d222 2 a223 2 archive_entry_acl_reset() has indicated the presence of extended ACL entries. d226 4 a229 4 archive_entry_acl_next() or archive_entry_acl_next_w(). The function returns either 0, if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as d260 2 a261 2 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags d266 3 a268 3 archive_entry_acl_types() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains d274 2 a275 3 the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. @ 1.3 log @Merge libarchive-3.3.1. @ text @d3 7 a9 7 1mNAME0m 1marchive_entry_acl_add_entry22m, 1marchive_entry_acl_add_entry_w22m, 1marchive_entry_acl_clear22m, 1marchive_entry_acl_count22m, 1marchive_entry_acl_from_text22m, 1marchive_entry_acl_from_text_w,0m 1marchive_entry_acl_next22m, 1marchive_entry_acl_next_w22m, 1marchive_entry_acl_reset22m, 1marchive_entry_acl_to_text22m, 1marchive_entry_acl_to_text_w22m, 1marchive_entry_acl_types 22m— functions for d12 1 a12 1 1mLIBRARY0m d15 2 a16 2 1mSYNOPSIS0m 1m#include 0m d18 3 a20 3 4mvoid0m 1marchive_entry_acl_add_entry22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mchar24m 4m*name24m); d22 3 a24 3 4mvoid0m 1marchive_entry_acl_add_entry_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mwchar_t24m 4m*name24m); d26 2 a27 2 4mvoid0m 1marchive_entry_acl_clear22m(4mstruct24m 4marchive_entry24m 4m*a24m); d29 2 a30 2 4mint0m 1marchive_entry_acl_count22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); d32 3 a34 3 4mint0m 1marchive_entry_acl_from_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*text24m, 4mint24m 4mtype24m); d36 3 a38 3 4mint0m 1marchive_entry_acl_from_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*text24m, 4mint24m 4mtype24m); d40 4 a43 4 4mint0m 1marchive_entry_acl_next22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mchar24m 4m**ret_name24m); d45 4 a48 4 4mint0m 1marchive_entry_acl_next_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mwchar_t24m 4m**ret_name24m); d50 2 a51 2 4mint0m 1marchive_entry_acl_reset22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); d53 3 a55 3 4mchar24m 4m*0m 1marchive_entry_acl_to_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); d57 3 a59 3 4mwchar_t24m 4m*0m 1marchive_entry_acl_to_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); d61 2 a62 2 4mint0m 1marchive_entry_acl_types22m(4mstruct24m 4marchive_entry24m 4m*a24m); d64 1 a64 1 1mDESCRIPTION0m d66 1 a66 1 model. The ACL interface of 1mlibarchive 22msupports both POSIX.1e and NFSv4 d70 1 a70 1 1mPOSIX.1e Access Control Lists0m d73 4 a76 4 missions in the 4mpermset24m are: ARCHIVE_ENTRY_ACL_READ (1mr22m) ARCHIVE_ENTRY_ACL_WRITE (1mw22m) ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) d79 1 a79 1 The 4mtag24m specifies the principal to which the permission applies. Valid d99 1 a99 1 1mNFSv4 Access Control Lists0m d114 1 a114 1 The 4mtag24m specifies the principal to which the permission applies. Valid d124 2 a125 2 store the user and group name in the 4mname24m string and optionally the user or group ID in the 4mqualifier24m integer. d127 1 a127 1 NFSv4 ACE permissions and flags are stored in the same 4mpermset24m bitfield. d131 1 a131 1 ARCHIVE_ENTRY_ACL_READ_DATA (1mr22m) d133 1 a133 1 ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (1mr22m) d135 1 a135 1 ARCHIVE_ENTRY_ACL_WRITE_DATA (1mw22m) d137 1 a137 1 ARCHIVE_ENTRY_ACL_ADD_FILE (1mw22m) d139 1 a139 1 ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) d141 1 a141 1 ARCHIVE_ENTRY_ACL_APPEND_DATA (1mp22m) d143 1 a143 1 ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (1mp22m) d145 1 a145 1 ARCHIVE_ENTRY_ACL_DELETE_CHILD (1mD22m) d147 1 a147 1 ARCHIVE_ENTRY_ACL_DELETE (1md22m) d149 1 a149 1 ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (1ma22m) d151 1 a151 1 ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (1mA22m) d153 1 a153 1 ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (1mR22m) d155 1 a155 1 ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (1mW22m) d157 1 a157 1 ARCHIVE_ENTRY_ACL_READ_ACL (1mc22m) d159 1 a159 1 ARCHIVE_ENTRY_ACL_WRITE_ACL (1mC22m) d161 1 a161 1 ARCHIVE_ENTRY_ACL_WRITE_OWNER (1mo22m) d163 1 a163 1 ARCHIVE_ENTRY_ACL_SYNCHRONIZE (1ms22m) d167 1 a167 1 ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (1mf22m) d169 1 a169 1 ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (1md22m) d171 1 a171 1 ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (1mi22m) d174 1 a174 1 ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (1mn22m) d177 3 a179 3 ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (1mS22m) Trigger alarm or audit on succesful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (1mF22m) d181 1 a181 1 ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (1mI22m) d184 2 a185 2 1mFunctions0m 1marchive_entry_acl_add_entry22m() and 1marchive_entry_acl_add_entry_w22m() add a d187 2 a188 2 classic Unix permissions are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL entries. d190 1 a190 1 1marchive_entry_acl_clear22m() removes all ACL entries and resets the enumera‐ d193 2 a194 2 1marchive_entry_acl_count22m() counts the ACL entries that have the given type mask. 4mtype24m can be the bitwise-or of d204 1 a204 1 extened ACLs are added. d206 2 a207 2 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() add new (or merge with existing) ACL entries from (wide) text. The argument 4mtype0m d212 3 a214 3 Supports all formats that can be created with 1marchive_entry_acl_to_text22m() or respective 1marchive_entry_acl_to_text_w22m(). Existing ACL entries are preserved. To get a clean new ACL from text 1marchive_entry_acl_clear22m() d216 1 a216 1 ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless 4mtype24m is d220 1 a220 1 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return the next d222 1 a222 1 1marchive_entry_acl_reset22m() has indicated the presence of extended ACL d225 2 a226 2 1marchive_entry_acl_reset22m() prepare reading the list of ACL entries with 1marchive_entry_acl_next22m() or 1marchive_entry_acl_next_w22m(). The function d230 1 a230 1 1marchive_entry_acl_count22m(). d232 1 a232 1 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the d234 1 a234 1 rated by newline. If the the pointer 4mlen_p24m is not NULL, then the function d236 1 a236 1 in the location pointed to by 4mlen_p24m. The 4mflag24m argument is a bitwise-or. d266 1 a266 1 1marchive_entry_acl_types22m() get ACL entry types contained in an archive d271 2 a272 2 1mRETURN VALUES0m 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() returns the num‐ d278 1 a278 1 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() return d282 1 a282 1 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return ARCHIVE_OK d284 1 a284 1 1marchive_entry_acl_reset22m() has not been called first. d286 1 a286 1 1marchive_entry_acl_to_text22m() returns a string representing the ACL entries d289 1 a289 1 1marchive_entry_acl_to_text_w22m() returns a wide string representing the ACL d292 1 a292 1 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if d295 1 a295 1 1mSEE ALSO0m @ 1.2 log @Update for libarchive 3.2.1. @ text @d3 8 a10 6 NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_next, archive_entry_acl_next_w, archive_entry_acl_reset, archive_entry_acl_text_w — functions for manipulating Access Control Lists in archive entry descriptions d12 1 a12 1 LIBRARY d15 2 a16 2 SYNOPSIS #include d18 59 a76 42 void archive_entry_acl_add_entry(struct archive_entry *a, int type, int permset, int tag, int qualifier, const char *name); void archive_entry_acl_add_entry_w(struct archive_entry *a, int type, int permset, int tag, int qualifier, const wchar_t *name); void archive_entry_acl_clear(struct archive_entry *a); int archive_entry_acl_count(struct archive_entry *a, int type); int archive_entry_acl_next(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const char **ret_name); int archive_entry_acl_next_w(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const wchar_t **ret_name); int archive_entry_acl_reset(struct archive_entry *a, int type); const wchar_t * archive_entry_acl_text_w(struct archive_entry *a, int flags); DESCRIPTION An “Access Control List” is a generalisation of the classic Unix permis‐ sion system. The ACL interface of libarchive is derived from the POSIX.1e draft, but restricted to simplify dealing with practical imple‐ mentations in various Operating Systems and archive formats. An ACL consists of a number of independent entries. Each entry specifies the permission set as bitmask of basic permissions. Valid permissions are: ARCHIVE_ENTRY_ACL_EXECUTE ARCHIVE_ENTRY_ACL_WRITE ARCHIVE_ENTRY_ACL_READ d79 1 a79 1 The tag specifies the principal to which the permission applies. Valid d87 3 a89 2 ARCHIVE_ENTRY_ACL_OTHER Any principal who doesn't have a user or group entry. d94 89 a182 4 All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This spec‐ ifies the permissions required for access to the file itself. Directo‐ ries have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which con‐ trols the initial access ACL for newly created directory entries. d184 2 a185 1 archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a d187 2 a188 1 classic Unix permissions are updated. d190 1 a190 1 archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ d193 10 a202 3 archive_entry_acl_count() counts the ACL entries that have the given type mask. type can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS and ARCHIVE_ENTRY_ACL_TYPE_DEFAULT. If ARCHIVE_ENTRY_ACL_TYPE_ACCESS is d206 15 a220 1 archive_entry_acl_next() and archive_entry_acl_next_w() return the next d222 1 a222 1 archive_entry_acl_reset() has indicated the presence of extended ACL d225 2 a226 2 archive_entry_acl_reset() prepare reading the list of ACL entries with archive_entry_acl_next() or archive_entry_acl_next_w(). The function d230 1 a230 1 archive_entry_acl_count(). d232 49 a280 13 archive_entry_acl_text_w() converts the ACL entries for the given type mask into a wide string. In addition to the normal type flags, ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID and ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT can be specified to further customize the result. The returned long string is valid until the next call to archive_entry_acl_clear(), archive_entry_acl_add_entry(), archive_entry_acl_add_entry_w() or archive_entry_acl_text_w(). RETURN VALUES archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ ber of ACL entries that match the given type mask. If the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. d282 1 a282 1 archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK d284 10 a293 1 archive_entry_acl_reset() has not been called first. d295 2 a296 12 archive_entry_text_w() returns a wide string representation of the ACL entrise matching the given type mask. The returned long string is valid until the next call to archive_entry_acl_clear(), archive_entry_acl_add_entry(), archive_entry_acl_add_entry_w() or archive_entry_acl_text_w(). SEE ALSO archive_entry(3) libarchive(3), BUGS ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID and ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT are not documented. d298 1 a298 1 BSD February 2, 2012 BSD @ 1.1 log @Changes 3.1.2: This is a maintenance update to fix issues with the new RAR seeking feature. This new release also contains fixes for build failures when building libarchive using Visual Studio 2012 and MinGW. @ text @d129 1 a129 1 archive(3), archive_entry(3) @ 1.1.1.1 log @Import libarchive-3.2.1: - security fixes and other bugfixes - support for multhreading in xz 5.2+ @ text @d129 1 a129 1 archive_entry(3) libarchive(3), @ 1.1.1.2 log @Import libarchive-3.3.1. @ text @d3 6 a8 8 1mNAME0m 1marchive_entry_acl_add_entry22m, 1marchive_entry_acl_add_entry_w22m, 1marchive_entry_acl_clear22m, 1marchive_entry_acl_count22m, 1marchive_entry_acl_from_text22m, 1marchive_entry_acl_from_text_w,0m 1marchive_entry_acl_next22m, 1marchive_entry_acl_next_w22m, 1marchive_entry_acl_reset22m, 1marchive_entry_acl_to_text22m, 1marchive_entry_acl_to_text_w22m, 1marchive_entry_acl_types 22m— functions for manipulating Access Control Lists in archive entry descriptions d10 1 a10 1 1mLIBRARY0m d13 2 a14 2 1mSYNOPSIS0m 1m#include 0m d16 42 a57 59 4mvoid0m 1marchive_entry_acl_add_entry22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mchar24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_add_entry_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mwchar_t24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_clear22m(4mstruct24m 4marchive_entry24m 4m*a24m); 4mint0m 1marchive_entry_acl_count22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_next22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mchar24m 4m**ret_name24m); 4mint0m 1marchive_entry_acl_next_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mwchar_t24m 4m**ret_name24m); 4mint0m 1marchive_entry_acl_reset22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mchar24m 4m*0m 1marchive_entry_acl_to_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mwchar_t24m 4m*0m 1marchive_entry_acl_to_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mint0m 1marchive_entry_acl_types22m(4mstruct24m 4marchive_entry24m 4m*a24m); 1mDESCRIPTION0m The “Access Control Lists (ACLs)” extend the standard Unix perssion model. The ACL interface of 1mlibarchive 22msupports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. 1mPOSIX.1e Access Control Lists0m A POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as bitmask of basic permissions. Valid per‐ missions in the 4mpermset24m are: ARCHIVE_ENTRY_ACL_READ (1mr22m) ARCHIVE_ENTRY_ACL_WRITE (1mw22m) ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) d60 1 a60 1 The 4mtag24m specifies the principal to which the permission applies. Valid d68 2 a69 3 ARCHIVE_ENTRY_ACL_OTHER Any principal who is not file owner or a member of the owning group. d74 4 a77 89 All files with have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Direc‐ tories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly created directory entries. 1mNFSv4 Access Control Lists0m A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). There are four possible types of a NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require given permissions. The 4mtag24m specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not file owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the 4mname24m string and optionally the user or group ID in the 4mqualifier24m integer. NFSv4 ACE permissions and flags are stored in the same 4mpermset24m bitfield. Some permissions share the same constant and permission character but have different effect on directories than on files. The following ACE permissions are supported: ARCHIVE_ENTRY_ACL_READ_DATA (1mr22m) Read data (file). ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (1mr22m) List entries (directory). ARCHIVE_ENTRY_ACL_WRITE_DATA (1mw22m) Write data (file). ARCHIVE_ENTRY_ACL_ADD_FILE (1mw22m) Create files (directory). ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) Execute file or change into a directory. ARCHIVE_ENTRY_ACL_APPEND_DATA (1mp22m) Append data (file). ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (1mp22m) Create subdirectories (directory). ARCHIVE_ENTRY_ACL_DELETE_CHILD (1mD22m) Remove files and subdirectories inside a directory. ARCHIVE_ENTRY_ACL_DELETE (1md22m) Remove file or directory. ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (1ma22m) Read file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (1mA22m) Write file or directory attributes. ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (1mR22m) Read named file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (1mW22m) Write named file or directory attributes. ARCHIVE_ENTRY_ACL_READ_ACL (1mc22m) Read file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_ACL (1mC22m) Write file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_OWNER (1mo22m) Change owner of a file or directory. ARCHIVE_ENTRY_ACL_SYNCHRONIZE (1ms22m) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (1mf22m) Inherit parent directory ACE to files. ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (1md22m) Inherit parent directory ACE to subdirectories. ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (1mi22m) Only inherit, do not apply the permission on the directory itself. ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (1mn22m) Do not propagate inherit flags. Only first-level entries inherit ACLs. ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (1mS22m) Trigger alarm or audit on succesful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (1mF22m) Trigger alarm or audit on failed access. ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (1mI22m) Mark that ACE was inherited. d79 1 a79 2 1mFunctions0m 1marchive_entry_acl_add_entry22m() and 1marchive_entry_acl_add_entry_w22m() add a d81 1 a81 2 classic Unix permissions are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL entries. d83 1 a83 1 1marchive_entry_acl_clear22m() removes all ACL entries and resets the enumera‐ d86 3 a88 10 1marchive_entry_acl_count22m() counts the ACL entries that have the given type mask. 4mtype24m can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and ARCHIVE_ENTRY_ACL_TYPE_ALLOW ARCHIVE_ENTRY_ACL_TYPE_DENY ARCHIVE_ENTRY_ACL_TYPE_AUDIT ARCHIVE_ENTRY_ACL_TYPE_ALARM for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is d92 1 a92 15 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() add new (or merge with existing) ACL entries from (wide) text. The argument 4mtype0m may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with 1marchive_entry_acl_to_text22m() or respective 1marchive_entry_acl_to_text_w22m(). Existing ACL entries are preserved. To get a clean new ACL from text 1marchive_entry_acl_clear22m() must be called first. Entries prefixed with “default:” are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless 4mtype24m is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries and entries beginning with the ‘#’ character (comments) are skipped. 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return the next d94 1 a94 1 1marchive_entry_acl_reset22m() has indicated the presence of extended ACL d97 2 a98 2 1marchive_entry_acl_reset22m() prepare reading the list of ACL entries with 1marchive_entry_acl_next22m() or 1marchive_entry_acl_next_w22m(). The function d102 1 a102 1 1marchive_entry_acl_count22m(). d104 13 a116 49 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the ACL entries for the given type into a (wide) string of ACL entries sepa‐ rated by newline. If the the pointer 4mlen_p24m is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by 4mlen_p24m. The 4mflag24m argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: ARCHIVE_ENTRY_ACL_TYPE_ACCESS Output access ACLs. ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT Prefix each default ACL entry with the word “default:”. ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs don not contain a double colon. The following flags are effecive only on NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_COMPACT Do not output minus characters for unset permissions and flags in NFSv4 ACL permission and flag fields. The following flags are effective on both POSIX.1e and NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Add an additional colon-separated field containing the user or group id. ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec‐ ified, both access and default entries are returned and default entries are prefixed with “default:”. 1marchive_entry_acl_types22m() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. 1mRETURN VALUES0m 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() returns the num‐ ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() return ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. d118 1 a118 1 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return ARCHIVE_OK d120 1 a120 10 1marchive_entry_acl_reset22m() has not been called first. 1marchive_entry_acl_to_text22m() returns a string representing the ACL entries matching the given type and flags on success or NULL on error. 1marchive_entry_acl_to_text_w22m() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on error. 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. d122 12 a133 2 1mSEE ALSO0m archive_entry(3), libarchive(3) d135 1 a135 1 BSD February 15, 2017 BSD @ 1.1.1.3 log @Import libarchive-3.3.2 + 9de5f3 + f9dacbf: - Support NFS4 ACLs on Linux - Bugfixes @ text @d3 7 a9 7 NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, archive_entry_acl_next, archive_entry_acl_next_w, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for d12 1 a12 1 LIBRARY d15 2 a16 2 SYNOPSIS #include d18 3 a20 3 void archive_entry_acl_add_entry(struct archive_entry *a, int type, int permset, int tag, int qualifier, const char *name); d22 3 a24 3 void archive_entry_acl_add_entry_w(struct archive_entry *a, int type, int permset, int tag, int qualifier, const wchar_t *name); d26 2 a27 2 void archive_entry_acl_clear(struct archive_entry *a); d29 2 a30 2 int archive_entry_acl_count(struct archive_entry *a, int type); d32 3 a34 3 int archive_entry_acl_from_text(struct archive_entry *a, const char *text, int type); d36 3 a38 3 int archive_entry_acl_from_text_w(struct archive_entry *a, const wchar_t *text, int type); d40 4 a43 4 int archive_entry_acl_next(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const char **ret_name); d45 4 a48 4 int archive_entry_acl_next_w(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const wchar_t **ret_name); d50 2 a51 2 int archive_entry_acl_reset(struct archive_entry *a, int type); d53 3 a55 3 char * archive_entry_acl_to_text(struct archive_entry *a, ssize_t *len_p, int flags); d57 3 a59 3 wchar_t * archive_entry_acl_to_text_w(struct archive_entry *a, ssize_t *len_p, int flags); d61 2 a62 2 int archive_entry_acl_types(struct archive_entry *a); d64 1 a64 1 DESCRIPTION d66 1 a66 1 model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 d70 1 a70 1 POSIX.1e Access Control Lists d73 4 a76 4 missions in the permset are: ARCHIVE_ENTRY_ACL_READ (r) ARCHIVE_ENTRY_ACL_WRITE (w) ARCHIVE_ENTRY_ACL_EXECUTE (x) d79 1 a79 1 The tag specifies the principal to which the permission applies. Valid d99 1 a99 1 NFSv4 Access Control Lists d114 1 a114 1 The tag specifies the principal to which the permission applies. Valid d124 2 a125 2 store the user and group name in the name string and optionally the user or group ID in the qualifier integer. d127 1 a127 1 NFSv4 ACE permissions and flags are stored in the same permset bitfield. d131 1 a131 1 ARCHIVE_ENTRY_ACL_READ_DATA (r) d133 1 a133 1 ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (r) d135 1 a135 1 ARCHIVE_ENTRY_ACL_WRITE_DATA (w) d137 1 a137 1 ARCHIVE_ENTRY_ACL_ADD_FILE (w) d139 1 a139 1 ARCHIVE_ENTRY_ACL_EXECUTE (x) d141 1 a141 1 ARCHIVE_ENTRY_ACL_APPEND_DATA (p) d143 1 a143 1 ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (p) d145 1 a145 1 ARCHIVE_ENTRY_ACL_DELETE_CHILD (D) d147 1 a147 1 ARCHIVE_ENTRY_ACL_DELETE (d) d149 1 a149 1 ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (a) d151 1 a151 1 ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (A) d153 1 a153 1 ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (R) d155 1 a155 1 ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (W) d157 1 a157 1 ARCHIVE_ENTRY_ACL_READ_ACL (c) d159 1 a159 1 ARCHIVE_ENTRY_ACL_WRITE_ACL (C) d161 1 a161 1 ARCHIVE_ENTRY_ACL_WRITE_OWNER (o) d163 1 a163 1 ARCHIVE_ENTRY_ACL_SYNCHRONIZE (s) d167 1 a167 1 ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (f) d169 1 a169 1 ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (d) d171 1 a171 1 ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (i) d174 1 a174 1 ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (n) d177 3 a179 3 ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S) Trigger alarm or audit on successful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (F) d181 1 a181 1 ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (I) d184 2 a185 2 Functions archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a d187 2 a188 2 classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. d190 1 a190 1 archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ d193 2 a194 2 archive_entry_acl_count() counts the ACL entries that have the given type mask. type can be the bitwise-or of d204 1 a204 1 extended ACLs are added. d206 2 a207 2 archive_entry_acl_from_text() and archive_entry_acl_from_text_w() add new (or merge with existing) ACL entries from (wide) text. The argument type d212 3 a214 3 Supports all formats that can be created with archive_entry_acl_to_text() or respective archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() d216 1 a216 1 ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is d220 1 a220 1 archive_entry_acl_next() and archive_entry_acl_next_w() return the next d222 1 a222 1 archive_entry_acl_reset() has indicated the presence of extended ACL d225 2 a226 2 archive_entry_acl_reset() prepare reading the list of ACL entries with archive_entry_acl_next() or archive_entry_acl_next_w(). The function d230 1 a230 1 archive_entry_acl_count(). d232 1 a232 1 archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the d234 1 a234 1 rated by newline. If the pointer len_p is not NULL, then the function d236 1 a236 1 in the location pointed to by len_p. The flag argument is a bitwise-or. d266 1 a266 1 archive_entry_acl_types() get ACL entry types contained in an archive d271 2 a272 2 RETURN VALUES archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ d278 1 a278 1 archive_entry_acl_from_text() and archive_entry_acl_from_text_w() return d282 1 a282 1 archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK d284 1 a284 1 archive_entry_acl_reset() has not been called first. d286 1 a286 1 archive_entry_acl_to_text() returns a string representing the ACL entries d289 1 a289 1 archive_entry_acl_to_text_w() returns a wide string representing the ACL d292 1 a292 1 archive_entry_acl_types() returns a bitmask of ACL entry types or 0 if d295 1 a295 1 SEE ALSO @ 1.1.1.4 log @Import libarchive 3.4.0 @ text @d9 2 a10 2 archive_entry_acl_to_text_w, archive_entry_acl_types — functions for ma‐ nipulating Access Control Lists in archive entry descriptions d104 4 a107 4 ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions re‐ quiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing ac‐ tions requiring given permissions. d110 2 a111 2 ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ tempts by principal which require d202 3 a204 3 for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is in‐ cluded and at least one extended ACL entry is found, the three non-ex‐ tended ACLs are added. d222 2 a223 2 archive_entry_acl_reset() has indicated the presence of extended ACL en‐ tries. d226 4 a229 4 archive_entry_acl_next() or archive_entry_acl_next_w(). The function re‐ turns either 0, if no non-extended ACLs are found. In this case, the ac‐ cess permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as d260 2 a261 2 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are re‐ turned. It the entry contains POSIX.1e ACLs and none of the flags d266 3 a268 3 archive_entry_acl_types() get ACL entry types contained in an archive en‐ try's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this func‐ tion is a very efficient way to detect if an ACL already contains d274 3 a276 2 the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one ex‐ tended ACL entry exists, the three classic Unix permissions are counted. @ 1.1.1.5 log @Import libarchive 3.7.2 @ text @d7 4 a10 4 archive_entry_acl_next, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions d46 5 d65 1 a65 1 The “Access Control Lists (ACLs)” extend the standard Unix permission d67 2 a68 2 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. d72 2 a73 2 specifies the permission set as a bitmask of basic permissions. Valid permissions in the permset are: d83 2 a84 2 ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. d87 2 a88 2 ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file owner or a member of the owning group. d94 4 a97 4 All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This spec‐ ifies the permissions required for access to the file itself. Directo‐ ries have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which con‐ trols the initial access ACL for newly-created directory entries. d118 4 a121 4 ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file owner or a member of the owning group. d129 1 a129 1 have different effect on directories than on files. The following ACE d175 1 a175 1 Do not propagate inherit flags. Only first-level entries d187 1 a187 1 classic Unix permissions are updated. An archive entry cannot contain d202 2 a203 2 for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-ex‐ d207 1 a207 1 (or merge with existing) ACL entries from (wide) text. The argument type d213 3 a215 3 or respectively archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with “default:” are treated as d220 4 a223 3 archive_entry_acl_next() return the next entry of the ACL list. This functions may only be called after archive_entry_acl_reset() has indi‐ cated the presence of extended ACL entries. d226 5 a230 4 archive_entry_acl_next(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function re‐ turns the same value as archive_entry_acl_count(). d234 1 a234 1 rated by newline. If the pointer len_p is not NULL, then the function d267 1 a267 1 try's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this func‐ d273 1 a273 1 ber of ACL entries that match the given type mask. For POSIX.1e ACLS if d281 3 a283 3 archive_entry_acl_next() returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has not been called first. @ 1.1.1.6 log @Libarchive 3.7.4 is a bugfix and security release Security fixes: rar: Fix OOB in rar e8 filter (CVE-2024-26256) zip: Fix out of boundary access Important bugfixes: 7zip: Limit amount of properties bsdtar: Fix error handling around strtol() usages passphrase: Improve newline handling on Windows passphrase: Never allow empty passwords rar: Fix "File CRC Error" when extracting specific rar4 archives xar: Avoid infinite link loop zip: Update AppleDouble support for directories zstd: Implement core detection @ text @d241 1 a241 1 The following flags are effective only on NFSv4 ACL: @ 1.1.1.7 log @libarchove: import version 3.7.7 @ text @d1 1 a1 1 4mARCHIVE_ENTRY_ACL24m(3) Library Functions Manual 4mARCHIVE_ENTRY_ACL24m(3) d3 280 a282 292 1mNAME0m archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, archive_entry_acl_next, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions 1mLIBRARY0m Streaming Archive Library (libarchive, -larchive) 1mSYNOPSIS0m 1m#include 0m 4mvoid0m 1marchive_entry_acl_add_entry22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mchar24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_add_entry_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mwchar_t24m 4m*name24m); 4mvoid0m 1marchive_entry_acl_clear22m(4mstruct24m 4marchive_entry24m 4m*a24m); 4mint0m 1marchive_entry_acl_count22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_from_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*text24m, 4mint24m 4mtype24m); 4mint0m 1marchive_entry_acl_next22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, 4mconst24m 4mchar24m 4m**ret_name24m); 4mint0m 1marchive_entry_acl_reset22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); 4mchar24m 4m*0m 1marchive_entry_acl_to_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mwchar_t24m 4m*0m 1marchive_entry_acl_to_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, 4mint24m 4mflags24m); 4mint0m 1marchive_entry_acl_types22m(4mstruct24m 4marchive_entry24m 4m*a24m); 1mDESCRIPTION0m The “Access Control Lists (ACLs)” extend the standard Unix permission model. The ACL interface of 1mlibarchive 22msupports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. 1mPOSIX.1e Access Control Lists0m A POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the 4mpermset24m are: ARCHIVE_ENTRY_ACL_READ (1mr22m) ARCHIVE_ENTRY_ACL_WRITE (1mw22m) ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) The permissions correspond to the normal Unix permissions. The 4mtag24m specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be ob‐ tained via group permissions. ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file owner or a member of the owning group. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Di‐ rectories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly-created directory en‐ tries. 1mNFSv4 Access Control Lists0m A NFSv4 ACL consists of multiple individual entries called Access Con‐ trol Entries (ACEs). There are four possible types of a NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ tempts by principal which require given permissions. The 4mtag24m specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the 4mname24m string and optionally the user or group ID in the 4mqualifier24m integer. NFSv4 ACE permissions and flags are stored in the same 4mpermset24m bit‐ field. Some permissions share the same constant and permission charac‐ ter but have different effect on directories than on files. The fol‐ lowing ACE permissions are supported: ARCHIVE_ENTRY_ACL_READ_DATA (1mr22m) Read data (file). ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (1mr22m) List entries (directory). ARCHIVE_ENTRY_ACL_WRITE_DATA (1mw22m) Write data (file). ARCHIVE_ENTRY_ACL_ADD_FILE (1mw22m) Create files (directory). ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) Execute file or change into a directory. ARCHIVE_ENTRY_ACL_APPEND_DATA (1mp22m) Append data (file). ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (1mp22m) Create subdirectories (directory). ARCHIVE_ENTRY_ACL_DELETE_CHILD (1mD22m) Remove files and subdirectories inside a directory. ARCHIVE_ENTRY_ACL_DELETE (1md22m) Remove file or directory. ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (1ma22m) Read file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (1mA22m) Write file or directory attributes. ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (1mR22m) Read named file or directory attributes. ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (1mW22m) Write named file or directory attributes. ARCHIVE_ENTRY_ACL_READ_ACL (1mc22m) Read file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_ACL (1mC22m) Write file or directory ACL. ARCHIVE_ENTRY_ACL_WRITE_OWNER (1mo22m) Change owner of a file or directory. ARCHIVE_ENTRY_ACL_SYNCHRONIZE (1ms22m) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (1mf22m) Inherit parent directory ACE to files. ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (1md22m) Inherit parent directory ACE to subdirectories. ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (1mi22m) Only inherit, do not apply the permission on the direc‐ tory itself. ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (1mn22m) Do not propagate inherit flags. Only first-level entries inherit ACLs. ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (1mS22m) Trigger alarm or audit on successful access. ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (1mF22m) Trigger alarm or audit on failed access. ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (1mI22m) Mark that ACE was inherited. 1mFunctions0m 1marchive_entry_acl_add_entry22m() and 1marchive_entry_acl_add_entry_w22m() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. 1marchive_entry_acl_clear22m() removes all ACL entries and resets the enu‐ meration pointer. 1marchive_entry_acl_count22m() counts the ACL entries that have the given type mask. 4mtype24m can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and ARCHIVE_ENTRY_ACL_TYPE_ALLOW ARCHIVE_ENTRY_ACL_TYPE_DENY ARCHIVE_ENTRY_ACL_TYPE_AUDIT ARCHIVE_ENTRY_ACL_TYPE_ALARM for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non- extended ACLs are added. 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() add new (or merge with existing) ACL entries from (wide) text. The argu‐ ment 4mtype24m may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with 1marchive_entry_acl_to_text22m() or respectively 1marchive_entry_acl_to_text_w22m(). Existing ACL entries are preserved. To get a clean new ACL from text 1marchive_entry_acl_clear22m() must be called first. Entries prefixed with “default:” are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless 4mtype24m is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL en‐ tries and entries beginning with the ‘#’ character (comments) are skipped. 1marchive_entry_acl_next22m() return the next entry of the ACL list. This functions may only be called after 1marchive_entry_acl_reset22m() has indi‐ cated the presence of extended ACL entries. 1marchive_entry_acl_reset22m() prepare reading the list of ACL entries with 1marchive_entry_acl_next22m(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be ob‐ tained by 4marchive_entry_mode24m(3) or set using 4mchmod24m(2). Otherwise, the function returns the same value as 1marchive_entry_acl_count22m(). 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the ACL entries for the given type into a (wide) string of ACL entries separated by newline. If the pointer 4mlen_p24m is not NULL, then the func‐ tion shall return the length of the string (not including the NULL terminator) in the location pointed to by 4mlen_p24m. The 4mflag24m argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: ARCHIVE_ENTRY_ACL_TYPE_ACCESS Output access ACLs. ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT Prefix each default ACL entry with the word “default:”. ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs don not contain a double colon. The following flags are effective only on NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_COMPACT Do not output minus characters for unset permissions and flags in NFSv4 ACL permission and flag fields. The following flags are effective on both POSIX.1e and NFSv4 ACL: ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID Add an additional colon-separated field containing the user or group id. ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access and default entries are returned and default en‐ tries are prefixed with “default:”. 1marchive_entry_acl_types22m() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. 1mRETURN VALUES0m 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() returns the number of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() re‐ turn ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. 1marchive_entry_acl_next22m() returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if 1marchive_entry_acl_reset22m() has not been called first. 1marchive_entry_acl_to_text22m() returns a string representing the ACL en‐ tries matching the given type and flags on success or NULL on error. 1marchive_entry_acl_to_text_w22m() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on er‐ ror. d284 2 a285 2 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. d287 2 a288 2 1mSEE ALSO0m 4marchive_entry24m(3), 4mlibarchive24m(3) d290 1 a290 1 Debian February 15, 2017 4mARCHIVE_ENTRY_ACL24m(3) @ 1.1.1.8 log @libarchive: import version 3.8.10 @ text @d99 1 a99 1 An NFSv4 ACL consists of multiple individual entries called Access Con‐ d102 10 a111 11 There are four possible types of an NFSv4 ACE: ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing actions requiring given permis‐ sions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access attempts by principal which require given permissions. d224 2 a225 2 1marchive_entry_acl_next22m() returns the next entry of the ACL list. This function may only be called after 1marchive_entry_acl_reset22m() has indi‐ d228 4 a231 4 1marchive_entry_acl_reset22m() prepares reading the list of ACL entries with 1marchive_entry_acl_next22m(). The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be ob‐ tained by 4marchive_entry_mode24m(3) or set using 4mchmod24m(2). Otherwise, the d234 2 a235 2 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the ACL entries for the given type into a (wide) string of ACL entries d237 2 a238 2 tion shall return the length of the string (not including the NULL terminator) in the location pointed to by 4mlen_p24m. The 4mflag24m argument is d249 1 a249 1 The mask and other ACLs do not contain a double colon. d253 1 a253 1 Do not output minus characters for unset permissions and d258 1 a258 1 Add an additional colon-separated field containing the d263 3 a265 3 If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned. If the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are d269 3 a271 3 1marchive_entry_acl_types22m() gets ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains d275 5 a279 5 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() return the num‐ ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. d281 2 a282 2 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() re‐ turn ARCHIVE_OK if all entries were successfully parsed and d285 1 a285 1 1marchive_entry_acl_next22m() returns ARCHIVE_OK on success, ARCHIVE_EOF if d289 1 a289 1 1marchive_entry_acl_to_text22m() returns a string representing the ACL en‐ d292 1 a292 1 1marchive_entry_acl_to_text_w22m() returns a wide string representing the d296 1 a296 1 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if @