OpenBSD: Drop now unneeded promise from initial pledge

Both ssl(8) as well as ncurses(3) related files are now read completely
by the time of ircConfig() and uiInitEarly() respectively, so read
access to the filesystem is no longer needed at all unless the "log" or
"save" options are used.
weechat-hashes
Klemens Nanni 2021-06-10 01:32:11 +00:00 committed by C. McEnroe
parent 71a84aa502
commit 552cd49833
1 changed files with 2 additions and 2 deletions

4
chat.c
View File

@ -247,7 +247,7 @@ int main(int argc, char *argv[]) {
if (printCert) { if (printCert) {
ircConfig(insecure, trust, cert, priv); ircConfig(insecure, trust, cert, priv);
#ifdef __OpenBSD__ #ifdef __OpenBSD__
int error = pledge("stdio rpath inet dns", NULL); int error = pledge("stdio inet dns", NULL);
if (error) err(EX_OSERR, "pledge"); if (error) err(EX_OSERR, "pledge");
#endif #endif
ircConnect(bind, host, port); ircConnect(bind, host, port);
@ -298,7 +298,7 @@ int main(int argc, char *argv[]) {
char *promisesFinal = strdup(promises); char *promisesFinal = strdup(promises);
if (!promisesFinal) err(EX_OSERR, "strdup"); if (!promisesFinal) err(EX_OSERR, "strdup");
seprintf(ptr, end, " rpath inet dns"); seprintf(ptr, end, " inet dns");
int error = pledge(promises, NULL); int error = pledge(promises, NULL);
if (error) err(EX_OSERR, "pledge"); if (error) err(EX_OSERR, "pledge");
#endif #endif