Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2015 18:06:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 187114] rtld(1) does not expand $ORIGIN unless DF_ORIGIN flag is set
Message-ID:  <bug-187114-8-Vd1IzGqC9y@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-187114-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-187114-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187114

--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
When the dynamic linker loads an object that uses $ORIGIN, it must calculate
the pathname of the directory containing the object. Because this calculation
can be computationally expensive, implementations may want to avoid the
calculation for objects that do not use $ORIGIN. If an object calls dlopen()
with a string containing $ORIGIN and does not use $ORIGIN in one if its dynamic
array entries, the dynamic linker may not have calculated the pathname for the
object until the dlopen() actually occurs. Since the application may have
changed its current working directory before the dlopen() call, the calculation
may not yield the correct result. To avoid this possibility, an object may
signal its intention to reference $ORIGIN by setting the DF_ORIGIN flag. An
implementation may reject an attempt to use $ORIGIN within a dlopen() call from
an object that did not set the DF_ORIGIN flag and did not use $ORIGIN within
its dynamic array.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-187114-8-Vd1IzGqC9y>