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 Apr 7, 2012, at 8:02 PM, Mayuresh wrote:

> On Sat, Apr 07, 2012 at 12:54:02AM +0530, Mayuresh wrote:
>> I have set ownership of /dev/audio* and /dev/sound* /dev/hdaudio* to say
>> user1 with no rwx permission for group and other. (Don't know which of
>> audio*/hdaudio*/sound* matters. I have done it for all.)
>> Now as user2 - who has no permission of any kind on above devices, if I
>> play something using mplayer, it says permission denied. However if as
>> user2, I play something in firefox through flash plugin it plays the
>> sound.
> 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?

Possibly yes.

> Can't setting the
> permissions on /dev/sound* restrict the permissions even for emulated
> devices?

No, there are no permissions for devices, permissions are on file nodes
referring o devices.

> Does something run with setuid?

Juergen Hannken-Illjes - - TU Braunschweig 

Home | Main Index | Thread Index | Old Index