From 75809d00abfc14a7a2ed566b545745a2b272bd56 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 27 Apr 2018 15:05:18 +0100 Subject: [PATCH] utils: Use getenv rather than secure_getenv The shared library could conceivably get linked into something at a privilege boundary, but the tools have no such requirement. This means we can reduce our glibc dependencies when not building the actual library. Signed-off-by: Simon McVittie <smcv@collabora.com> --- utils/capture-libs.c | 2 +- utils/elf-dump.c | 2 +- utils/print-libstubs.c | 2 +- utils/print-version.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/capture-libs.c b/utils/capture-libs.c index 4e5a8c1b0..33668cc28 100644 --- a/utils/capture-libs.c +++ b/utils/capture-libs.c @@ -971,7 +971,7 @@ main (int argc, char **argv) int code = 0; char *message = NULL; - set_debug_flags( secure_getenv("CAPSULE_DEBUG") ); + set_debug_flags( getenv("CAPSULE_DEBUG") ); while( 1 ) { diff --git a/utils/elf-dump.c b/utils/elf-dump.c index 8a2c149d6..08c5a3c4b 100644 --- a/utils/elf-dump.c +++ b/utils/elf-dump.c @@ -29,7 +29,7 @@ int main (int argc, char **argv) void *handle; const char *libname; - set_debug_flags( secure_getenv("CAPSULE_DEBUG") ); + set_debug_flags( getenv("CAPSULE_DEBUG") ); if( argc < 2 ) { diff --git a/utils/print-libstubs.c b/utils/print-libstubs.c index de1acb1dd..a28aeacae 100644 --- a/utils/print-libstubs.c +++ b/utils/print-libstubs.c @@ -304,7 +304,7 @@ int main (int argc, char **argv) exit( 1 ); } - set_debug_flags( secure_getenv("CAPSULE_DEBUG") ); + set_debug_flags( getenv("CAPSULE_DEBUG") ); if( argc > 2 ) prefix = argv[2]; diff --git a/utils/print-version.c b/utils/print-version.c index 26ebb7884..65ab1cd96 100644 --- a/utils/print-version.c +++ b/utils/print-version.c @@ -34,7 +34,7 @@ int main (int argc, char **argv) int error = 0; int e = 0; - set_debug_flags( secure_getenv("CAPSULE_DEBUG") ); + set_debug_flags( getenv("CAPSULE_DEBUG") ); if( argc < 2 ) { -- GitLab