1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): We cannot

use the AT_EXECFN value if it is no absolute path.
	* sysdeps/unix/sysv/linux/kernel-features.h: Never define
	__ASSUME_AT_EXECFN.
This commit is contained in:
Ulrich Drepper
2008-08-01 18:03:57 +00:00
parent cd5743fdec
commit 42fa1f67d4
3 changed files with 8 additions and 12 deletions

View File

@ -1,5 +1,10 @@
2008-08-01 Ulrich Drepper <drepper@redhat.com> 2008-08-01 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): We cannot
use the AT_EXECFN value if it is no absolute path.
* sysdeps/unix/sysv/linux/kernel-features.h: Never define
__ASSUME_AT_EXECFN.
* Versions.def: Add GLIBC_2.9 to libresolv. * Versions.def: Add GLIBC_2.9 to libresolv.
* include/resolv.h: Remove hidden proto declarations for __ns_* * include/resolv.h: Remove hidden proto declarations for __ns_*
functions. Add them for __dn_count_labels and __p_secstodate. functions. Add them for __dn_count_labels and __p_secstodate.

View File

@ -35,16 +35,13 @@
const char * const char *
_dl_get_origin (void) _dl_get_origin (void)
{ {
#ifndef __ASSUME_AT_EXECFN
char linkval[PATH_MAX]; char linkval[PATH_MAX];
#endif
const char *str; const char *str;
char *result = (char *) -1l; char *result = (char *) -1l;
int len; int len;
str = GLRO(dl_execfn); str = GLRO(dl_execfn);
#ifndef __ASSUME_AT_EXECFN if (str == NULL || str[0] != '/')
if (str == NULL)
{ {
INTERNAL_SYSCALL_DECL (err); INTERNAL_SYSCALL_DECL (err);
@ -53,12 +50,12 @@ _dl_get_origin (void)
if (! INTERNAL_SYSCALL_ERROR_P (len, err) if (! INTERNAL_SYSCALL_ERROR_P (len, err)
&& len > 0 && linkval[0] != '[') && len > 0 && linkval[0] != '[')
str = linkval; str = linkval;
else
str = NULL;
} }
else else
#endif
len = strlen (str); len = strlen (str);
#ifndef __ASSUME_AT_EXECFN
if (str == NULL) if (str == NULL)
{ {
/* We use the environment variable LD_ORIGIN_PATH. If it is set make /* We use the environment variable LD_ORIGIN_PATH. If it is set make
@ -79,7 +76,6 @@ _dl_get_origin (void)
} }
} }
else else
#endif
{ {
/* We can use this value. */ /* We can use this value. */
assert (str[0] == '/'); assert (str[0] == '/');

View File

@ -501,11 +501,6 @@
# define __ASSUME_ADJ_OFFSET_SS_READ 1 # define __ASSUME_ADJ_OFFSET_SS_READ 1
#endif #endif
/* Support for AT_EXECFN was added in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061b
# define __ASSUME_AT_EXECFN 1
#endif
/* Support for various CLOEXEC and NONBLOCK flags was added for x86, /* Support for various CLOEXEC and NONBLOCK flags was added for x86,
x86-64, PPC, IA-64, and SPARC in 2.6.27. */ x86-64, PPC, IA-64, and SPARC in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061b \ #if __LINUX_KERNEL_VERSION >= 0x02061b \