--- ii.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ii.c b/ii.c index 7ca3ee8..d7f66ff 100644 --- a/ii.c +++ b/ii.c _AT_@ -829,7 +829,7 @@ main(int argc, char *argv[]) #ifdef __OpenBSD__ /* OpenBSD pledge(2) support */ - if (pledge("stdio rpath wpath cpath dpath", NULL) == -1) { + if (pledge("stdio rpath wpath cpath dpath unveil", NULL) == -1) { fprintf(stderr, "%s: pledge: %s\n", argv0, strerror(errno)); exit(1); } _AT_@ -842,6 +842,15 @@ main(int argc, char *argv[]) } create_dirtree(ircpath); +#ifdef __OpenBSD__ + /* OpenBSD unveil(2) support */ + if (unveil(ircpath, "rwc") == -1 || + unveil(NULL, NULL) == -1 ) { + fprintf(stderr, "%s: unveil: %s\n", argv0, strerror(errno)); + exit(1); + } +#endif + channelmaster = channel_add(""); /* master channel */ if (key) loginkey(ircfd, key); -- 2.26.2Received on Tue Jun 30 2020 - 12:16:16 CEST
This archive was generated by hypermail 2.3.0 : Tue Jun 30 2020 - 12:24:08 CEST