archive_entry_perms.3 (315432) | archive_entry_perms.3 (353376) |
---|---|
1.\" Copyright (c) 2003-2007 Tim Kientzle 2.\" Copyright (c) 2010 Joerg Sonnenberger 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 112 unchanged lines hidden (view full) --- 121.Fn archive_entry_perm 122can be used to extract the user id, group id and permission from the given entry. 123The corresponding functions 124.Fn archive_entry_set_uid , 125.Fn archive_entry_set_gid , 126and 127.Fn archive_entry_set_perm 128store the given user id, group id and permission in the entry. | 1.\" Copyright (c) 2003-2007 Tim Kientzle 2.\" Copyright (c) 2010 Joerg Sonnenberger 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 112 unchanged lines hidden (view full) --- 121.Fn archive_entry_perm 122can be used to extract the user id, group id and permission from the given entry. 123The corresponding functions 124.Fn archive_entry_set_uid , 125.Fn archive_entry_set_gid , 126and 127.Fn archive_entry_set_perm 128store the given user id, group id and permission in the entry. |
129The permission is also set as side effect of calling | 129The permission is also set as a side effect of calling |
130.Fn archive_entry_set_mode . 131.Pp 132.Fn archive_entry_strmode 133returns a string representation of the permission as used by the long mode of 134.Xr ls 1 . 135.Ss User and group name 136User and group names can be provided in one of three different ways: 137.Bl -tag -width "wchar_t *" 138.It char * 139Multibyte strings in the current locale. 140.It wchar_t * 141Wide character strings in the current locale. 142The accessor functions are named 143.Fn XXX_w . 144.It UTF-8 145Unicode strings encoded as UTF-8. | 130.Fn archive_entry_set_mode . 131.Pp 132.Fn archive_entry_strmode 133returns a string representation of the permission as used by the long mode of 134.Xr ls 1 . 135.Ss User and group name 136User and group names can be provided in one of three different ways: 137.Bl -tag -width "wchar_t *" 138.It char * 139Multibyte strings in the current locale. 140.It wchar_t * 141Wide character strings in the current locale. 142The accessor functions are named 143.Fn XXX_w . 144.It UTF-8 145Unicode strings encoded as UTF-8. |
146This are convience functions to update both the multibyte and wide | 146These are convenience functions to update both the multibyte and wide |
147character strings at the same time. 148.El 149.Pp 150.Fn archive_entry_set_XXX | 147character strings at the same time. 148.El 149.Pp 150.Fn archive_entry_set_XXX |
151is an alias for | 151is an alias for |
152.Fn archive_entry_copy_XXX . 153.Ss File Flags 154File flags are transparently converted between a bitmap 155representation and a textual format. 156For example, if you set the bitmap and ask for text, the library 157will build a canonical text format. 158However, if you set a text format and request a text format, 159you will get back the same text, even if it is ill-formed. --- 17 unchanged lines hidden (view full) --- 177operation; bits that are not meaningful on the current platform 178will be ignored. 179.Pp 180The canonical text format is a comma-separated list of flag names. 181The 182.Fn archive_entry_copy_fflags_text 183and 184.Fn archive_entry_copy_fflags_text_w | 152.Fn archive_entry_copy_XXX . 153.Ss File Flags 154File flags are transparently converted between a bitmap 155representation and a textual format. 156For example, if you set the bitmap and ask for text, the library 157will build a canonical text format. 158However, if you set a text format and request a text format, 159you will get back the same text, even if it is ill-formed. --- 17 unchanged lines hidden (view full) --- 177operation; bits that are not meaningful on the current platform 178will be ignored. 179.Pp 180The canonical text format is a comma-separated list of flag names. 181The 182.Fn archive_entry_copy_fflags_text 183and 184.Fn archive_entry_copy_fflags_text_w |
185functions parse the provided text and sets the internal bitmap values. | 185functions parse the provided text and set the internal bitmap values. |
186This is a platform-specific operation; names that are not meaningful 187on the current platform will be ignored. 188The function returns a pointer to the start of the first name that was not 189recognized, or NULL if every name was recognized. 190Note that every name \(em including names that follow an unrecognized 191name \(em will be evaluated, and the bitmaps will be set to reflect 192every name that is recognized. 193(In particular, this differs from 194.Xr strtofflags 3 , 195which stops parsing at the first unrecognized name.) 196.Sh SEE ALSO 197.Xr archive_entry 3 , 198.Xr archive_entry_acl 3 , 199.Xr archive_read_disk 3 , | 186This is a platform-specific operation; names that are not meaningful 187on the current platform will be ignored. 188The function returns a pointer to the start of the first name that was not 189recognized, or NULL if every name was recognized. 190Note that every name \(em including names that follow an unrecognized 191name \(em will be evaluated, and the bitmaps will be set to reflect 192every name that is recognized. 193(In particular, this differs from 194.Xr strtofflags 3 , 195which stops parsing at the first unrecognized name.) 196.Sh SEE ALSO 197.Xr archive_entry 3 , 198.Xr archive_entry_acl 3 , 199.Xr archive_read_disk 3 , |
200.Xr archive_write_disk 3 201.Xr libarchive 3 , | 200.Xr archive_write_disk 3 , 201.Xr libarchive 3 |
202.Sh BUGS 203The platform types 204.Vt uid_t 205and 206.Vt gid_t 207are often 16 or 32 bit wide. 208In this case it is possible that the ids can not be correctly restored 209from archives and get truncated. | 202.Sh BUGS 203The platform types 204.Vt uid_t 205and 206.Vt gid_t 207are often 16 or 32 bit wide. 208In this case it is possible that the ids can not be correctly restored 209from archives and get truncated. |