diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-11-27 14:26:34 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-28 08:04:57 +0100 |
commit | cf4fa936be63a8f5931886142daca54b99293a52 (patch) | |
tree | fcb69966e7fd2a16d30ed2e40e85d2245f1dd409 /Userland/Utilities | |
parent | 44ffe3e5bb2659fcd4bcd65adaf5fb6e855a9c4f (diff) | |
download | serenity-cf4fa936be63a8f5931886142daca54b99293a52.zip |
Everywhere: Use default execpromises argument for Core::System::pledge
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/arp.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/base64.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/basename.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/blockdev.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/bt.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/cat.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/cp.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/dmesg.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/echo.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/id.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/js.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/keymap.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/logout.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/lsusb.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/man.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/nproc.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/pmap.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/ps.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/truncate.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/userdel.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/usermod.cpp | 4 | ||||
-rw-r--r-- | Userland/Utilities/utmpupdate.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/w.cpp | 2 |
23 files changed, 30 insertions, 30 deletions
diff --git a/Userland/Utilities/arp.cpp b/Userland/Utilities/arp.cpp index af074e4c61..bef0fad522 100644 --- a/Userland/Utilities/arp.cpp +++ b/Userland/Utilities/arp.cpp @@ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath tty", nullptr)); + TRY(Core::System::pledge("stdio rpath tty")); TRY(Core::System::unveil("/proc/net/arp", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/base64.cpp b/Userland/Utilities/base64.cpp index 190eb6558e..0febee2374 100644 --- a/Userland/Utilities/base64.cpp +++ b/Userland/Utilities/base64.cpp @@ -17,7 +17,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); bool decode = false; const char* filepath = nullptr; @@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) buffer = file->read_all(); } - TRY(Core::System::pledge("stdio", nullptr)); + TRY(Core::System::pledge("stdio")); if (decode) { auto decoded = decode_base64(StringView(buffer)); diff --git a/Userland/Utilities/basename.cpp b/Userland/Utilities/basename.cpp index 08b842ba22..545119d2c4 100644 --- a/Userland/Utilities/basename.cpp +++ b/Userland/Utilities/basename.cpp @@ -11,7 +11,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio", nullptr)); + TRY(Core::System::pledge("stdio")); StringView path; StringView suffix; diff --git a/Userland/Utilities/blockdev.cpp b/Userland/Utilities/blockdev.cpp index 06ed0549ee..f911347ac4 100644 --- a/Userland/Utilities/blockdev.cpp +++ b/Userland/Utilities/blockdev.cpp @@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { TRY(Core::System::unveil("/dev", "r")); TRY(Core::System::unveil(nullptr, nullptr)); - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); const char* device = nullptr; diff --git a/Userland/Utilities/bt.cpp b/Userland/Utilities/bt.cpp index f0cd6b7875..c0d33c3d63 100644 --- a/Userland/Utilities/bt.cpp +++ b/Userland/Utilities/bt.cpp @@ -17,7 +17,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); auto hostname = TRY(Core::System::gethostname()); Core::ArgsParser args_parser; diff --git a/Userland/Utilities/cat.cpp b/Userland/Utilities/cat.cpp index 4c0d5be9e8..88c4268ab3 100644 --- a/Userland/Utilities/cat.cpp +++ b/Userland/Utilities/cat.cpp @@ -14,7 +14,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); Vector<StringView> paths; @@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } } - TRY(Core::System::pledge("stdio", nullptr)); + TRY(Core::System::pledge("stdio")); Array<u8, 32768> buffer; for (auto& fd : fds) { diff --git a/Userland/Utilities/cp.cpp b/Userland/Utilities/cp.cpp index 4c1d4ecc96..930807a77b 100644 --- a/Userland/Utilities/cp.cpp +++ b/Userland/Utilities/cp.cpp @@ -14,7 +14,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath wpath cpath fattr chown", nullptr)); + TRY(Core::System::pledge("stdio rpath wpath cpath fattr chown")); bool link = false; bool preserve = false; @@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (preserve) { umask(0); } else { - TRY(Core::System::pledge("stdio rpath wpath cpath fattr", nullptr)); + TRY(Core::System::pledge("stdio rpath wpath cpath fattr")); } bool destination_is_existing_dir = Core::File::is_directory(destination); diff --git a/Userland/Utilities/dmesg.cpp b/Userland/Utilities/dmesg.cpp index 7877ae9288..15d33eebd5 100644 --- a/Userland/Utilities/dmesg.cpp +++ b/Userland/Utilities/dmesg.cpp @@ -10,7 +10,7 @@ ErrorOr<int> serenity_main(Main::Arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); TRY(Core::System::unveil("/proc/dmesg", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/echo.cpp b/Userland/Utilities/echo.cpp index 40b5519641..6e8850ba40 100644 --- a/Userland/Utilities/echo.cpp +++ b/Userland/Utilities/echo.cpp @@ -99,7 +99,7 @@ static String interpret_backslash_escapes(StringView string, bool& no_trailing_n ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio", nullptr)); + TRY(Core::System::pledge("stdio")); Vector<const char*> text; bool no_trailing_newline = false; diff --git a/Userland/Utilities/id.cpp b/Userland/Utilities/id.cpp index 7bc7bb388f..97a2f40305 100644 --- a/Userland/Utilities/id.cpp +++ b/Userland/Utilities/id.cpp @@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(Core::System::unveil("/etc/passwd", "r")); TRY(Core::System::unveil("/etc/group", "r")); TRY(Core::System::unveil(nullptr, nullptr)); - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); Core::ArgsParser args_parser; args_parser.add_option(flag_print_uid, "Print UID", nullptr, 'u'); diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 22bb3675c6..26daa17e75 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -1158,7 +1158,7 @@ public: ErrorOr<int> serenity_main(Main::Arguments arguments) { #ifdef __serenity__ - TRY(Core::System::pledge("stdio rpath wpath cpath tty sigaction", nullptr)); + TRY(Core::System::pledge("stdio rpath wpath cpath tty sigaction")); #endif bool gc_on_every_allocation = false; diff --git a/Userland/Utilities/keymap.cpp b/Userland/Utilities/keymap.cpp index 24974009e3..52fe2ddec8 100644 --- a/Userland/Utilities/keymap.cpp +++ b/Userland/Utilities/keymap.cpp @@ -13,7 +13,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio setkeymap getkeymap rpath wpath cpath", nullptr)); + TRY(Core::System::pledge("stdio setkeymap getkeymap rpath wpath cpath")); TRY(Core::System::unveil("/res/keymaps", "r")); TRY(Core::System::unveil("/etc/Keyboard.ini", "rwc")); diff --git a/Userland/Utilities/logout.cpp b/Userland/Utilities/logout.cpp index b9597c32ee..bafedc4de4 100644 --- a/Userland/Utilities/logout.cpp +++ b/Userland/Utilities/logout.cpp @@ -20,7 +20,7 @@ static Core::ProcessStatistics const& get_proc(Core::AllProcessesStatistics cons ErrorOr<int> serenity_main(Main::Arguments) { - TRY(Core::System::pledge("stdio proc rpath", nullptr)); + TRY(Core::System::pledge("stdio proc rpath")); TRY(Core::System::unveil("/proc/all", "r")); TRY(Core::System::unveil("/etc/passwd", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/lsusb.cpp b/Userland/Utilities/lsusb.cpp index eb16029a4f..5ae4e2f3f4 100644 --- a/Userland/Utilities/lsusb.cpp +++ b/Userland/Utilities/lsusb.cpp @@ -20,7 +20,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); TRY(Core::System::unveil("/sys/bus/usb", "r")); TRY(Core::System::unveil("/res/usb.ids", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/man.cpp b/Userland/Utilities/man.cpp index 179f1ef62f..08128c27bf 100644 --- a/Userland/Utilities/man.cpp +++ b/Userland/Utilities/man.cpp @@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (view_width == 0) view_width = 80; - TRY(Core::System::pledge("stdio rpath exec proc", nullptr)); + TRY(Core::System::pledge("stdio rpath exec proc")); TRY(Core::System::unveil("/usr/share/man", "r")); TRY(Core::System::unveil("/bin", "x")); TRY(Core::System::unveil(nullptr, nullptr)); @@ -108,7 +108,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto file = TRY(Core::File::open(filename, Core::OpenMode::ReadOnly)); - TRY(Core::System::pledge("stdio proc", nullptr)); + TRY(Core::System::pledge("stdio proc")); dbgln("Loading man page from {}", file->filename()); auto buffer = file->read_all(); diff --git a/Userland/Utilities/nproc.cpp b/Userland/Utilities/nproc.cpp index 6358078b22..e1f9f9a5fe 100644 --- a/Userland/Utilities/nproc.cpp +++ b/Userland/Utilities/nproc.cpp @@ -11,7 +11,7 @@ ErrorOr<int> serenity_main(Main::Arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); auto file = TRY(Core::File::open("/proc/cpuinfo", Core::OpenMode::ReadOnly)); auto buffer = file->read_all(); diff --git a/Userland/Utilities/pmap.cpp b/Userland/Utilities/pmap.cpp index a558a9ab52..7d465d0fd9 100644 --- a/Userland/Utilities/pmap.cpp +++ b/Userland/Utilities/pmap.cpp @@ -14,7 +14,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); TRY(Core::System::unveil("/proc", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/ps.cpp b/Userland/Utilities/ps.cpp index bb214a6bee..73eca9db5b 100644 --- a/Userland/Utilities/ps.cpp +++ b/Userland/Utilities/ps.cpp @@ -13,10 +13,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath tty", nullptr)); + TRY(Core::System::pledge("stdio rpath tty")); String this_tty = ttyname(STDIN_FILENO); - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); TRY(Core::System::unveil("/proc/all", "r")); TRY(Core::System::unveil("/etc/passwd", "r")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/truncate.cpp b/Userland/Utilities/truncate.cpp index 50a615fccf..4f7b1442ad 100644 --- a/Userland/Utilities/truncate.cpp +++ b/Userland/Utilities/truncate.cpp @@ -20,7 +20,7 @@ enum TruncateOperation { ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio rpath wpath cpath", nullptr)); + TRY(Core::System::pledge("stdio rpath wpath cpath")); const char* resize = nullptr; const char* reference = nullptr; diff --git a/Userland/Utilities/userdel.cpp b/Userland/Utilities/userdel.cpp index 7a2c40e48d..74d939a5f3 100644 --- a/Userland/Utilities/userdel.cpp +++ b/Userland/Utilities/userdel.cpp @@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio wpath rpath cpath fattr proc exec", nullptr)); + TRY(Core::System::pledge("stdio wpath rpath cpath fattr proc exec")); TRY(Core::System::unveil("/etc/", "rwc")); TRY(Core::System::unveil("/bin/rm", "x")); @@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (remove_home) { TRY(Core::System::unveil(target_account.home_directory().characters(), "c")); } else { - TRY(Core::System::pledge("stdio wpath rpath cpath fattr", nullptr)); + TRY(Core::System::pledge("stdio wpath rpath cpath fattr")); } TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/usermod.cpp b/Userland/Utilities/usermod.cpp index 59504cb1ce..2b4a121407 100644 --- a/Userland/Utilities/usermod.cpp +++ b/Userland/Utilities/usermod.cpp @@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) return 1; } - TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty", nullptr)); + TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty")); TRY(Core::System::unveil("/etc", "rwc")); int uid = 0; @@ -136,7 +136,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) target_account.set_gecos(gecos); } - TRY(Core::System::pledge("stdio wpath rpath cpath fattr", nullptr)); + TRY(Core::System::pledge("stdio wpath rpath cpath fattr")); if (!target_account.sync()) { perror("Core::Account::Sync"); return 1; diff --git a/Userland/Utilities/utmpupdate.cpp b/Userland/Utilities/utmpupdate.cpp index a0650ef016..3882b4d788 100644 --- a/Userland/Utilities/utmpupdate.cpp +++ b/Userland/Utilities/utmpupdate.cpp @@ -17,7 +17,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { - TRY(Core::System::pledge("stdio wpath cpath", nullptr)); + TRY(Core::System::pledge("stdio wpath cpath")); TRY(Core::System::unveil("/var/run/utmp", "rwc")); TRY(Core::System::unveil(nullptr, nullptr)); diff --git a/Userland/Utilities/w.cpp b/Userland/Utilities/w.cpp index 5729a5246f..31c52667c3 100644 --- a/Userland/Utilities/w.cpp +++ b/Userland/Utilities/w.cpp @@ -17,7 +17,7 @@ ErrorOr<int> serenity_main(Main::Arguments) { - TRY(Core::System::pledge("stdio rpath", nullptr)); + TRY(Core::System::pledge("stdio rpath")); TRY(Core::System::unveil("/dev", "r")); TRY(Core::System::unveil("/etc/passwd", "r")); TRY(Core::System::unveil("/var/run/utmp", "r")); |