mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-21 02:05:38 +00: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
|
@ -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…
Reference in a new issue