diff options
| author | Rod Evans <Rod.Evans@Sun.COM> | 2008-10-07 15:06:14 -0700 |
|---|---|---|
| committer | Rod Evans <Rod.Evans@Sun.COM> | 2008-10-07 15:06:14 -0700 |
| commit | ba7962c0250fa58d6c360c01c4866d394aae57b8 (patch) | |
| tree | a644e7a38e8e5fae5c6eea49d8a8a4fd1f5a47f9 /usr/src | |
| parent | 7962806f7d687e6068b5eaf4397dfb03a8d7383b (diff) | |
| download | illumos-joyent-ba7962c0250fa58d6c360c01c4866d394aae57b8.tar.gz | |
6756472 AOUT search path pruning
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/sgs/crle/common/crle.msg | 10 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/crle/common/print.c | 21 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/liblddbg.msg | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/libs.c | 29 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/packages/common/SUNWonld-README | 1 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/rtld/common/a.out.c | 12 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg | 15 |
7 files changed, 59 insertions, 31 deletions
diff --git a/usr/src/cmd/sgs/crle/common/crle.msg b/usr/src/cmd/sgs/crle/common/crle.msg index 4723213324..12eb812309 100644 --- a/usr/src/cmd/sgs/crle/common/crle.msg +++ b/usr/src/cmd/sgs/crle/common/crle.msg @@ -20,11 +20,9 @@ # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" - @ _START_ @@ -163,8 +161,9 @@ @ MSG_DEF_AOUTDLP " Default Library Path (AOUT):\t\ /usr/4lib:/usr/lib:/usr/local/lib \ (system default)\n" -@ MSG_DEF_AOUTTD " Trusted Directories (AOUT):\t\ - /usr/4lib:/usr/lib:/usr/ucblib:/usr/local/lib \ +@ MSG_DEF_AOUTNEWTD " Trusted Directories (AOUT):\t\ + /lib/secure:/usr/lib/secure (system default)\n" +@ MSG_DEF_AOUTOLDTD " Trusted Directories (AOUT):\t\/usr/lib/secure \ (system default)\n" @ MSG_ENV_TITLE "\nEnvironment Variables:\n" @@ -293,7 +292,6 @@ @ MSG_PTH_UPTD_64 "/lib/secure/64" @ MSG_PTH_AOUTDLP "/usr/4lib:/usr/lib:/usr/local/lib" -@ MSG_PTH_AOUTTD "/usr/4lib:/usr/lib:/usr/ucblib:/usr/local/lib" @ MSG_DIR_ROOT "/" @ MSG_DIR_DOT "." diff --git a/usr/src/cmd/sgs/crle/common/print.c b/usr/src/cmd/sgs/crle/common/print.c index 7ebe3ff04c..b8ccbd0254 100644 --- a/usr/src/cmd/sgs/crle/common/print.c +++ b/usr/src/cmd/sgs/crle/common/print.c @@ -20,10 +20,9 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> #include <sys/stat.h> @@ -177,7 +176,11 @@ fablib(Crle_desc * crle, int flag) break; case CRLE_ASLIB: - path = MSG_ORIG(MSG_PTH_AOUTTD); +#ifndef SGS_PRE_UNIFIED_PROCESS + path = MSG_ORIG(MSG_PTH_NEWTD); +#else + path = MSG_ORIG(MSG_PTH_OLDTD); +#endif list = &crle->c_aslibpath; break; @@ -664,7 +667,11 @@ scanconfig(Crle_desc * crle, Addr addr, int c_class) /* * Indicate any system default. */ - (void) printf(MSG_INTL(MSG_DEF_AOUTTD)); +#ifndef SGS_PRE_UNIFIED_PROCESS + (void) printf(MSG_INTL(MSG_DEF_AOUTNEWTD)); +#else + (void) printf(MSG_INTL(MSG_DEF_AOUTOLDTD)); +#endif } } @@ -1062,7 +1069,11 @@ inspectconfig(Crle_desc * crle, int c_class) if (crle->c_flags & CRLE_AOUT) { fmt1 = MSG_INTL(MSG_DEF_AOUTDLP); - fmt2 = MSG_INTL(MSG_DEF_AOUTTD); +#ifndef SGS_PRE_UNIFIED_PROCESS + fmt2 = MSG_INTL(MSG_DEF_AOUTNEWTD); +#else + fmt2 = MSG_INTL(MSG_DEF_AOUTOLDTD); +#endif } else { #if M_CLASS == ELFCLASS64 #ifndef SGS_PRE_UNIFIED_PROCESS diff --git a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg index aec5e954ae..0eaadd5f4a 100644 --- a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg +++ b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg @@ -484,6 +484,8 @@ @ MSG_LIB_RUNPATH " search path=%s (RUNPATH/RPATH from file %s)" @ MSG_LIB_DEFAULT " search path=%s (default)" @ MSG_LIB_DEFAULTC " search path=%s (configuration default - %s)" +@ MSG_LIB_TDEFAULT " search path=%s (trusted default)" +@ MSG_LIB_TDEFAULTC " search path=%s (trusted configuration default - %s)" @ MSG_LIB_LIBPATH " search path=%s (LIBPATH or -YP)" @ MSG_LIB_YPATH " search path=%s replaces path=%s (-Y%c)" diff --git a/usr/src/cmd/sgs/liblddbg/common/libs.c b/usr/src/cmd/sgs/liblddbg/common/libs.c index 5ccfce723e..679ede62b2 100644 --- a/usr/src/cmd/sgs/liblddbg/common/libs.c +++ b/usr/src/cmd/sgs/liblddbg/common/libs.c @@ -109,25 +109,46 @@ void Dbg_libs_path(Lm_list *lml, const char *path, uint_t orig, const char *obj) { const char *fmt; + uint_t search; - if (path == (const char *)0) + if (path == NULL) return; if (DBG_NOTCLASS(DBG_C_LIBS)) return; - if (orig & LA_SER_LIBPATH) { + search = orig & + (LA_SER_LIBPATH | LA_SER_RUNPATH | LA_SER_DEFAULT | LA_SER_SECURE); + + switch (search) { + case LA_SER_LIBPATH: if (orig & LA_SER_CONFIG) fmt = MSG_INTL(MSG_LIB_LDLIBPATHC); else fmt = MSG_INTL(MSG_LIB_LDLIBPATH); - } else if (orig & LA_SER_RUNPATH) { + break; + + case LA_SER_RUNPATH: fmt = MSG_INTL(MSG_LIB_RUNPATH); - } else if (orig & LA_SER_DEFAULT) { + break; + + case LA_SER_DEFAULT: if (orig & LA_SER_CONFIG) fmt = MSG_INTL(MSG_LIB_DEFAULTC); else fmt = MSG_INTL(MSG_LIB_DEFAULT); + break; + + case LA_SER_SECURE: + if (orig & LA_SER_CONFIG) + fmt = MSG_INTL(MSG_LIB_TDEFAULTC); + else + fmt = MSG_INTL(MSG_LIB_TDEFAULT); + break; + + default: + return; } + dbg_print(lml, fmt, path, obj); } diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index 3fdbd71a00..bae54073a6 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1381,3 +1381,4 @@ Bugid Risk Synopsis 6749055 ld should generate GNU style VERSYM indexes for VERNEED records (D) PSARC/2008/603 ELF objects to adopt GNU-style Versym indexes 6752728 link-editor can enter UNDEF symbols in symbol sort sections +6756472 AOUT search path pruning (D) diff --git a/usr/src/cmd/sgs/rtld/common/a.out.c b/usr/src/cmd/sgs/rtld/common/a.out.c index cfd76c331a..ced1d9e287 100644 --- a/usr/src/cmd/sgs/rtld/common/a.out.c +++ b/usr/src/cmd/sgs/rtld/common/a.out.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Object file dependent support for a.out format objects. */ @@ -59,13 +57,11 @@ static Pnode aout_dflt_dirs[] = { }; static Pnode aout_secure_dirs[] = { - { MSG_ORIG(MSG_PTH_USR4LIB), 0, MSG_PTH_USR4LIB_SIZE, +#ifndef SGS_PRE_UNIFIED_PROCESS + { MSG_ORIG(MSG_PTH_LIBSE), 0, MSG_PTH_LIBSE_SIZE, LA_SER_SECURE, 0, &aout_secure_dirs[1] }, - { MSG_ORIG(MSG_PTH_USRLIB), 0, MSG_PTH_USRLIB_SIZE, - LA_SER_SECURE, 0, &aout_secure_dirs[2] }, - { MSG_ORIG(MSG_PTH_USRUCBLIB), 0, MSG_PTH_USRUCBLIB_SIZE, - LA_SER_SECURE, 0, &aout_secure_dirs[3] }, - { MSG_ORIG(MSG_PTH_USRLCLIB), 0, MSG_PTH_USRLCLIB_SIZE, +#endif + { MSG_ORIG(MSG_PTH_USRLIBSE), 0, MSG_PTH_USRLIBSE_SIZE, LA_SER_SECURE, 0, 0 } }; diff --git a/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg b/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg index 62b3213e4d..581a7e19e7 100644 --- a/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg +++ b/usr/src/cmd/sgs/rtld/common/rtld.sparc32.msg @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,7 +18,11 @@ # # CDDL HEADER END # -#pragma ident "%Z%%M% %I% %E% SMI" + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# @ _START_ @@ -47,6 +47,5 @@ @ MSG_PTH_USRLCLIB "/usr/local/lib" @ MSG_PTH_USR4LIB "/usr/4lib" -@ MSG_PTH_USRUCBLIB "/usr/ucblib" @ MSG_SYM_LAV8PLTENTER "la_sparcv8_pltenter" |
