summaryrefslogtreecommitdiff
path: root/bin/systrace/systrace.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-07-16 01:22:49 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-07-16 01:22:49 +0000
commit51f0a9193eb831223c413223c7a880382b37af72 (patch)
treee592e613664cdb015ce46879c2adf0db7583ad45 /bin/systrace/systrace.c
parent26e2b293859a559593aded9335120e9e0c1d295e (diff)
internal uid/gid tracking. permit can not detach systrace, useful for
sshd.
Diffstat (limited to 'bin/systrace/systrace.c')
-rw-r--r--bin/systrace/systrace.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index cd0b4830a40..a6610531283 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.26 2002/07/12 12:26:29 provos Exp $ */
+/* $OpenBSD: systrace.c,v 1.27 2002/07/16 01:22:48 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -254,10 +254,15 @@ execres_cb(int fd, pid_t pid, int policynr, char *emulation, char *name, void *a
if (policynr != -1) {
struct intercept_pid *ipid;
+ ipid = intercept_getpid(pid);
+ if (ipid->uflags & PROCESS_DETACH) {
+ if (intercept_detach(fd, pid) == -1)
+ err(1, "%s: intercept_detach", __func__);
+ return;
+ }
if (inherit)
return;
- ipid = intercept_getpid(pid);
if (ipid->uflags & PROCESS_INHERIT_POLICY)
return;
}