Bug 491778 - daemon fails to start: "Could not open /dev/dsp for reading: No such file or directory"
daemon fails to start: "Could not open /dev/dsp for reading: No such file or ...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: audio-entropyd (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-23 20:39 EDT by Tom London
Modified: 2009-04-14 08:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-13 17:52:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom London 2009-03-23 20:39:53 EDT
Description of problem:
Get this in /var/log/messages (and no daemon running):

ar 23 17:35:58 tlondon audio-entropyd: Could not open /dev/dsp for reading: No such file or directory
Mar 23 17:35:58 tlondon audio-entropyd: audio-entropyd stopping due to signal 15

/dev/dsp gone?

Version-Release number of selected component (if applicable):
audio-entropyd-1.0.5-3.fc11.x86_64

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Tom London 2009-03-24 09:42:24 EDT
Yeah.... "OSS deprecation plans for f11...."

"padsp /usr/sbin/audio-entropyd" seems to start up....
Comment 2 Tom London 2009-03-24 09:54:54 EDT
Changelog from "module-init-tools":

* Thu Mar 19 2009 Jon Masters <jcm@redhat.com> - 3.7-6 (pre9) - Rebuild with fixes, remove 2.4 compat and static build, and disable OSS.
Comment 3 Tom "spot" Callaway 2009-04-01 11:56:58 EDT
The solution is not as simple as using padsp in the initscript, because that will only work if a PulseAudio session is running... which will not be the case until a user logs in.

Talking to Lennart Poettering (PulseAudio upstream), the answer here is to migrate the code to use libasound/ALSA rather than OSS.
Comment 4 Tom "spot" Callaway 2009-04-13 17:52:53 EDT
I've patched it to use ALSA instead of OSS. Fixed in rawhide:

http://koji.fedoraproject.org/koji/taskinfo?taskID=1295601
Comment 5 Tom London 2009-04-13 18:05:47 EDT
I get SELinux AVCs when I start this:

#============= entropyd_t ==============
allow entropyd_t etc_t:file { read getattr open };
allow entropyd_t usr_t:file { read getattr open };

Looks to me that it wants to access/read /usr/share/alsa/alsa.conf and /etc/asound.conf.

Appears to start fine if I put system in permissive mode.

Adding Daniel Walsh.....




type=AVC msg=audit(1239659930.453:32149): avc:  denied  { getattr } for  pid=7288 comm="audio-entropyd" path="/usr/share/alsa/alsa.conf" dev=dm-1 ino=122971 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=SYSCALL msg=audit(1239659930.453:32149): arch=c000003e syscall=4 success=yes exit=0 a0=1845420 a1=7fffc299edd0 a2=7fffc299edd0 a3=7fffc299eb30 items=0 ppid=7287 pid=7288 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="audio-entropyd" exe="/usr/sbin/audio-entropyd" subj=unconfined_u:system_r:entropyd_t:s0 key=(null)
type=AVC msg=audit(1239659930.453:32150): avc:  denied  { read } for  pid=7288 comm="audio-entropyd" name="alsa.conf" dev=dm-1 ino=122971 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=AVC msg=audit(1239659930.453:32150): avc:  denied  { open } for  pid=7288 comm="audio-entropyd" name="alsa.conf" dev=dm-1 ino=122971 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=SYSCALL msg=audit(1239659930.453:32150): arch=c000003e syscall=2 success=yes exit=4 a0=1845420 a1=0 a2=1b6 a3=238 items=0 ppid=7287 pid=7288 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="audio-entropyd" exe="/usr/sbin/audio-entropyd" subj=unconfined_u:system_r:entropyd_t:s0 key=(null)
type=AVC msg=audit(1239659930.455:32151): avc:  denied  { read } for  pid=7288 comm="audio-entropyd" name="asound.conf" dev=dm-1 ino=25963 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1239659930.455:32151): arch=c000003e syscall=21 success=yes exit=0 a0=1853100 a1=4 a2=7fffc299ec40 a3=7fffc299e9b0 items=0 ppid=7287 pid=7288 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="audio-entropyd" exe="/usr/sbin/audio-entropyd" subj=unconfined_u:system_r:entropyd_t:s0 key=(null)
type=AVC msg=audit(1239659930.455:32152): avc:  denied  { open } for  pid=7288 comm="audio-entropyd" name="asound.conf" dev=dm-1 ino=25963 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1239659930.455:32152): arch=c000003e syscall=2 success=yes exit=4 a0=1853100 a1=0 a2=1b6 a3=238 items=0 ppid=7287 pid=7288 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="audio-entropyd" exe="/usr/sbin/audio-entropyd" subj=unconfined_u:system_r:entropyd_t:s0 key=(null)
type=AVC msg=audit(1239659930.455:32153): avc:  denied  { getattr } for  pid=7288 comm="audio-entropyd" path="/etc/asound.conf" dev=dm-1 ino=25963 scontext=unconfined_u:system_r:entropyd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1239659930.455:32153): arch=c000003e syscall=5 success=yes exit=0 a0=4 a1=7fffc299e9a0 a2=7fffc299e9a0 a3=20 items=0 ppid=7287 pid=7288 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="audio-entropyd" exe="/usr/sbin/audio-entropyd" subj=unconfined_u:system_r:entropyd_t:s0 key=(null)
Comment 6 Tom "spot" Callaway 2009-04-13 18:10:18 EDT
Hmm, yeah, it looks like the selinux-policy will need to be altered to reflect the fact that audio-entropyd is now an ALSA application. (audio-entropyd's policy is in the selinux-policy package).
Comment 7 Daniel Walsh 2009-04-14 08:18:24 EDT
Also added ability to read /var/lib/alsa/* 

and /etc/asound*

Not sure it is needed but will remove if not.

Fixed in selinux-policy-3.6.12-5.fc11.noarch

Note You need to log in before you can comment on or make changes to this bug.