summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorShell <[email protected]>2024-09-14 16:49:37 +0800
committerMeco Man <[email protected]>2024-09-15 13:29:43 -0400
commitd45e13c47193babdc4f3c435279e9077212cf2bb (patch)
tree0ec249f8835c2de2daf50c02d2226b9e113673e5 /components
parentbeb7bc42de61830d356afb4096442e81b55958a0 (diff)
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 <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/dfs/dfs_v2/filesystems/devfs/devfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/dfs/dfs_v2/filesystems/devfs/devfs.c b/components/dfs/dfs_v2/filesystems/devfs/devfs.c
index c8c66667db..22d24bd684 100644
--- a/components/dfs/dfs_v2/filesystems/devfs/devfs.c
+++ b/components/dfs/dfs_v2/filesystems/devfs/devfs.c
@@ -408,16 +408,16 @@ mode_t dfs_devfs_device_to_mode(struct rt_device *device)
switch (device->type)
{
case RT_Device_Class_Char:
- mode = S_IFCHR | 0777;
+ mode = S_IFCHR | 0666;
break;
case RT_Device_Class_Block:
- mode = S_IFBLK | 0777;
+ mode = S_IFBLK | 0666;
break;
case RT_Device_Class_Pipe:
- mode = S_IFIFO | 0777;
+ mode = S_IFIFO | 0666;
break;
default:
- mode = S_IFCHR | 0777;
+ mode = S_IFCHR | 0666;
break;
}