summaryrefslogtreecommitdiff
path: root/libexec/lockspool
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-13 15:14:27 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-13 15:14:27 +0000
commit9d137489a3000355155445c5e4700d013b38932e (patch)
treefaa12b83ea4f0a70369ed5a3fb6a8765a4086651 /libexec/lockspool
parent46be23da5c07e8983c12b5bd0965f8f359568c7a (diff)
pledge "stdio rpath wpath cpath fattr"; fattr due to locking code borrowed
from mail.local
Diffstat (limited to 'libexec/lockspool')
-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)