mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: show warning about snap kernel features only once
Don't spam the warning about kernel missing features required for snap on every pulseaudio connection, but instead show it only once, as the situation is not going to improve.
This commit is contained in:
		
							parent
							
								
									d80989ab56
								
							
						
					
					
						commit
						44d958d397
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -66,9 +66,15 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd,
 | 
			
		|||
			return PW_SANDBOX_ACCESS_NOT_A_SANDBOX;
 | 
			
		||||
		}
 | 
			
		||||
		if  (errno == ENOPROTOOPT) {
 | 
			
		||||
			static bool warned;
 | 
			
		||||
 | 
			
		||||
			// if fine grained unix mediation isn't available, we can't know if this is a snap or
 | 
			
		||||
			// not, so we have no choice but give full access
 | 
			
		||||
			pw_log_warn("snap_get_audio_permissions: kernel lacks 'fine grained unix mediation'; snap audio permissions won't be honored.");
 | 
			
		||||
			if (!warned) {
 | 
			
		||||
				pw_log_warn("snap_get_audio_permissions: kernel lacks 'fine grained unix mediation'; "
 | 
			
		||||
						"snap audio permissions won't be honored.");
 | 
			
		||||
				warned = true;
 | 
			
		||||
			}
 | 
			
		||||
			return PW_SANDBOX_ACCESS_NOT_A_SANDBOX;
 | 
			
		||||
		}
 | 
			
		||||
 		pw_log_warn("snap_get_audio_permissions: failed to get the AppArmor info: %s.", strerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue