PERFORCE change 156621 for review

Robert Watson rwatson at FreeBSD.org
Sat Jan 24 12:29:59 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=156621

Change 156621 by rwatson at 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)
 {


More information about the p4-projects mailing list