summaryrefslogtreecommitdiff
path: root/libexec/lockspool/lockspool.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/lockspool/lockspool.c')
-rw-r--r--libexec/lockspool/lockspool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/lockspool/lockspool.c b/libexec/lockspool/lockspool.c
index 67cc7eb45e7..12505936be7 100644
--- a/libexec/lockspool/lockspool.c
+++ b/libexec/lockspool/lockspool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lockspool.c,v 1.16 2009/10/27 23:59:31 deraadt Exp $ */
+/* $OpenBSD: lockspool.c,v 1.17 2015/10/13 15:14:26 deraadt Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt <deraadt@theos.com>
@@ -34,6 +34,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <poll.h>
+#include <err.h>
+
#include "mail.local.h"
void unhold(int);
@@ -50,6 +52,9 @@ main(int argc, char *argv[])
char *from, c;
int holdfd;
+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
+ err(1, "pledge");
+
openlog(__progname, LOG_PERROR, LOG_MAIL);
if (argc != 1 && argc != 2)