Struct wayland_protocols::wp::security_context::v1::client::wp_security_context_manager_v1::WpSecurityContextManagerV1
source · pub struct WpSecurityContextManagerV1 { /* private fields */ }
Expand description
client security context manager
This interface allows a client to register a new Wayland connection to the compositor and attach a security context to it.
This is intended to be used by sandboxes. Sandbox engines attach a security context to all connections coming from inside the sandbox. The compositor can then restrict the features that the sandboxed connections can use.
Compositors should forbid nesting multiple security contexts by not exposing wp_security_context_manager_v1 global to clients with a security context attached, or by sending the nested protocol error. Nested security contexts are dangerous because they can potentially allow privilege escalation of a sandboxed client.
Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension.
This interface has no events.
Implementations§
source§impl WpSecurityContextManagerV1
impl WpSecurityContextManagerV1
sourcepub fn destroy(&self)
pub fn destroy(&self)
destroy the manager object
Destroy the manager. This doesn’t destroy objects created with the manager.
sourcepub fn create_listener<U: Send + Sync + 'static, D: Dispatch<WpSecurityContextV1, U> + 'static>(
&self,
listen_fd: BorrowedFd<'_>,
close_fd: BorrowedFd<'_>,
qh: &QueueHandle<D>,
udata: U
) -> WpSecurityContextV1
pub fn create_listener<U: Send + Sync + 'static, D: Dispatch<WpSecurityContextV1, U> + 'static>( &self, listen_fd: BorrowedFd<'_>, close_fd: BorrowedFd<'_>, qh: &QueueHandle<D>, udata: U ) -> WpSecurityContextV1
create a new security context
Creates a new security context with a socket listening FD.
The compositor will accept new client connections on listen_fd. listen_fd must be ready to accept new connections when this request is sent by the client. In other words, the client must call bind(2) and listen(2) before sending the FD.
close_fd is a FD closed by the client when the compositor should stop accepting new connections on listen_fd.
The compositor must continue to accept connections on listen_fd when the Wayland client which created the security context disconnects.
After sending this request, closing listen_fd and close_fd remains the only valid operation on them.
Trait Implementations§
source§impl Borrow<ObjectId> for WpSecurityContextManagerV1
impl Borrow<ObjectId> for WpSecurityContextManagerV1
source§impl Clone for WpSecurityContextManagerV1
impl Clone for WpSecurityContextManagerV1
source§fn clone(&self) -> WpSecurityContextManagerV1
fn clone(&self) -> WpSecurityContextManagerV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WpSecurityContextManagerV1
impl Debug for WpSecurityContextManagerV1
source§impl Hash for WpSecurityContextManagerV1
impl Hash for WpSecurityContextManagerV1
source§impl PartialEq<Weak<WpSecurityContextManagerV1>> for WpSecurityContextManagerV1
impl PartialEq<Weak<WpSecurityContextManagerV1>> for WpSecurityContextManagerV1
source§impl PartialEq for WpSecurityContextManagerV1
impl PartialEq for WpSecurityContextManagerV1
source§fn eq(&self, other: &WpSecurityContextManagerV1) -> bool
fn eq(&self, other: &WpSecurityContextManagerV1) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Proxy for WpSecurityContextManagerV1
impl Proxy for WpSecurityContextManagerV1
source§fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
source§fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
source§fn backend(&self) -> &WeakBackend
fn backend(&self) -> &WeakBackend
source§fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
source§fn send_constructor<I: Proxy>(
&self,
req: Self::Request<'_>,
data: Arc<dyn ObjectData>
) -> Result<I, InvalidId>
fn send_constructor<I: Proxy>( &self, req: Self::Request<'_>, data: Arc<dyn ObjectData> ) -> Result<I, InvalidId>
source§fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
source§fn inert(backend: WeakBackend) -> Self
fn inert(backend: WeakBackend) -> Self
source§fn parse_event(
conn: &Connection,
msg: Message<ObjectId, OwnedFd>
) -> Result<(Self, Self::Event), DispatchError>
fn parse_event( conn: &Connection, msg: Message<ObjectId, OwnedFd> ) -> Result<(Self, Self::Event), DispatchError>
source§fn write_request<'a>(
&self,
conn: &Connection,
msg: Self::Request<'a>
) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
fn write_request<'a>( &self, conn: &Connection, msg: Self::Request<'a> ) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
impl Eq for WpSecurityContextManagerV1
Auto Trait Implementations§
impl !RefUnwindSafe for WpSecurityContextManagerV1
impl Send for WpSecurityContextManagerV1
impl Sync for WpSecurityContextManagerV1
impl Unpin for WpSecurityContextManagerV1
impl !UnwindSafe for WpSecurityContextManagerV1
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.