Date: Sun, 18 Jan 1998 06:58:28 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: hasty@rah.star-gate.com (Amancio Hasty) Cc: jb@freebsd1.cimlogic.com.au, jdp@polstra.com, hackers@FreeBSD.ORG Subject: Re: dladdr hax Message-ID: <199801180658.XAA07919@usr04.primenet.com> In-Reply-To: <199801172227.OAA06497@rah.star-gate.com> from "Amancio Hasty" at Jan 17, 98 02:27:17 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Not sure that I understand whats going on . when the kernel loads > an image it has the full path so the question now is where do > we save the path -- the most intuitive place is the proc > structure. In the case of a symlink, where the link points to a relative path and the relative path is not the terminal component, the kernel does *not* ever have the full path all at once. The question you have to ask is "is it relative to the link path or relative to the real path from the root that I want to return?". This is relevent because you may be obscuring the location of the binary, and you don't want a user to be able to discern this from running the thing. I think argv[ 0] is the best bet. It also is compatible with Solaris, and it's what we'll need for a Solaris execution class in any case. Might as well not have two implementations. 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?199801180658.XAA07919>