summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2022-04-03 16:16:06 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-04-03 17:13:51 -0700
commitaf3751e4dd7301d1b51a6c4154eaf03b4daf2717 (patch)
tree3552e9d134755cba1006872e6b3eec63f7696647
parent4d0317ae7a54614eff64e9b60ca6ec391dd978ac (diff)
downloadserenity-af3751e4dd7301d1b51a6c4154eaf03b4daf2717.zip
Utilities: Use default execpromises parameter to `pledge(..)`
-rw-r--r--Userland/Utilities/abench.cpp2
-rw-r--r--Userland/Utilities/asctl.cpp2
-rw-r--r--Userland/Utilities/checksum.cpp2
-rw-r--r--Userland/Utilities/chgrp.cpp2
-rw-r--r--Userland/Utilities/chown.cpp2
-rw-r--r--Userland/Utilities/clear.cpp2
-rw-r--r--Userland/Utilities/comm.cpp2
-rw-r--r--Userland/Utilities/date.cpp2
-rw-r--r--Userland/Utilities/gml-format.cpp4
-rw-r--r--Userland/Utilities/grep.cpp2
-rw-r--r--Userland/Utilities/groups.cpp2
-rw-r--r--Userland/Utilities/head.cpp2
-rw-r--r--Userland/Utilities/host.cpp2
-rw-r--r--Userland/Utilities/less.cpp4
-rw-r--r--Userland/Utilities/sleep.cpp2
-rw-r--r--Userland/Utilities/stat.cpp2
-rw-r--r--Userland/Utilities/watch.cpp4
-rw-r--r--Userland/Utilities/xargs.cpp2
18 files changed, 21 insertions, 21 deletions
diff --git a/Userland/Utilities/abench.cpp b/Userland/Utilities/abench.cpp
index 5c81e3d5d2..ea1d7af4ad 100644
--- a/Userland/Utilities/abench.cpp
+++ b/Userland/Utilities/abench.cpp
@@ -30,7 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
TRY(Core::System::unveil(Core::File::absolute_path(path), "r"));
TRY(Core::System::unveil(nullptr, nullptr));
- TRY(Core::System::pledge("stdio recvfd rpath", nullptr));
+ TRY(Core::System::pledge("stdio recvfd rpath"));
auto maybe_loader = Audio::Loader::create(path);
if (maybe_loader.is_error()) {
diff --git a/Userland/Utilities/asctl.cpp b/Userland/Utilities/asctl.cpp
index b3df2fd49d..9bbf07edcc 100644
--- a/Userland/Utilities/asctl.cpp
+++ b/Userland/Utilities/asctl.cpp
@@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.parse(arguments);
TRY(Core::System::unveil(nullptr, nullptr));
- TRY(Core::System::pledge("stdio rpath wpath recvfd", nullptr));
+ TRY(Core::System::pledge("stdio rpath wpath recvfd"));
if (command.equals_ignoring_case("get") || command == "g") {
// Get variables
diff --git a/Userland/Utilities/checksum.cpp b/Userland/Utilities/checksum.cpp
index 6325898b8c..f30d97d71e 100644
--- a/Userland/Utilities/checksum.cpp
+++ b/Userland/Utilities/checksum.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"));
auto program_name = LexicalPath::basename(arguments.strings[0]);
auto hash_kind = Crypto::Hash::HashKind::None;
diff --git a/Userland/Utilities/chgrp.cpp b/Userland/Utilities/chgrp.cpp
index 6ebe9e548f..8e8a9c1c3f 100644
--- a/Userland/Utilities/chgrp.cpp
+++ b/Userland/Utilities/chgrp.cpp
@@ -13,7 +13,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio rpath chown", nullptr));
+ TRY(Core::System::pledge("stdio rpath chown"));
char const* gid_arg = nullptr;
char const* path = nullptr;
diff --git a/Userland/Utilities/chown.cpp b/Userland/Utilities/chown.cpp
index 30bac63045..d215577a9a 100644
--- a/Userland/Utilities/chown.cpp
+++ b/Userland/Utilities/chown.cpp
@@ -18,7 +18,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio rpath chown", nullptr));
+ TRY(Core::System::pledge("stdio rpath chown"));
String spec;
String path;
diff --git a/Userland/Utilities/clear.cpp b/Userland/Utilities/clear.cpp
index e8fc9fea72..d3e2136666 100644
--- a/Userland/Utilities/clear.cpp
+++ b/Userland/Utilities/clear.cpp
@@ -10,7 +10,7 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
- TRY(Core::System::pledge("stdio", nullptr));
+ TRY(Core::System::pledge("stdio"));
printf("\033[3J\033[H\033[2J");
fflush(stdout);
return 0;
diff --git a/Userland/Utilities/comm.cpp b/Userland/Utilities/comm.cpp
index 6abe5eedd6..a71549411c 100644
--- a/Userland/Utilities/comm.cpp
+++ b/Userland/Utilities/comm.cpp
@@ -18,7 +18,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio rpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath"));
String file1_path, file2_path;
bool suppress_col1 { false };
diff --git a/Userland/Utilities/date.cpp b/Userland/Utilities/date.cpp
index 1573fb1c4e..0d44e37d60 100644
--- a/Userland/Utilities/date.cpp
+++ b/Userland/Utilities/date.cpp
@@ -13,7 +13,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio settime rpath", nullptr));
+ TRY(Core::System::pledge("stdio settime rpath"));
bool print_unix_date = false;
bool print_iso_8601 = false;
diff --git a/Userland/Utilities/gml-format.cpp b/Userland/Utilities/gml-format.cpp
index d764d823cb..5912a3bb0e 100644
--- a/Userland/Utilities/gml-format.cpp
+++ b/Userland/Utilities/gml-format.cpp
@@ -49,7 +49,7 @@ ErrorOr<bool> format_file(StringView path, bool inplace)
ErrorOr<int> serenity_main(Main::Arguments args)
{
#ifdef __serenity__
- TRY(Core::System::pledge("stdio rpath wpath cpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath wpath cpath"));
#endif
bool inplace = false;
@@ -63,7 +63,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
#ifdef __serenity__
if (!inplace)
- TRY(Core::System::pledge("stdio rpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath"));
#endif
if (files.is_empty())
diff --git a/Userland/Utilities/grep.cpp b/Userland/Utilities/grep.cpp
index e0ae1fcb46..c9e3dd8116 100644
--- a/Userland/Utilities/grep.cpp
+++ b/Userland/Utilities/grep.cpp
@@ -35,7 +35,7 @@ void fail(StringView format, Ts... args)
ErrorOr<int> serenity_main(Main::Arguments args)
{
- TRY(Core::System::pledge("stdio rpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath"));
String program_name = AK::LexicalPath::basename(args.strings[0]);
diff --git a/Userland/Utilities/groups.cpp b/Userland/Utilities/groups.cpp
index f67041a694..caa9c6a55f 100644
--- a/Userland/Utilities/groups.cpp
+++ b/Userland/Utilities/groups.cpp
@@ -33,7 +33,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"));
Vector<char const*> usernames;
diff --git a/Userland/Utilities/head.cpp b/Userland/Utilities/head.cpp
index 35163e202b..d3d45e2bb7 100644
--- a/Userland/Utilities/head.cpp
+++ b/Userland/Utilities/head.cpp
@@ -18,7 +18,7 @@ int head(String const& filename, bool print_filename, ssize_t line_count, ssize_
ErrorOr<int> serenity_main(Main::Arguments args)
{
- TRY(Core::System::pledge("stdio rpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath"));
int line_count = -1;
int byte_count = -1;
diff --git a/Userland/Utilities/host.cpp b/Userland/Utilities/host.cpp
index 959dee48dc..993f273721 100644
--- a/Userland/Utilities/host.cpp
+++ b/Userland/Utilities/host.cpp
@@ -14,7 +14,7 @@
ErrorOr<int> serenity_main(Main::Arguments args)
{
- TRY(Core::System::pledge("stdio unix", nullptr));
+ TRY(Core::System::pledge("stdio unix"));
char const* name_or_ip = nullptr;
Core::ArgsParser args_parser;
diff --git a/Userland/Utilities/less.cpp b/Userland/Utilities/less.cpp
index de7fef050b..e840c8737b 100644
--- a/Userland/Utilities/less.cpp
+++ b/Userland/Utilities/less.cpp
@@ -524,7 +524,7 @@ static void cat_file(FILE* file)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio rpath tty sigaction", nullptr));
+ TRY(Core::System::pledge("stdio rpath tty sigaction"));
char const* filename = "-";
char const* prompt = "?f%f :.(line %l)?e (END):.";
@@ -557,7 +557,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
g_resized = true;
});
- TRY(Core::System::pledge("stdio tty", nullptr));
+ TRY(Core::System::pledge("stdio tty"));
if (emulate_more) {
// Configure options that match more's behavior
diff --git a/Userland/Utilities/sleep.cpp b/Userland/Utilities/sleep.cpp
index b80dd37c7b..aef162b7d7 100644
--- a/Userland/Utilities/sleep.cpp
+++ b/Userland/Utilities/sleep.cpp
@@ -34,7 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
sa.sa_handler = handle_sigint;
sigaction(SIGINT, &sa, nullptr);
- TRY(Core::System::pledge("stdio sigaction", nullptr));
+ TRY(Core::System::pledge("stdio sigaction"));
double whole_seconds = static_cast<time_t>(secs);
double fraction = secs - whole_seconds;
diff --git a/Userland/Utilities/stat.cpp b/Userland/Utilities/stat.cpp
index 0a0c9d03ff..e96f93f31e 100644
--- a/Userland/Utilities/stat.cpp
+++ b/Userland/Utilities/stat.cpp
@@ -88,7 +88,7 @@ static ErrorOr<int> stat(StringView file, bool should_follow_links)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- TRY(Core::System::pledge("stdio rpath", nullptr));
+ TRY(Core::System::pledge("stdio rpath"));
bool should_follow_links = false;
Vector<StringView> files;
diff --git a/Userland/Utilities/watch.cpp b/Userland/Utilities/watch.cpp
index c749ed16c6..265899531a 100644
--- a/Userland/Utilities/watch.cpp
+++ b/Userland/Utilities/watch.cpp
@@ -110,7 +110,7 @@ static int run_command(Vector<char const*> const& command)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::signal(SIGINT, handle_signal));
- TRY(Core::System::pledge("stdio proc exec rpath", nullptr));
+ TRY(Core::System::pledge("stdio proc exec rpath"));
Vector<String> files_to_watch;
Vector<char const*> command;
@@ -184,7 +184,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
}
} else {
- TRY(Core::System::pledge("stdio proc exec", nullptr));
+ TRY(Core::System::pledge("stdio proc exec"));
struct timeval interval;
if (opt_interval <= 0) {
diff --git a/Userland/Utilities/xargs.cpp b/Userland/Utilities/xargs.cpp
index de9644e310..a7e65302ad 100644
--- a/Userland/Utilities/xargs.cpp
+++ b/Userland/Utilities/xargs.cpp
@@ -40,7 +40,7 @@ private:
ErrorOr<int> serenity_main(Main::Arguments main_arguments)
{
- TRY(Core::System::pledge("stdio rpath proc exec", nullptr));
+ TRY(Core::System::pledge("stdio rpath proc exec"));
char const* placeholder = nullptr;
bool split_with_nulls = false;