1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

unveil maildir, utmp, /tmp, and /dev. For the vast number of people

using biff.
This commit is contained in:
deraadt
2018-09-24 22:56:54 +00:00
parent 0d7a8dda14
commit 51d464e83e
+9 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: comsat.c,v 1.48 2017/04/03 17:23:39 tedu Exp $ */
/* $OpenBSD: comsat.c,v 1.49 2018/09/24 22:56:54 deraadt Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -91,6 +91,14 @@ main(int argc, char *argv[])
exit(1);
}
if (unveil(_PATH_MAILDIR, "r") == -1)
err(1, "unveil");
if (unveil(_PATH_UTMP, "r") == -1)
err(1, "unveil");
if (unveil("/tmp", "w") == -1)
err(1, "unveil");
if (unveil(_PATH_DEV, "rw") == -1)
err(1, "unveil");
if (pledge("stdio rpath wpath proc tty", NULL) == -1)
err(1, "pledge");