Struct zbus::fdo::ConnectionCredentials
source · [−]pub struct ConnectionCredentials {
pub unix_user_id: Option<u32>,
pub unix_group_ids: Option<Vec<u32>>,
pub process_id: Option<u32>,
pub windows_sid: Option<String>,
pub linux_security_label: Option<Vec<u8>>,
}
Expand description
Credentials of a process connected to a bus server.
If unable to determine certain credentials (for instance, because the process is not on the same machine as the bus daemon, or because this version of the bus daemon does not support a particular security framework), or if the values of those credentials cannot be represented as documented here, then those credentials are omitted.
Note: unknown keys, in particular those with “.” that are not from the specification, will be ignored. Use your own implementation or contribute your keys here, or in the specification.
Fields
unix_user_id: Option<u32>
The numeric Unix user ID, as defined by POSIX
unix_group_ids: Option<Vec<u32>>
The numeric Unix group IDs (including both the primary group and the supplementary groups), as defined by POSIX, in numerically sorted order. This array is either complete or absent: if the message bus is able to determine some but not all of the caller’s groups, or if one of the groups is not representable in a UINT32, it must not add this credential to the dictionary.
process_id: Option<u32>
The numeric process ID, on platforms that have this concept. On Unix, this is the process ID defined by POSIX.
windows_sid: Option<String>
The Windows security identifier in its string form, e.g.
S-1-5-21-3623811015-3361044348-30300820-1013
for a domain or local computer user or
“S-1-5-18` for the LOCAL_SYSTEM user.
linux_security_label: Option<Vec<u8>>
On Linux systems, the security label that would result from the SO_PEERSEC getsockopt call. The array contains the non-zero bytes of the security label in an unspecified ASCII-compatible encoding, followed by a single zero byte.
For example, the SELinux context system_u:system_r:init_t:s0
(a string of length 27) would
be encoded as 28 bytes ending with ':', 's', '0', '\x00'
On SELinux systems this is the SELinux context, as output by ps -Z
or ls -Z
. Typical values
might include system_u:system_r:init_t:s0
,
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
, or
unconfined_u:unconfined_r:chrome_sandbox_t:s0-s0:c0.c1023
.
On Smack systems, this is the Smack label. Typical values might include _
, *
, User
,
System
or System::Shared
.
On AppArmor systems, this is the AppArmor context, a composite string encoding the AppArmor
label (one or more profiles) and the enforcement mode. Typical values might include
unconfined
, /usr/bin/firefox (enforce)
or user1 (complain)
.
Trait Implementations
sourceimpl Debug for ConnectionCredentials
impl Debug for ConnectionCredentials
sourceimpl<'de> Deserialize<'de> for ConnectionCredentials
impl<'de> Deserialize<'de> for ConnectionCredentials
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ConnectionCredentials> for ConnectionCredentials
impl PartialEq<ConnectionCredentials> for ConnectionCredentials
sourcefn eq(&self, other: &ConnectionCredentials) -> bool
fn eq(&self, other: &ConnectionCredentials) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ConnectionCredentials) -> bool
fn ne(&self, other: &ConnectionCredentials) -> bool
This method tests for !=
.
sourceimpl Serialize for ConnectionCredentials
impl Serialize for ConnectionCredentials
sourceimpl Type for ConnectionCredentials
impl Type for ConnectionCredentials
impl Eq for ConnectionCredentials
impl StructuralEq for ConnectionCredentials
impl StructuralPartialEq for ConnectionCredentials
Auto Trait Implementations
impl RefUnwindSafe for ConnectionCredentials
impl Send for ConnectionCredentials
impl Sync for ConnectionCredentials
impl Unpin for ConnectionCredentials
impl UnwindSafe for ConnectionCredentials
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'de, T> DynamicDeserialize<'de> for T where
T: Type + Deserialize<'de> + ?Sized,
impl<'de, T> DynamicDeserialize<'de> for T where
T: Type + Deserialize<'de> + ?Sized,
type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
sourcefn deserializer_for_signature<S>(
signature: S
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error> where
S: TryInto<Signature<'de>>,
<S as TryInto<Signature<'de>>>::Error: Into<Error>,
fn deserializer_for_signature<S>(
signature: S
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error> where
S: TryInto<Signature<'de>>,
<S as TryInto<Signature<'de>>>::Error: Into<Error>,
Get a deserializer compatible with this signature.
sourceimpl<T> DynamicType for T where
T: Type + ?Sized,
impl<T> DynamicType for T where
T: Type + ?Sized,
sourcefn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more