PERFORCE change 156989 for review
Robert Watson
rwatson at FreeBSD.org
Sun Feb 1 03:16:10 PST 2009
http://perforce.freebsd.org/chv.cgi?CH=156989
Change 156989 by rwatson at rwatson_freebsd_capabilities on 2009/02/01 11:15:48
Call init_rtld() before we evaluate whether or not a valid file
descriptor has been passed in capability mode -- this improves
our chances of printing an error message on a failure
significantly.
Affected files ...
.. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#6 edit
Differences ...
==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#6 (text+ko) ====
@@ -346,6 +346,10 @@
aux_info[auxp->a_type] = auxp;
}
+ /* Initialize and relocate ourselves. */
+ assert(aux_info[AT_BASE] != NULL);
+ init_rtld((caddr_t) aux_info[AT_BASE]->a_un.a_ptr);
+
#ifdef IN_RTLD_CAP
/*
* In capability mode, the kernel has executed ld-elf-cap.so directly,
@@ -367,10 +371,6 @@
}
#endif
- /* Initialize and relocate ourselves. */
- assert(aux_info[AT_BASE] != NULL);
- init_rtld((caddr_t) aux_info[AT_BASE]->a_un.a_ptr);
-
/* XXXRW: Need to do something about program names in capability mode. */
__progname = obj_rtld.path;
argv0 = argv[0] != NULL ? argv[0] : "(null)";
More information about the p4-projects
mailing list