Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 1998 06:55:08 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        jb@freebsd1.cimlogic.com.au (John Birrell)
Cc:        jdp@polstra.com, hasty@rah.star-gate.com, hackers@FreeBSD.ORG
Subject:   Re: dladdr hax
Message-ID:  <199801180655.XAA07872@usr04.primenet.com>
In-Reply-To: <199801172114.IAA15682@freebsd1.cimlogic.com.au> from "John Birrell" at Jan 18, 98 08:14:22 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > If you will come up with (or suggest) a solution to finding the
> > pathname of the main program, then I will add that into my version and
> > commit it.  And puhleeeze, don't suggest the hack of searching each of
> > the directories in $PATH for argv[0].
> 
> What about adding some code to the namei() interface and set aside a
> copy of the path in execve() (in kern_exec.c)?

Symlinks are handled with a buffer rewrite and a return; this is sort of
a kludge on mutual recursion.  Symlinks rooted to root instead of
relatively rooted would work for this.

Really, you would need better namei() code for this; probably a recursive
lookup instead of the kludged buffer/stack mutual recursion currently in
the code.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801180655.XAA07872>