Driver-Core: extend devnode callbacks to provide permissions
This allows subsytems to provide devtmpfs with non-default permissions for the device node. Instead of the default mode of 0600, null, zero, random, urandom, full, tty, ptmx now have a mode of 0666, which allows non-privileged processes to access standard device nodes in case no other userspace process applies the expected permissions. This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
このコミットが含まれているのは:
@@ -29,7 +29,7 @@ MODULE_DESCRIPTION("Core sound module");
|
||||
MODULE_AUTHOR("Alan Cox");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static char *sound_nodename(struct device *dev)
|
||||
static char *sound_devnode(struct device *dev, mode_t *mode)
|
||||
{
|
||||
if (MAJOR(dev->devt) == SOUND_MAJOR)
|
||||
return NULL;
|
||||
@@ -50,7 +50,7 @@ static int __init init_soundcore(void)
|
||||
return PTR_ERR(sound_class);
|
||||
}
|
||||
|
||||
sound_class->nodename = sound_nodename;
|
||||
sound_class->devnode = sound_devnode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
新しいイシューから参照
ユーザーをブロックする