- use issetugid()

- be paranoid about honoring LD_LIBMAP_DISABLE.

Suggested by:	 rwatson
This commit is contained in:
mdodd 2003-05-31 15:24:29 +00:00
parent 49fb693df9
commit 73a7f529f4

View File

@ -262,13 +262,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
argv0 = argv[0] != NULL ? argv[0] : "(null)";
environ = env;
trust = geteuid() == getuid() && getegid() == getgid();
libmap_disable = getenv("LD_LIBMAP_DISABLE") != NULL;
trust = !issetugid();
ld_bind_now = getenv("LD_BIND_NOW");
if (trust) {
ld_debug = getenv("LD_DEBUG");
libmap_disable = getenv("LD_LIBMAP_DISABLE") != NULL;
ld_library_path = getenv("LD_LIBRARY_PATH");
ld_preload = getenv("LD_PRELOAD");
}