From: "Cristian Rodríguez" <crrodriguez@opensuse.org>
To: util-linux@vger.kernel.org
Cc: "Cristian Rodríguez" <crrodriguez@opensuse.org>
Subject: [PATCH] Test for secure_getenv too.
Date: Tue, 5 Feb 2013 02:08:03 -0300 [thread overview]
Message-ID: <1360040883-29778-1-git-send-email-crrodriguez@opensuse.org> (raw)
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
next reply other threads:[~2013-02-05 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 5:08 Cristian Rodríguez [this message]
2013-02-06 11:04 ` [PATCH] Test for secure_getenv too Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360040883-29778-1-git-send-email-crrodriguez@opensuse.org \
--to=crrodriguez@opensuse.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox