From owner-p4-projects@FreeBSD.ORG Sat Jan 24 20:29:58 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B7921065680; Sat, 24 Jan 2009 20:29:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA911065673 for ; Sat, 24 Jan 2009 20:29:57 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A926D8FC14 for ; Sat, 24 Jan 2009 20:29:57 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n0OKTvus057413 for ; Sat, 24 Jan 2009 20:29:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n0OKTv8Y057411 for perforce@freebsd.org; Sat, 24 Jan 2009 20:29:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 24 Jan 2009 20:29:57 GMT Message-Id: <200901242029.n0OKTv8Y057411@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 156621 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2009 20:29:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=156621 Change 156621 by rwatson@rwatson_freebsd_capabilities on 2009/01/24 20:29:54 Add stub _rtld_cap_start, which will be the point of entry for capability-mode execution. Nothing here yet. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#4 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#4 (text+ko) ==== @@ -527,6 +527,23 @@ return (func_ptr_type) obj_main->entry; } +#ifdef IN_RTLD_CAP +/* + * If we are ld-elf-cap.so, then we are directly executed using fexecve(2) + * and will need to behave a bit differently: + * + * (1) The ELF auxilary arguments are for our own binary. + * (2) The main binary we want to execute will be passed as a file descriptor + * so we'll mock up AT_COUNT. + */ +int +_rtld_cap_start(int argc, char *argv[]) +{ + + _exit(0); +} +#endif + Elf_Addr _rtld_bind(Obj_Entry *obj, Elf_Size reloff) {