summaryrefslogtreecommitdiff
path: root/bin/systrace/intercept.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-07-10 13:46:14 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-07-10 13:46:14 +0000
commit9add69314b31cb5d7644bf137e22c49dbdf3a2b0 (patch)
tree0a44280e83ec753246ddc8b01e4f2b387dc2c391 /bin/systrace/intercept.c
parentf6011161ad4d7a14f3fd17e4bbbec9a551fe047b (diff)
make it work with chroot
Diffstat (limited to 'bin/systrace/intercept.c')
-rw-r--r--bin/systrace/intercept.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/systrace/intercept.c b/bin/systrace/intercept.c
index 4f2f8b18077..0ddb9590e0c 100644
--- a/bin/systrace/intercept.c
+++ b/bin/systrace/intercept.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intercept.c,v 1.13 2002/07/10 07:05:02 provos Exp $ */
+/* $OpenBSD: intercept.c,v 1.14 2002/07/10 13:46:13 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -503,7 +503,8 @@ intercept_filename(int fd, pid_t pid, void *addr, int userp)
err(1, "%s: getstring", __func__);
if (intercept.getcwd(fd, pid, cwd, sizeof(cwd)) == NULL)
- err(1, "%s: getcwd", __func__);
+ if (name[0] != '/')
+ err(1, "%s: getcwd", __func__);
if (name[0] != '/') {
if (strlcat(cwd, "/", sizeof(cwd)) >= sizeof(cwd))