projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: setuid/setgid daemons should not get sensitive env. var./args
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index 7f91dcb8151ea6ae6083668e78df123f73521758..9a53330004931408df017fb4b2ebbd87ad31a61e 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-35,6
+35,7
@@
#include <common/common.h>
#include <common/runas.h>
#include <common/common.h>
#include <common/runas.h>
+#include <common/compat/getenv.h>
#include "utils.h"
#include "defaults.h"
#include "utils.h"
#include "defaults.h"
@@
-885,11
+886,11
@@
char *utils_get_home_dir(void)
char *val = NULL;
struct passwd *pwd;
char *val = NULL;
struct passwd *pwd;
- val = getenv(DEFAULT_LTTNG_HOME_ENV_VAR);
+ val =
lttng_secure_
getenv(DEFAULT_LTTNG_HOME_ENV_VAR);
if (val != NULL) {
goto end;
}
if (val != NULL) {
goto end;
}
- val = getenv(DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR);
+ val =
lttng_secure_
getenv(DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR);
if (val != NULL) {
goto end;
}
if (val != NULL) {
goto end;
}
@@
-954,7
+955,7
@@
end:
LTTNG_HIDDEN
char *utils_get_kmod_probes_list(void)
{
LTTNG_HIDDEN
char *utils_get_kmod_probes_list(void)
{
- return getenv(DEFAULT_LTTNG_KMOD_PROBES);
+ return
lttng_secure_
getenv(DEFAULT_LTTNG_KMOD_PROBES);
}
/*
}
/*
@@
-964,7
+965,7
@@
char *utils_get_kmod_probes_list(void)
LTTNG_HIDDEN
char *utils_get_extra_kmod_probes_list(void)
{
LTTNG_HIDDEN
char *utils_get_extra_kmod_probes_list(void)
{
- return getenv(DEFAULT_LTTNG_EXTRA_KMOD_PROBES);
+ return
lttng_secure_
getenv(DEFAULT_LTTNG_EXTRA_KMOD_PROBES);
}
/*
}
/*
This page took
0.023847 seconds
and
4
git commands to generate.