Kernel: Honor permission mode when creating new directories in DevTmpFS

This commit is contained in:
Liav A 2022-02-14 14:51:38 +02:00 committed by Tim Flynn
parent f7f14d52e0
commit e23dda81de
Notes: sideshowbarker 2024-07-17 18:49:27 +09:00

View file

@ -258,6 +258,7 @@ ErrorOr<NonnullRefPtr<Inode>> DevTmpFSDirectoryInode::create_child(StringView na
if (metadata.is_directory()) {
auto name_kstring = TRY(KString::try_create(name));
auto new_directory_inode = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) DevTmpFSDirectoryInode(fs(), move(name_kstring))));
TRY(new_directory_inode->chmod(mode));
m_nodes.append(*new_directory_inode);
return new_directory_inode;
}