[−][src]Struct onc_rpc::auth::AuthUnixParams
AuthUnixParams
represents the structures referred to as both AUTH_UNIX
and AUTH_SYS
in the various RFCs, used to idenitfy the client as a Unix
user.
The structure is implemented as specified in APPENDIX A
of
RFC1831.
These values are trivial to forge and provide no actual security.
Implementations
impl<T> AuthUnixParams<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn new(
stamp: u32,
machine_name: T,
uid: u32,
gid: u32,
gids: Option<SmallVec<[u32; 16]>>
) -> Self
[src]
stamp: u32,
machine_name: T,
uid: u32,
gid: u32,
gids: Option<SmallVec<[u32; 16]>>
) -> Self
Initialise a new AuthUnixParams
instance containing the specified unix
account identifiers.
pub fn serialise_into(&self, buf: &mut Cursor<Vec<u8>>) -> Result<(), Error>
[src]
Serialises this AuthUnixParams
into buf
, advancing the cursor
position by serialised_len
bytes.
pub fn stamp(&self) -> u32
[src]
An arbitrary ID generated by the caller.
pub fn machine_name(&self) -> &[u8]
[src]
The hostname of the caller's machine.
pub fn machine_name_str(&self) -> &str
[src]
The hostname of the caller's machine as a reference to a UTF8 string.
# Panics
If the machine name cannot be expressed as a valid UTF8 string, this method panics.
Callers should probably make use of machine_name
in
general.
pub fn uid(&self) -> u32
[src]
The caller's Unix user ID.
pub fn gid(&self) -> u32
[src]
The caller's primary Unix group ID.
pub fn gids(&self) -> Option<&SmallVec<[u32; 16]>>
[src]
Returns a copy of the gids
array, a set of Unix group IDs the caller
is a member of.
pub fn serialised_len(&self) -> u32
[src]
Returns the on-wire length of this message once serialised, including the message header.
Trait Implementations
impl<T: Debug> Debug for AuthUnixParams<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
impl<T: PartialEq> PartialEq<AuthUnixParams<T>> for AuthUnixParams<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn eq(&self, other: &AuthUnixParams<T>) -> bool
[src]
pub fn ne(&self, other: &AuthUnixParams<T>) -> bool
[src]
impl<T> StructuralPartialEq for AuthUnixParams<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
impl TryFrom<Bytes> for AuthUnixParams<Bytes>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for AuthUnixParams<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for AuthUnixParams<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for AuthUnixParams<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for AuthUnixParams<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for AuthUnixParams<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,