Most feature checks already use #ifdef, and do not care about
the value of the macro. Convert all feature checks to do that,
and simplify the meson build scripts by replacing
if cond
cdata.set('X', 1)
endif
with
cdata.set('X', cond)
If a client (pipewire-pulse) has performed the access check and creates
a client with a specific access path, it will set this in the
pipewire.client.access property. For example, when a flatpak client
connects to pipewire-pulse, it will create a client with the flatpak
pipewire.client.access property.
Check the property after reading it so that we don't blindly grant
complete access to the flatpak client. Instead let the session
manager to assign the permissions.
This fixes a problem where flatpak clients entering pipewire-pulse would
initially get full access and then be downgraded by the session manager.
This would result in the pulse client thinking that it has access to
objects while failing later.
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
When nothing else was decided, use the client requested access
method. The idea is that pipewire-pulse will detect a flatpak client
an performs the pipewire connection on behalf of the client,
requesting flatpak access restrictions.
Assume -EACCES is a normal thing when checking /proc/<pid>/root and
continue with just an info message. Log a warning and assume
flatpak for all other errors.
Fixes#432
Drop the current client context to check permissions. This restores the
previous behaviour and fixes the permissions set by the portal module.
This fixes screen sharing again.
Fixes#362
If we can't access the root filesystem, grant access to the app.
This should not happen but for now it is a workaround for selinux
where we can't access the gnome-shell root when it connects for
screen sharing.
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
Don't pass the ucred to the client construct, just set the properties
in the protocol.
Use the client properties to get ucred.
Add the security label to the client properties (from SO_PEERSEC)
Make some more varargs error functions
Make pw_resource_error always just send the error to the resource id.
Make sure we send errors to the right destination.
Add proxy error event and emit it when the core finds an error for
the given proxy id.
The client error is supposed to be sent to all resources of a client
for the given global.