From 51f0a9193eb831223c413223c7a880382b37af72 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 16 Jul 2002 01:22:49 +0000 Subject: internal uid/gid tracking. permit can not detach systrace, useful for sshd. --- bin/systrace/systrace.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin/systrace/systrace.c') 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 * 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; } -- cgit v1.2.3