pub struct AclBlob {
pub owner: AclEntry,
pub entries: Vec<AclEntry>,
}Expand description
A public ACL blob.
Fields§
§owner: AclEntryThe first entry, followed by a count of the entries after it.
entries: Vec<AclEntry>Implementations§
Source§impl AclBlob
impl AclBlob
Sourcepub fn for_item(name: &str) -> Self
pub fn for_item(name: &str) -> Self
The ACL macOS writes for an item created with “allow all applications”: an owner entry plus a decrypt entry and an item-operations entry.
Sourcepub fn for_item_trusting(
name: &str,
applications: Vec<TrustedApplication>,
) -> Self
pub fn for_item_trusting( name: &str, applications: Vec<TrustedApplication>, ) -> Self
The same three entries, restricted to specific applications.
macOS restricts the Authorization::ItemAccess entry and leaves the
other open, which is what security add-generic-password -T writes.
Putting the applications on the wrong entry yields an ACL that parses and
looks restricted while granting the item to everyone.
Sourcepub fn for_item_with_subject(name: &str, subject: Subject) -> Self
pub fn for_item_with_subject(name: &str, subject: Subject) -> Self
Build the standard three entries with subject on the entry that governs
use of the item.
Sourcepub fn trusted_paths(&self) -> Vec<&str>
pub fn trusted_paths(&self) -> Vec<&str>
Applications this ACL restricts the item to, across all of its entries.
pub fn parse(data: &[u8]) -> Result<Self>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn encoded_len(&self) -> usize
Trait Implementations§
impl Eq for AclBlob
impl StructuralPartialEq for AclBlob
Auto Trait Implementations§
impl Freeze for AclBlob
impl RefUnwindSafe for AclBlob
impl Send for AclBlob
impl Sync for AclBlob
impl Unpin for AclBlob
impl UnsafeUnpin for AclBlob
impl UnwindSafe for AclBlob
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more