This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Define secure_getenv (v2)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "Carlos O'Donell" <carlos_odonell at mentor dot com>, Florian Weimer <fweimer at redhat dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Date: Mon, 6 Aug 2012 14:12:54 -0700
- Subject: Re: [PATCH] Define secure_getenv (v2)
- References: <5008285D.9030506@redhat.com><50082BA4.9040609@mentor.com><20120727181153.239f8b81@spoyarek><50128F10.2000300@mentor.com><50128F47.1090904@redhat.com><50129079.6060607@mentor.com><501686F5.5050106@redhat.com><50168CE6.6000703@mentor.com><CAMe9rOqa2gfnJh_9PPtFSWoLhhuMVZkzPo9BBWzUsFLGFnuLuQ@mail.gmail.com><20120806210533.D33E02C0B4@topped-with-meat.com>
On Mon, Aug 6, 2012 at 2:05 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> It failed on Linux/x32 since the earliest glibc for x32 is
>> 2.16. If I understand it correctly, GLIBC_2_16 in
>>
>> #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
>> compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
>> #endif
>>
>> should be GLIBC_2_17.
>
> Yes, sorry we didn't catch that. The second version parameter in
> SHLIB_COMPAT is the first version that did not intend to expose the old
> symbol for application use, not the last one that did.
>
I am testing this patch on x32. OK to install if it works?
Thanks.
--
H.J.
diff --git a/stdlib/secure-getenv.c b/stdlib/secure-getenv.c
index 2e696e9..7634fae 100644
--- a/stdlib/secure-getenv.c
+++ b/stdlib/secure-getenv.c
@@ -32,6 +32,6 @@ __libc_secure_getenv (name)
weak_alias (__libc_secure_getenv, secure_getenv)
libc_hidden_weak (__libc_secure_getenv)
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
#endif