From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 15 22:09:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C97A4106564A for ; Fri, 15 Aug 2008 22:09:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 639818FC3A for ; Fri, 15 Aug 2008 22:09:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id AF7C146BB3; Fri, 15 Aug 2008 18:09:39 -0400 (EDT) Date: Fri, 15 Aug 2008 23:09:39 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Uladzislau Rezki In-Reply-To: <200808151217.04626.v.rezkii@sam-solutions.net> Message-ID: References: <200808142120.13609.v.rezkii@sam-solutions.net> <20080814184329.GA60497@freebsd.org> <200808151217.04626.v.rezkii@sam-solutions.net> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Roman Divacky Subject: Re: textvp_fullpath X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2008 22:09:41 -0000 On Fri, 15 Aug 2008, Uladzislau Rezki wrote: > We have to to do a few thinks: > > 1) do original "write" sys call; > 2) get full path (/etc/passwd); > 3) put all this information to user land through the character device. > > I get stuck in point 2. I need to get full path, but how ... In FreeBSD 6.2 and higher, the kernel event auditing facility provides exactly this service already. Take a look at the auditpipe(4) facility for details of the run-time monitoring aspect of that. Robert N M Watson Computer Laboratory University of Cambridge