On Oct 17 11:46:07, dera...@openbsd.org wrote:
> Jan Stary <h...@stare.cz> wrote:
> 
> > On Oct 17 11:29:58, dera...@openbsd.org wrote:
> > > Jan Stary <h...@stare.cz> wrote:
> > > 
> > > > On Oct 17 11:02:19, dera...@openbsd.org wrote:
> > > > > Jan Stary <h...@stare.cz> wrote:
> > > > > 
> > > > > > Currently, the decription of sndiod -a says
> > > > > > 
> > > > > >     If the flag is off, then it's automatically closed,
> > > > > >     allowing other programs to have direct access to the audio 
> > > > > > device,
> > > > > >     or the device to be disconnected. The default is off.
> > > > > > 
> > > > > > That's not true anymore: programs only access the audio HW
> > > > > > through the running sndiod, right?
> > > > > 
> > > > > and if there is no running sndiod, then someone who has written a
> > > > > program to access the audio hardware directly, can.
> > > > 
> > > > crw-rw----  1 root  _sndiop   42,   0 Oct 17 19:04 /dev/audio0
> > > > crw-rw----  1 root  _sndiop   42,   1 Oct 16 09:29 /dev/audio1
> > > > crw-rw----  1 root  _sndiop   42,   2 Oct 15 21:24 /dev/audio2
> > > > crw-rw----  1 root  _sndiop   42,   3 Oct 15 21:24 /dev/audio3
> > > > crw-rw----  1 root  _sndiop   42, 192 Oct 15 21:24 /dev/audioctl0
> > > > crw-rw----  1 root  _sndiop   42, 193 Oct 15 21:24 /dev/audioctl1
> > > > crw-rw----  1 root  _sndiop   42, 194 Oct 15 21:24 /dev/audioctl2
> > > > crw-rw----  1 root  _sndiop   42, 195 Oct 15 21:24 /dev/audioctl3
> > > > 
> > > > The device is chgrp'ed precisely so that they _can't_, right?
> > > 
> > > What if the other program is run as root, and the reader has permission?
> > 
> > Well, a program run as root can do whatever it wants.
> > 
> > What I meant was the wording in the sndiod -a documentation:
> > for "other programs to have direct access to the audio device",
> > they would have to be in the _sndiop group or be root.
> > 
> > I don't think that's the intended meaning: before the change,
> > a user program (such as sox(1)) could play directly to the device
> > when sndiod -a off was not using it. Now it can't.
> > The current wording seems to be a relict.
> 
> This is the sndiod page.  It is describing the behaviour of the sndiod.
> It is describing how it opens and closes devices.
> 
> Does it still open and close devices that way?
> 
> I'm not talking about whether someone use it.  Obviously someone as
> root can rely on this open or close behaviour, if the open and close
> behaviour code is still there.

OK, got it; thanks.

Jan

Reply via email to