瀏覽代碼

Kernel: Make sys$anon_create() require the "stdio" promise if pledged

Andreas Kling 4 年之前
父節點
當前提交
7899e14e72
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Kernel/Syscalls/anon_create.cpp

+ 2 - 0
Kernel/Syscalls/anon_create.cpp

@@ -33,6 +33,8 @@ namespace Kernel {
 
 int Process::sys$anon_create(size_t size, int options)
 {
+    REQUIRE_PROMISE(stdio);
+
     if (size % PAGE_SIZE)
         return -EINVAL;