summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-22 18:42:57 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-22 19:39:44 +0100
commit2cd07c6212ab3c2607e8bd2a94f21aa82e3c5fd9 (patch)
treedcd49e5c0fc5ee72bfe02894a9cbda8cbb109cd5
parent421587c15ccdef4764f45a281ffe1d01bd027ed6 (diff)
downloadserenity-2cd07c6212ab3c2607e8bd2a94f21aa82e3c5fd9.zip
Kernel+Userland: Remove "dns" pledge promise alias
This was just an alias for "unix" that I added early on back when there was some belief that we might be compatible with OpenBSD. We're clearly never going to be compatible with their pledges so just drop the alias.
-rw-r--r--Kernel/Syscalls/pledge.cpp5
-rw-r--r--Userland/Applications/IRCClient/main.cpp4
-rw-r--r--Userland/Utilities/host.cpp2
-rw-r--r--Userland/Utilities/ntpquery.cpp4
-rw-r--r--Userland/Utilities/ping.cpp4
5 files changed, 7 insertions, 12 deletions
diff --git a/Kernel/Syscalls/pledge.cpp b/Kernel/Syscalls/pledge.cpp
index a55cf68231..74af78650d 100644
--- a/Kernel/Syscalls/pledge.cpp
+++ b/Kernel/Syscalls/pledge.cpp
@@ -62,11 +62,6 @@ int Process::sys$pledge(Userspace<const Syscall::SC_pledge_params*> user_params)
}
ENUMERATE_PLEDGE_PROMISES
#undef __ENUMERATE_PLEDGE_PROMISE
- if (part == "dns") {
- // "dns" is an alias for "unix" since DNS queries go via LookupServer
- mask |= (1u << (u32)Pledge::unix);
- continue;
- }
return false;
}
return true;
diff --git a/Userland/Applications/IRCClient/main.cpp b/Userland/Applications/IRCClient/main.cpp
index 2458bac0ca..2cd00843fa 100644
--- a/Userland/Applications/IRCClient/main.cpp
+++ b/Userland/Applications/IRCClient/main.cpp
@@ -33,7 +33,7 @@
int main(int argc, char** argv)
{
- if (pledge("stdio inet dns unix recvfd sendfd cpath rpath fattr wpath cpath", nullptr) < 0) {
+ if (pledge("stdio inet unix recvfd sendfd cpath rpath fattr wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
- if (pledge("stdio inet dns unix recvfd sendfd rpath wpath cpath", nullptr) < 0) {
+ if (pledge("stdio inet unix recvfd sendfd rpath wpath cpath", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Userland/Utilities/host.cpp b/Userland/Utilities/host.cpp
index d77054b868..e3908472b4 100644
--- a/Userland/Utilities/host.cpp
+++ b/Userland/Utilities/host.cpp
@@ -34,7 +34,7 @@
int main(int argc, char** argv)
{
- if (pledge("stdio dns", nullptr) < 0) {
+ if (pledge("stdio unix", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Userland/Utilities/ntpquery.cpp b/Userland/Utilities/ntpquery.cpp
index 017a6c0235..07003b4f38 100644
--- a/Userland/Utilities/ntpquery.cpp
+++ b/Userland/Utilities/ntpquery.cpp
@@ -111,7 +111,7 @@ static String format_ntp_timestamp(NtpTimestamp ntp_timestamp)
int main(int argc, char** argv)
{
#ifdef __serenity__
- if (pledge("stdio inet dns settime", nullptr) < 0) {
+ if (pledge("stdio inet unix settime", nullptr) < 0) {
perror("pledge");
return 1;
}
@@ -145,7 +145,7 @@ int main(int argc, char** argv)
#ifdef __serenity__
if (!adjust_time && !set_time) {
- if (pledge("stdio inet dns", nullptr) < 0) {
+ if (pledge("stdio inet unix", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Userland/Utilities/ping.cpp b/Userland/Utilities/ping.cpp
index a960c73dc5..ab398f42d9 100644
--- a/Userland/Utilities/ping.cpp
+++ b/Userland/Utilities/ping.cpp
@@ -61,7 +61,7 @@ static const char* host;
int main(int argc, char** argv)
{
- if (pledge("stdio id inet dns sigaction", nullptr) < 0) {
+ if (pledge("stdio id inet unix sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
@@ -81,7 +81,7 @@ int main(int argc, char** argv)
return 1;
}
- if (pledge("stdio inet dns sigaction", nullptr) < 0) {
+ if (pledge("stdio inet unix sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}