ports/www/lynx/patches/patch-src_LYMain_c

27 lines
623 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: src/LYMain.c
--- src/LYMain.c.orig
+++ src/LYMain.c
@@ -2155,6 +2155,22 @@ int main(int argc,
}
/*
+ * Disabling features requiring 'proc' + 'exec' and calling pledge
+ */
+ no_editor = TRUE;
+ no_exec = TRUE;
+ no_mail = TRUE;
+ no_shell = TRUE;
+
+ rlogin_ok = FALSE;
+ telnet_ok = FALSE;
+
+ if (pledge("stdio rpath wpath cpath fattr dns inet tty", NULL) == -1) {
+ fprintf(stderr, "%s: pledge: %s\n", getprogname(), strerror(errno));
+ exit_immediately(EXIT_FAILURE);
+ }
+
+ /*
* Here's where we do all the work.
*/
if (dump_output_immediately) {