PERFORCE change 174164 for review
Robert Watson
rwatson at FreeBSD.org
Tue Feb 2 17:55:00 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=174164
Change 174164 by rwatson at rwatson_vimage_client on 2010/02/02 17:54:38
When creating a sandbox from within a sandbox, look in the global
fdlist inherited from the parent sandbox to find the runtime linker.
Affected files ...
.. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 edit
Differences ...
==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 $
+ * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 $
*/
#include <sys/param.h>
@@ -276,7 +276,14 @@
bzero(lcsp, sizeof(*lcsp));
if (ld_insandbox()) {
- if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0)
+ struct lc_fdlist *globals;
+ int pos = 0;
+
+ globals = lc_fdlist_global();
+ if (globals == NULL)
+ goto out_error;
+ if (lc_fdlist_lookup(globals, RTLD_CAP_FQNAME, "rtld", NULL,
+ &fd_rtld, &pos) < 0)
goto out_error;
} else {
fd_rtld = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO,
More information about the p4-projects
mailing list