mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:27:35 +00:00
parent
2944039d6b
commit
54cb1e36b6
1 changed files with 4 additions and 0 deletions
|
@ -305,6 +305,10 @@ KResult VFS::mknod(StringView path, mode_t mode, dev_t dev, Custody& base)
|
||||||
|
|
||||||
KResultOr<NonnullRefPtr<FileDescription>> VFS::create(StringView path, int options, mode_t mode, Custody& parent_custody, Optional<UidAndGid> owner)
|
KResultOr<NonnullRefPtr<FileDescription>> VFS::create(StringView path, int options, mode_t mode, Custody& parent_custody, Optional<UidAndGid> owner)
|
||||||
{
|
{
|
||||||
|
auto result = validate_path_against_process_veil(path, options);
|
||||||
|
if (result.is_error())
|
||||||
|
return result;
|
||||||
|
|
||||||
if (!is_socket(mode) && !is_fifo(mode) && !is_block_device(mode) && !is_character_device(mode)) {
|
if (!is_socket(mode) && !is_fifo(mode) && !is_block_device(mode) && !is_character_device(mode)) {
|
||||||
// Turn it into a regular file. (This feels rather hackish.)
|
// Turn it into a regular file. (This feels rather hackish.)
|
||||||
mode |= 0100000;
|
mode |= 0100000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue