Kernel: Allow open with O_CREAT bypass file permission checks
call to open(path, O_CREAT|O_EXCL|O_RDWR, 0444) should open file as read-write although file is created as read-only on filesystem.
This commit is contained in:
parent
2dec3a6c95
commit
0a5aacfd87
|
@ -963,7 +963,7 @@ namespace Kernel
|
|||
|
||||
// FIXME: There is a race condition between next two lines
|
||||
TRY(create_file_or_dir(parent_file, path, (mode & 0777) | Inode::Mode::IFREG));
|
||||
file = TRY(VirtualFileSystem::get().file_from_relative_path(parent_file, m_credentials, path, flags));
|
||||
file = TRY(VirtualFileSystem::get().file_from_relative_path(parent_file, m_credentials, path, flags & ~O_RDWR));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue