Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 2009 20:29:57 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 156621 for review
Message-ID:  <200901242029.n0OKTv8Y057411@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



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