Kernel: File::open() should apply r/w mode from the provided options

This has been a FIXME for a long time. We now apply the provided
read/write permissions to the constructed FileDescription when opening
a File object via File::open().
This commit is contained in:
Andreas Kling 2020-01-04 12:29:33 +01:00
commit b5da0b78eb
Notes: sideshowbarker 2024-07-19 10:23:00 +09:00
2 changed files with 6 additions and 4 deletions

View file

@ -11,8 +11,9 @@ File::~File()
KResultOr<NonnullRefPtr<FileDescription>> File::open(int options)
{
UNUSED_PARAM(options);
return FileDescription::create(*this);
auto description = FileDescription::create(*this);
description->set_rw_mode(options);
return description;
}
void File::close()