summaryrefslogtreecommitdiff
path: root/libexec/spamd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-29 06:51:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-29 06:51:21 +0000
commit0636f90435f354080dc94a12b315a28172a17dc7 (patch)
treef734a0629558dcb11d9321c213d1d6cb5fe48507 /libexec/spamd
parente5df2491f6fb39c9211632208f595508d7b4e591 (diff)
Document that the pfdev check for 63 is /dev/fd/ only contains those nodes
Diffstat (limited to 'libexec/spamd')
-rw-r--r--libexec/spamd/grey.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index e91c437b9a9..6cc3b2164cd 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.59 2015/05/18 16:04:21 reyk Exp $ */
+/* $OpenBSD: grey.c,v 1.60 2015/11/29 06:51:20 deraadt Exp $ */
/*
* Copyright (c) 2004-2006 Bob Beck. All rights reserved.
@@ -162,8 +162,11 @@ configure_pf(char **addrs, int count)
if (debug)
fprintf(stderr, "configure_pf - device on fd %d\n", pfdev);
+
+ /* Because /dev/fd/ only contains device nodes for 0-63 */
if (pfdev < 1 || pfdev > 63)
return(-1);
+
if (asprintf(&fdpath, "/dev/fd/%d", pfdev) == -1)
return(-1);
pargv[2] = fdpath;