fixup: dfs_v2: Correct device mode permissions in devfs
The mode permissions for character, block, and pipe devices were previously set to 0777, which is overly permissive and not in line with standard practice. This change reduces the permissions to 0666, restricting execute permissions while still allowing read/write access. Changes: - Adjusted permissions for character/block/pipe devices from 0777 to 0666. Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
parent
beb7bc42de
commit
d45e13c471
|
@ -408,16 +408,16 @@ mode_t dfs_devfs_device_to_mode(struct rt_device *device)
|
||||||
switch (device->type)
|
switch (device->type)
|
||||||
{
|
{
|
||||||
case RT_Device_Class_Char:
|
case RT_Device_Class_Char:
|
||||||
mode = S_IFCHR | 0777;
|
mode = S_IFCHR | 0666;
|
||||||
break;
|
break;
|
||||||
case RT_Device_Class_Block:
|
case RT_Device_Class_Block:
|
||||||
mode = S_IFBLK | 0777;
|
mode = S_IFBLK | 0666;
|
||||||
break;
|
break;
|
||||||
case RT_Device_Class_Pipe:
|
case RT_Device_Class_Pipe:
|
||||||
mode = S_IFIFO | 0777;
|
mode = S_IFIFO | 0666;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mode = S_IFCHR | 0777;
|
mode = S_IFCHR | 0666;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue