PipeWire 1.2.1
Loading...
Searching...
No Matches
Security Context

Security Context interface More...

Files

file  security-context.h
 pipewire/extensions/security-context.h
 

Data Structures

struct  pw_security_context_events
 Security Context events More...
 
struct  pw_security_context_methods
 Security Context methods More...
 
struct  pw_security_context
 

Macros

#define PW_TYPE_INTERFACE_SecurityContext   PW_TYPE_INFO_INTERFACE_BASE "SecurityContext"
 
#define PW_SECURITY_CONTEXT_PERM_MASK   PW_PERM_RWX
 
#define PW_VERSION_SECURITY_CONTEXT   3
 
#define PW_EXTENSION_MODULE_SECURITY_CONTEXT   PIPEWIRE_MODULE_PREFIX "module-security-context"
 
#define PW_SECURITY_CONTEXT_EVENT_NUM   0
 
#define PW_VERSION_SECURITY_CONTEXT_EVENTS   0
 
#define PW_SECURITY_CONTEXT_METHOD_ADD_LISTENER   0
 
#define PW_SECURITY_CONTEXT_METHOD_CREATE   1
 
#define PW_SECURITY_CONTEXT_METHOD_NUM   2
 
#define PW_VERSION_SECURITY_CONTEXT_METHODS   0
 
#define pw_security_context_method(o, method, version, ...)
 
#define pw_security_context_add_listener(c, ...)   pw_security_context_method(c,add_listener,0,__VA_ARGS__)
 
#define pw_security_context_create(c, ...)   pw_security_context_method(c,create,0,__VA_ARGS__)
 Create a new security context.
 

Detailed Description

Security Context interface

Macro Definition Documentation

◆ PW_TYPE_INTERFACE_SecurityContext

#define PW_TYPE_INTERFACE_SecurityContext   PW_TYPE_INFO_INTERFACE_BASE "SecurityContext"

◆ PW_SECURITY_CONTEXT_PERM_MASK

#define PW_SECURITY_CONTEXT_PERM_MASK   PW_PERM_RWX

◆ PW_VERSION_SECURITY_CONTEXT

#define PW_VERSION_SECURITY_CONTEXT   3

◆ PW_EXTENSION_MODULE_SECURITY_CONTEXT

#define PW_EXTENSION_MODULE_SECURITY_CONTEXT   PIPEWIRE_MODULE_PREFIX "module-security-context"

◆ PW_SECURITY_CONTEXT_EVENT_NUM

#define PW_SECURITY_CONTEXT_EVENT_NUM   0

◆ PW_VERSION_SECURITY_CONTEXT_EVENTS

#define PW_VERSION_SECURITY_CONTEXT_EVENTS   0

◆ PW_SECURITY_CONTEXT_METHOD_ADD_LISTENER

#define PW_SECURITY_CONTEXT_METHOD_ADD_LISTENER   0

◆ PW_SECURITY_CONTEXT_METHOD_CREATE

#define PW_SECURITY_CONTEXT_METHOD_CREATE   1

◆ PW_SECURITY_CONTEXT_METHOD_NUM

#define PW_SECURITY_CONTEXT_METHOD_NUM   2

◆ PW_VERSION_SECURITY_CONTEXT_METHODS

#define PW_VERSION_SECURITY_CONTEXT_METHODS   0

◆ pw_security_context_method

#define pw_security_context_method ( o,
method,
version,
... )

◆ pw_security_context_add_listener

#define pw_security_context_add_listener ( c,
... )   pw_security_context_method(c,add_listener,0,__VA_ARGS__)

◆ pw_security_context_create

#define pw_security_context_create ( c,
... )   pw_security_context_method(c,create,0,__VA_ARGS__)

Create a new security context.

Creates a new security context with a socket listening FD. PipeWire 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 PipeWire should stop accepting new connections on listen_fd.

PipeWire must continue to accept connections on listen_fd when the client which created the security context disconnects.

After sending this request, closing listen_fd and close_fd remains the only valid operation on them.

Parameters
listen_fdthe fd to listen on for new connections
close_fdthe fd used to stop listening
propsextra properties. These will be copied on the client that connects through this context.

Some properties to set:

  • pipewire.sec.engine with the engine name.
  • pipewire.sec.app-id with the application id, this is an opaque, engine specific id for an application
  • pipewire.sec.instance-id with the instance id, this is an opaque, engine specific id for a running instance of an application.

See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md For a list of engine names and the properties to set.

This requires X and W permissions on the security_context.

See also
pw_security_context_methods.create