summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-05-28 17:06:39 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-05-28 17:06:39 +0000
commit0fd31388cab2be9d74147d4dbf6b387bc3daab8c (patch)
tree168a6e5e093cebd2560ccf40213807899234f613 /sys
parent8688f0285ad7a59f492a687ac31df459207ce144 (diff)
Allow len == 1 in systrace_fname(), so systraced processes can proceed
their *stat() calls, for example, and get ENOENT, which is expected for "", instead of a forced EINVAL. Fixes the spurious 'rm: : Invalid argument' warnings when building with option USE_SYSTRACE, reported on ports@. Okay provos@ sturm@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/systrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index bdf849e455d..82767fed48a 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.41 2006/05/23 22:28:22 alek Exp $ */
+/* $OpenBSD: systrace.c,v 1.42 2006/05/28 17:06:38 pedro Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -1441,7 +1441,7 @@ systrace_replace(struct str_process *strp, size_t argsize, register_t args[])
int
systrace_fname(struct str_process *strp, caddr_t kdata, size_t len)
{
- if (strp->nfname >= SYSTR_MAXFNAME || len < 2)
+ if (strp->nfname >= SYSTR_MAXFNAME || len < 1)
return EINVAL;
strp->fname[strp->nfname] = kdata;