<div dir="ltr"><div>My suggestion would be that you open a bug in bugzilla for this if you think there is a genuine Firefox issue here.</div><div><br></div><div>I've forwarded your email to some folks but received no response.</div><div><br></div><div>Mike<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 7, 2020 at 2:35 PM Paul Kosinski via Enterprise <<a href="mailto:enterprise@mozilla.org">enterprise@mozilla.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Perhaps other users have already run into this problem with Firefox ESR<br>
and Pulse Audio on Linux and solved it, but I am posting this here in<br>
case it might be helpful.<br>
<br>
Although most software with audio output via Pulse on Linux works nicely<br>
in a chroot environment, Firefox (ESR) doesn't, even the pre-Quantum<br>
versions: No sound comes out!<br>
<br>
Apparently Firefox isn't satisfied with Pulse Audio's socket at<br>
"/run/pulse/native", even though I carefully made sure it was part of<br>
the chroot environment and had the chroot target user in the<br>
pulse-access group. But it *does* work if the environment variable<br>
"PULSE_SERVER=/run/pulse/native" is made available in the chroot<br>
environment. This is strange: although PULSE_SERVER is not available<br>
when SU-ing to the user in question, Firefox's sound works OK.<br>
<br>
I spent maybe a day reading the Firefox source code concerning audio<br>
(i.e., deep in the guts of the Cubeb code et al), but couldn't find<br>
exactly how FF connected to the socket, which apparently is used by<br>
Pulse to set up a shared "memfd" which is passed to the audio client.<br>
The FD is then *deleted* by both sides to make it inaccessible to other<br>
processes (some clever Unix FS trickery!).<br>
<br>
I also read some Pulse code, but that of course had no FF specific<br>
info. The Pulse and FF online docs aren't very helpful in this area, as<br>
this an obscure issue, and mainly they tell you things like "how to<br>
install Pulse" etc. (I did find a similar problem in some old Firejail<br>
posts, but no solution was indicated.)<br>
<br>
Luckily, in the course of searching online, I stumbled across the<br>
*existence* of the PULSE_SERVER environment variable, which I had never<br>
seen before, even in the online Pulse docs I read. <br>
<br>
So I tried adding it (with the obvious value) to the chroot environment<br>
et voila, it worked!<br>
<br>
<br>
Background -- why I have long used chroot for Firefox.<br>
<br>
The new versions of Firefox now have a "sandbox" which should improve<br>
security against bugs in various plugins etc., but older versions<br>
didn't. Furthermore, neither the older versions of FF nor the newer<br>
ones have any builtin way of totally hiding files or directories from<br>
Firefox beyond the limited capability of file permissions. Thus a<br>
minimum level of security and *privacy* would require at least running<br>
Firefox as a different user than the an individual with access to<br>
personal and business files. However, merely employing a separate user<br>
id doesn't hide the existence of other users, mounted disks or network<br>
file servers: using chroot does.<br>
<br>
Given the continual discovery of security flaws in Firefox (and other<br>
complex software), chroot provides an additional layer of security that<br>
is useful. This is especially the case given the increasing use of<br>
Javascript (for which I have long used NoScript) and the rise of HTTPS<br>
(which makes virus scanning much less possible).<br>
<br>
P.S. Although facilities like cgroups and namespaces might be better in<br>
the long run, I am not about to remove the protection afforded now by<br>
chroot while trying to get these mechanisms working.<br>
_______________________________________________<br>
Enterprise mailing list<br>
<a href="mailto:Enterprise@mozilla.org" target="_blank">Enterprise@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/enterprise" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/enterprise</a><br>
<br>
To unsubscribe from this list, please visit <a href="https://mail.mozilla.org/listinfo/enterprise" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/enterprise</a> or send an email to <a href="mailto:enterprise-request@mozilla.org" target="_blank">enterprise-request@mozilla.org</a> with a subject of "unsubscribe"<br>
</blockquote></div>