mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	metadata: check M permissions before changing metadata
To change a metadata, we need to be able to read the subject and also have the M permission on it.
This commit is contained in:
		
							parent
							
								
									9d9e3f2d23
								
							
						
					
					
						commit
						f15d585f8d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -92,7 +92,7 @@ static int metadata_set_property(void *object,
 | 
				
			||||||
	struct pw_impl_client *client = pw_resource_get_client(resource);
 | 
						struct pw_impl_client *client = pw_resource_get_client(resource);
 | 
				
			||||||
	int res;
 | 
						int res;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((res = pw_impl_client_check_permissions(client, subject, PW_PERM_R)) < 0)
 | 
						if ((res = pw_impl_client_check_permissions(client, subject, PW_PERM_R | PW_PERM_M)) < 0)
 | 
				
			||||||
		goto error;
 | 
							goto error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_metadata_set_property(impl->metadata, subject, key, type, value);
 | 
						pw_metadata_set_property(impl->metadata, subject, key, type, value);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue