Struct wnf::BoxedSecurityDescriptor
source · pub struct BoxedSecurityDescriptor { /* private fields */ }
Expand description
An owned security descriptor allocated on the local heap
Unlike Box<SecurityDescriptor>
, this allocates memory on the
local heap.
There are two ways to create a BoxedSecurityDescriptor
:
- via the
BoxedSecurityDescriptor::create_everyone_generic_all
method - via the
FromStr
implementation ofBoxedSecurityDescriptor
Implementations§
source§impl BoxedSecurityDescriptor
impl BoxedSecurityDescriptor
sourcepub fn create_everyone_generic_all() -> Result<Self>
pub fn create_everyone_generic_all() -> Result<Self>
Creates a security descriptor granting GENERIC_ALL
access to Everyone
This is the security descriptor used by default when creating states.
The created security descriptor corresponds to the Security Descriptor String D:(A;;GA;;;WD)
, meaning it has:
- no owner
- no group
- no System Access Control List (SACL)
- a Discretionary Access Control List (
D
= DACL) with a single Access Control Entry (ACE) granting (A
) theGENERIC_ALL
access right (GA
) toEveryone
(WD
= World)
Errors
Returns an error if creating the security descriptor fails
Trait Implementations§
source§impl AsRef<SecurityDescriptor> for BoxedSecurityDescriptor
impl AsRef<SecurityDescriptor> for BoxedSecurityDescriptor
source§fn as_ref(&self) -> &SecurityDescriptor
fn as_ref(&self) -> &SecurityDescriptor
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<SecurityDescriptor> for BoxedSecurityDescriptor
impl Borrow<SecurityDescriptor> for BoxedSecurityDescriptor
source§fn borrow(&self) -> &SecurityDescriptor
fn borrow(&self) -> &SecurityDescriptor
Immutably borrows from an owned value. Read more
source§impl Debug for BoxedSecurityDescriptor
impl Debug for BoxedSecurityDescriptor
source§impl Deref for BoxedSecurityDescriptor
impl Deref for BoxedSecurityDescriptor
§type Target = SecurityDescriptor
type Target = SecurityDescriptor
The resulting type after dereferencing.
source§fn deref(&self) -> &SecurityDescriptor
fn deref(&self) -> &SecurityDescriptor
Dereferences the value.
source§impl Drop for BoxedSecurityDescriptor
impl Drop for BoxedSecurityDescriptor
source§impl FromStr for BoxedSecurityDescriptor
impl FromStr for BoxedSecurityDescriptor
source§fn from_str(s: &str) -> Result<Self>
fn from_str(s: &str) -> Result<Self>
Parses a BoxedSecurityDescriptor
from a Security Descriptor String
See Security Descriptor String Format for details.