ALSA: hda: Always check capability at opening a hwdep
PATCH 1/1 ALSA: hda: Always check capability at opening a hwdep
We have a capability check at hda_hwdep_open(), but it's applied only conditionally and the check is skipped when CONFIG_SND_DEBUG_VERBOSE is set. This is rather inconsistent behavior, and we should apply the check always no matter which config is chosen.
Signed-off-by Takashi Iwai <[email protected]>
--- sound/pci/hda/hda_hwdep.c | 2 -- 1 file changed, 2 deletions(-)
sound/pci/hda/hda_hwdep.c +0 -2
@@ -84,10 +84,8 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file,static int hda_hwdep_open (struct snd_hwdep *hw,struct file *file) { -#ifndef CONFIG_SND_DEBUG_VERBOSE if (!capable (CAP_SYS_RAWIO ))return -EACCES ; -#endif return 0 ; }
Signature · 1 line
2.43.0
Quoted 6 lines · Takashi Iwai
We have a capability check at
hda_hwdep_open(), but it's applied only conditionally and the check is skipped whenCONFIG_SND_DEBUG_VERBOSEis set. This is rather inconsistent behavior, and we should apply the check always no matter which config is chosen.Signed-off-by Takashi Iwai <[email protected]>
It makes sense.
Reviewed-by Jaroslav Kysela <[email protected]>
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.