summaryrefslogtreecommitdiff
path: root/libexec/spamd/grey.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/spamd/grey.c')
-rw-r--r--libexec/spamd/grey.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index 9407a03f464..33fbf650f12 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.61 2015/12/08 03:21:09 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.62 2015/12/10 16:06:29 beck Exp $ */
/*
* Copyright (c) 2004-2006 Bob Beck. All rights reserved.
@@ -1065,6 +1065,11 @@ greywatcher(void)
drop_privs();
+ if (pledge("stdio rpath wpath inet flock proc exec", NULL) == -1) {
+ syslog_r(LOG_ERR, &sdata, "pledge failed (%m)");
+ exit(1);
+ }
+
startup = time(NULL);
db_pid = fork();
switch (db_pid) {