From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: Expanding PATH records to be absolute paths Date: Wed, 12 Sep 2007 14:34:29 -0400 Message-ID: <200709121434.29742.sgrubb@redhat.com> References: <1189620898.4764.52.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1189620898.4764.52.camel@localhost.localdomain> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Wednesday 12 September 2007 14:14:58 Matthew Booth wrote: > If I were going to do this from scratch, I'd cache CWD records and > rewrite PATH records on the way through. I don't believe any other > record requires this. AVC paths are already absolute, and I don't think > there are any other paths. Is this right? seems like its something like: char *tpath, *actual; asprintf(&tpath, "%s/%s", cwd, path); actual = realpath(tpath, NULL); if (actual) { // whatever you want to do with the canonicalized absolute pathname. free(actual); } free(tpath); HTH, -Steve