Date: Sun, 1 Feb 2009 11:16:09 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 156989 for review Message-ID: <200902011116.n11BG9Kh066980@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=156989 Change 156989 by rwatson@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)";
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902011116.n11BG9Kh066980>