Skip to main content

WellKnownSid

Enum WellKnownSid 

Source
#[non_exhaustive]
pub enum WellKnownSid {
Show 38 variants Null, Everyone, Local, ConsoleLogon, CreatorOwner, CreatorGroup, OwnerRights, Dialup, Network, Batch, Interactive, Service, Anonymous, PrincipalSelf, AuthenticatedUsers, RestrictedCode, RemoteInteractiveLogon, ThisOrganization, LocalSystem, LocalService, NetworkService, LocalAccount, LocalAccountAdministrator, BuiltinAdministrators, BuiltinUsers, BuiltinGuests, BuiltinPowerUsers, BuiltinBackupOperators, BuiltinRemoteDesktopUsers, BuiltinRemoteManagementUsers, AllApplicationPackages, AllRestrictedApplicationPackages, UntrustedLabel, LowLabel, MediumLabel, MediumPlusLabel, HighLabel, SystemLabel,
}
Expand description

A SID whose full value is a constant.

Every variant names a SID that is identical on every Windows installation, so converting one to a Sid never consults the environment. SIDs that are relative to a domain or a machine — Domain Admins (S-1-5-21-<domain>-512), the local Administrator account (S-1-5-21-<machine>-500) — are deliberately absent and belong to a name lookup instead. Keep it that way: the point of this enum is that it cannot fail.

This crate does not name these; text spellings belong to whatever exposes them.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Null

S-1-0-0, the null SID.

§

Everyone

S-1-1-0, the world (everyone).

§

Local

S-1-2-0, users who log on to local terminals.

§

ConsoleLogon

S-1-2-1, users who log on to the physical console.

§

CreatorOwner

S-1-3-0, a placeholder replaced by the creating user’s SID.

§

CreatorGroup

S-1-3-1, a placeholder replaced by the creating user’s primary group.

§

OwnerRights

S-1-3-4, the rights granted to an object’s current owner.

§

Dialup

S-1-5-1, users logged on through a dial-up connection.

§

Network

S-1-5-2, users logged on through a network connection.

§

Batch

S-1-5-3, users logged on through a batch queue facility.

§

Interactive

S-1-5-4, users logged on interactively.

§

Service

S-1-5-6, accounts logged on as a service.

§

Anonymous

S-1-5-7, anonymous logon.

§

PrincipalSelf

S-1-5-10, a placeholder replaced by the SID of the object itself.

§

AuthenticatedUsers

S-1-5-11, users authenticated by the system.

§

RestrictedCode

S-1-5-12, code running in a restricted security context.

§

RemoteInteractiveLogon

S-1-5-14, users logged on through a remote interactive session.

§

ThisOrganization

S-1-5-15, users of the same organization as the account.

§

LocalSystem

S-1-5-18, the local system account.

§

LocalService

S-1-5-19, the local service account.

§

NetworkService

S-1-5-20, the network service account.

§

LocalAccount

S-1-5-113, any local account.

§

LocalAccountAdministrator

S-1-5-114, any local account that is a member of Administrators.

§

BuiltinAdministrators

S-1-5-32-544, the builtin Administrators group.

§

BuiltinUsers

S-1-5-32-545, the builtin Users group.

§

BuiltinGuests

S-1-5-32-546, the builtin Guests group.

§

BuiltinPowerUsers

S-1-5-32-547, the builtin Power Users group.

§

BuiltinBackupOperators

S-1-5-32-551, the builtin Backup Operators group.

§

BuiltinRemoteDesktopUsers

S-1-5-32-555, the builtin Remote Desktop Users group.

§

BuiltinRemoteManagementUsers

S-1-5-32-580, the builtin Remote Management Users group.

§

AllApplicationPackages

S-1-15-2-1, all application packages.

§

AllRestrictedApplicationPackages

S-1-15-2-2, all restricted application packages.

§

UntrustedLabel

S-1-16-0, the untrusted integrity level.

§

LowLabel

S-1-16-4096, the low integrity level.

§

MediumLabel

S-1-16-8192, the medium integrity level.

§

MediumPlusLabel

S-1-16-8448, the medium-plus integrity level.

§

HighLabel

S-1-16-12288, the high integrity level.

§

SystemLabel

S-1-16-16384, the system integrity level.

Trait Implementations§

Source§

impl Clone for WellKnownSid

Source§

fn clone(&self) -> WellKnownSid

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WellKnownSid

Source§

impl Debug for WellKnownSid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for WellKnownSid

Source§

impl From<WellKnownSid> for Sid

Source§

fn from(value: WellKnownSid) -> Self

Converts to this type from the input type.
Source§

impl Hash for WellKnownSid

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for WellKnownSid

Source§

fn eq(&self, other: &WellKnownSid) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WellKnownSid

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.