tfix unveil(2) logic - vote - simple cgi voting system for web and gopher
(HTM) git clone git://src.adamsgaard.dk/vote
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4bb5484779e4c0562cbe9393ab9df8caf3f24728
(DIR) parent b2d48df0f716bde905d6eb17e0520014cc3171ca
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 27 Sep 2020 02:20:13 +0200
fix unveil(2) logic
Diffstat:
M vote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/vote.c b/vote.c
t@@ -77,7 +77,7 @@ int
main() {
struct stat sb;
- if (unveil(getenv("PWD"), NULL) == -1 && unveil(NULL, NULL) == -1) {
+ if (unveil(getenv("PWD"), NULL) == -1 || unveil(NULL, NULL) == -1) {
fprintf(stderr, "unveil: %s\n", strerror(errno));
}