mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Revert "impl-core: require WX flags to destroy an object"
This reverts commit c14e89a578.
This makes it impossible for flatpak apps to remove links. Maybe:
- Flatpaks apps are not allowed to make lingering links
- Flatpak apps can only delete their own links.
- Some flatpaks apps needs to be tagged as manager in order to created
lingering links and destroy any link.
Fixes #1920
This commit is contained in:
parent
f8cdc05720
commit
abbb034fa4
2 changed files with 5 additions and 6 deletions
|
|
@ -110,7 +110,7 @@ static int registry_destroy(void *object, uint32_t id)
|
|||
if (!PW_PERM_IS_R(permissions))
|
||||
goto error_no_id;
|
||||
|
||||
if (id == PW_ID_CORE || !PW_PERM_CHECK(permissions, PW_PERM_X|PW_PERM_W))
|
||||
if (id == PW_ID_CORE || !PW_PERM_IS_X(permissions))
|
||||
goto error_not_allowed;
|
||||
|
||||
pw_log_debug("global %p: destroy global id %d", global, id);
|
||||
|
|
|
|||
|
|
@ -53,11 +53,10 @@ extern "C" {
|
|||
#define PW_PERM_RWX (PW_PERM_R|PW_PERM_W|PW_PERM_X)
|
||||
#define PW_PERM_RWXM (PW_PERM_RWX|PW_PERM_M)
|
||||
|
||||
#define PW_PERM_CHECK(p,b) (((p)&(b)) == (b))
|
||||
#define PW_PERM_IS_R(p) PW_PERM_CHECK(p, PW_PERM_R)
|
||||
#define PW_PERM_IS_W(p) PW_PERM_CHECK(p, PW_PERM_W)
|
||||
#define PW_PERM_IS_X(p) PW_PERM_CHECK(p, PW_PERM_X)
|
||||
#define PW_PERM_IS_M(p) PW_PERM_CHECK(p, PW_PERM_M)
|
||||
#define PW_PERM_IS_R(p) (((p)&PW_PERM_R) == PW_PERM_R)
|
||||
#define PW_PERM_IS_W(p) (((p)&PW_PERM_W) == PW_PERM_W)
|
||||
#define PW_PERM_IS_X(p) (((p)&PW_PERM_X) == PW_PERM_X)
|
||||
#define PW_PERM_IS_M(p) (((p)&PW_PERM_M) == PW_PERM_M)
|
||||
|
||||
#define PW_PERM_ALL PW_PERM_RWXM
|
||||
#define PW_PERM_INVALID (uint32_t)(0xffffffff)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue