1234567891011121314151617181920212223242526272829 |
- $OpenBSD: patch-urlview_c,v 1.4 2016/03/21 17:41:52 mestre Exp $
- --- urlview.c.orig Tue Jul 4 11:14:30 2000
- +++ urlview.c Mon Mar 21 12:38:33 2016
- @@ -46,9 +46,11 @@
- #include <rx/rxposix.h>
- #endif
-
- +#include "quote.h"
- +
- #define DEFAULT_REGEXP "(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>\"]+|(www|web|w3)\\.[-a-z0-9.]+)[^' \t.,;<>\"\\):]"
- #define DEFAULT_COMMAND "url_handler.sh %s"
- -#define SYSTEM_INITFILE "/etc/urlview.conf"
- +#define SYSTEM_INITFILE "${SYSCONFDIR}/urlview.conf"
-
- #define OFFSET 2
- #define PAGELEN (LINES - 1 - OFFSET)
- @@ -187,6 +189,11 @@ int main (int argc, char **argv)
-
- pw = getpwuid (getuid ());
- snprintf (buf, sizeof (buf), "%s/.urlview", pw->pw_dir);
- +
- + if (pledge("stdio rpath tty proc exec", NULL) == -1) {
- + perror("pledge");
- + exit(1);
- + }
-
- /*** Check for users rc-file ***/
- if (stat (buf,&stat_buf) == -1)
|