瀏覽代碼

wallpaper: Add pledge promises

networkException 3 年之前
父節點
當前提交
2cdc7c4ca0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Userland/Utilities/wallpaper.cpp

+ 5 - 0
Userland/Utilities/wallpaper.cpp

@@ -10,12 +10,15 @@
 #include <AK/StringBuilder.h>
 #include <AK/StringBuilder.h>
 #include <LibCore/ArgsParser.h>
 #include <LibCore/ArgsParser.h>
 #include <LibCore/DirIterator.h>
 #include <LibCore/DirIterator.h>
+#include <LibCore/System.h>
 #include <LibGUI/Application.h>
 #include <LibGUI/Application.h>
 #include <LibGUI/Desktop.h>
 #include <LibGUI/Desktop.h>
 #include <LibMain/Main.h>
 #include <LibMain/Main.h>
 
 
 ErrorOr<int> serenity_main(Main::Arguments arguments)
 ErrorOr<int> serenity_main(Main::Arguments arguments)
 {
 {
+    TRY(Core::System::pledge("stdio rpath unix sendfd recvfd"));
+
     bool show_all = false;
     bool show_all = false;
     bool show_current = false;
     bool show_current = false;
     bool set_random = false;
     bool set_random = false;
@@ -30,6 +33,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
 
 
     auto app = TRY(GUI::Application::try_create(arguments));
     auto app = TRY(GUI::Application::try_create(arguments));
 
 
+    TRY(Core::System::pledge("stdio rpath unix sendfd"));
+
     if (show_all) {
     if (show_all) {
         Core::DirIterator wallpapers_directory_iterator("/res/wallpapers", Core::DirIterator::SkipDots);
         Core::DirIterator wallpapers_directory_iterator("/res/wallpapers", Core::DirIterator::SkipDots);
         if (wallpapers_directory_iterator.has_error())
         if (wallpapers_directory_iterator.has_error())