NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: User with no write permission on device can play audio

On Sat, Apr 7, 2012 at 2:02 PM, Mayuresh <> wrote:
> Understood that flash plugin runs via Linux emulation, which uses devices
> under emul/linux/
> To impose desired permissions for software that uses Linux emulation, I
> need to set the permissions under emul/linu/dev/sound* etc.
> Still wonder, isn't the physical device ultimately same? Can't setting the
> permissions on /dev/sound* restrict the permissions even for emulated
> devices? Does something run with setuid?

The permissions are on the _file_, not the kernel device.  Therefore,
if you have multiple device files pointing to the same major/minor
device combination, you'll need to ensure that all these files have
the appropriate permissions set.  Otherwise, as you have found, one
file will allow access to the hardware while the other won't.

And that's why mknod(2) won't allow regular users to create device files.

Julio Merino / @jmmv

Home | Main Index | Thread Index | Old Index