* [PATCH] Test for secure_getenv too.
@ 2013-02-05 5:08 Cristian Rodríguez
2013-02-06 11:04 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Cristian Rodríguez @ 2013-02-05 5:08 UTC (permalink / raw)
To: util-linux; +Cc: Cristian Rodríguez
In current glibc versions, internal __secure_getenv
no longer exists and was replaced by secure_getenv()
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
---
configure.ac | 1 +
lib/env.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9024809..39c7f20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -298,6 +298,7 @@ AC_CHECK_DECL([strsignal],
AC_CHECK_FUNCS([ \
__fpending \
+ secure_getenv \
__secure_getenv \
err \
errx \
diff --git a/lib/env.c b/lib/env.c
index 04e0f0b..9f81b44 100644
--- a/lib/env.c
+++ b/lib/env.c
@@ -100,8 +100,9 @@ char *safe_getenv(const char *arg)
return NULL;
#endif
#endif
-
-#ifdef HAVE___SECURE_GETENV
+#ifdef HAVE_SECURE_GETENV
+return secure_getenv(arg);
+#elif HAVE___SECURE_GETENV
return __secure_getenv(arg);
#else
return getenv(arg);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Test for secure_getenv too.
2013-02-05 5:08 [PATCH] Test for secure_getenv too Cristian Rodríguez
@ 2013-02-06 11:04 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2013-02-06 11:04 UTC (permalink / raw)
To: Cristian Rodríguez; +Cc: util-linux
On Tue, Feb 05, 2013 at 02:08:03AM -0300, Cristian Rodríguez wrote:
> In current glibc versions, internal __secure_getenv
> no longer exists and was replaced by secure_getenv()
Good catch, applied. Thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-06 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-05 5:08 [PATCH] Test for secure_getenv too Cristian Rodríguez
2013-02-06 11:04 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox